commit c42515bf412400f4a3e780d429faa57cce0c7cfc Author: SAM2O2O Date: Mon Jul 29 23:42:16 2019 +0800 add project diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..4eb5e46 --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +*.classpath +*.project +*.settings/ +.idea/ +*.swp +*.iml +target/ +.DS_Store +openzalyDB.sqlite3 +stdout.log +openzaly-server.jar +site-file/ +site-logs/ diff --git a/LICENSE b/LICENSE new file mode 100755 index 0000000..f49a4e1 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/NOTICE b/NOTICE new file mode 100755 index 0000000..5821e9d --- /dev/null +++ b/NOTICE @@ -0,0 +1,170 @@ +Copyright 2018-2028 Akaxin Group. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +========================[Dependencies]=============================== + +Spring: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://www.springsource.org + +Javassist: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://www.jboss.org/javassist + +Netty: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://netty.io + +Mina: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://mina.apache.org + +Grizzly: + + * LICENSE: + * http://www.gnu.org/licenses/gpl-2.0.html (General Public License 2.0) + * HOMEPAGE: + * http://grizzly.java.net + +HttpClient: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://hc.apache.org + +Hessian: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://hessian.caucho.com + +XStream: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://xstream.codehaus.org + +FastJson: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://code.alibabatech.com/wiki/fastjson + +Zookeeper: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://zookeeper.apache.org + +Jedis: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://code.google.com/p/jedis + +XMemcached: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://code.google.com/p/xmemcached + +Jetty: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://jetty.mortbay.org + +Thrift: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://thrift.apache.org + +CXF: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://cxf.apache.org + +ZKClient: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * https://github.com/sgroschupf/zkclient + +Curator + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * https://github.com/Netflix/curator + +JFreeChart: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://www.jfree.org + +HibernateValidator: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://www.hibernate.org/subprojects/validator.html + +CommonsLogging: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://commons.apache.org/logging + +SLF4J: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://www.slf4j.org + +Log4j: + + * LICENSE: + * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) + * HOMEPAGE: + * http://log4j.apache.org diff --git a/README.md b/README.md new file mode 100755 index 0000000..362862f --- /dev/null +++ b/README.md @@ -0,0 +1,163 @@ +

+ + Akaxin + +

+ + +[Akaxin](https://www.akaxin.com) +==== + +[![License](https://img.shields.io/badge/license-apache2-blue.svg)](LICENSE) + +**源码仓库** + +> * **Github**: https://github.com/akaxincom/openzaly +> * `国内快` Gitee: https://gitee.com/akaxin/openzaly + +_ + +**向我们提问** + +> QQ群:`655249600` + + +简介 +---- + +Akaxin 是一款开源免费的私有聊天软件,可以部署在任意服务器上,搭建自己的聊天服务器,供自己与朋友、用户使用。 + +特性: + +* 单聊、群聊(含文字、图片、语音等) +* 端到端的加密消息(服务端不可解密,服务器可通过配置关闭此特性) +* 匿名注册、实名注册,以及注册邀请码机制(只允许特定用户注册) +* 扩展机制 +* 等 + + +

+       +

+ + +一、快速体验 +---- + +**1. 启动服务器** + + * **最新版本: openzaly 1.0.7** + * 国内镜像:https://cdn-akaxin-1255552447.cos.ap-beijing.myqcloud.com/openzaly/openzaly-server.jar + * Github下载: https://github.com/akaxincom/openzaly/releases/ + + * **Changelog** + * openzaly发布team版本,同时支持个人版与team版。 + * team 版本支持使用mysql数据库,并且可配置主从库。 + * openzaly使用ssl与平台交互增加了信息传输的安全性。 + + +openzlay 0.10.6开始支持personal(个人版)与team版,默认状态下使用personal + +支持的启动参数:`java -jar openzaly-server.jar -h` + +openzaly Personal版本 命令: + + * 版本升级:`java -jar openzaly-server.jar -upgrade` ,此命令在服务与sqlite数据库版本不一致时执行,正常情况无需执行 + + * 启动命令:`java -jar openzaly-server.jar` + +openzaly Team版本 命令: + + * 生成Team版本所需配置模版:`java -jar openzaly-server.jar -team` + + * 修改配置文件: 上一步会生成 openzaly-server.config 使用mysql数据库需在openzaly-server.config配置文件中配置mysql参数: + 主库(数据库编码需要设置utf8mb4): + openzaly.mysql.host=localhost //数据库的地址 + openzaly.mysql.port=3306 //数据库端口 + openzaly.mysql.database=openzaly //数据库名称 + openzaly.mysql.username=root //mysql数据库访问用户 + openzaly.mysql.password=1234567890 //mysql数据库密码 + + 从库(如果需要使用主从模式,配置这里,不需要从库则不需要配置)数据库编码需要设置utf8mb4: + openzaly.mysql.slave.host=localhost + openzaly.mysql.slave.port=3306 + openzaly.mysql.slave.database=openzaly + openzaly.mysql.slave.username=root + openzaly.mysql.slave.password=1234567890 + + 其他mysql参数为使用mysql连接池的配置参数,如若涉及性能优化可开启配置项。 + + * 迁移数据库命令:openzaly支持使用者把Personal版本的sqlite中的数据迁移到Team版本的mysql数据库 + 如果执行这一步需要在openzaly-server.config配置文件中配置: + `openzaly.sqlite.url=openzalyDB.sqlite3` 这里指定sqlite数据库文件的位置 + + 继续执行迁移命令: + `java -jar openzaly-server.jar -migrate` + + * 启动命令:`java -jar openzaly-server.jar` + + +**2. 下载客户端** + +> * [iOS](https://itunes.apple.com/cn/app/%E9%98%BF%E5%8D%A1%E4%BF%A1/id1346971087?mt=8) +> * [Android](https://www.akaxin.com) + +**3. 访问站点** + +> * 生成账号(手机账号与匿名均可) +> * 输入站点服务器 +> * 首次登陆为管理员,邀请码:000000 +> * 别的用户登陆后可以互加好友,开始聊天。 + +* 匿名账号,账号保存在设备本地,用户不会填写手机信息,任何地方都获取不到。 + +> **站点注册方式默认为匿名,进入站点后,请根据情况第一时间修改为 实名 或者 开启邀请码,防止恶意用户进入** + + +二、源码编译安装 +---- + +需要本地有mvn,直接使用mvn编译即可。 + + +三、扩展开发 +---- + +Akaxin 具有灵活、强大的扩展机制 `(“管理平台” 就是一个扩展)`。通过嵌入WEB页面,与后端的扩展API进行交互, 可以很轻松的构建丰富的业务功能,如: + +* 附近交友 +* 店铺点评 +* 在线游戏 +* 等等等等 + +你的聊天服务器,将摇身一变,成为一个强大的社交软件平台。 + +> 扩展机制处于技术预览阶段,如果你希望在自己的业务中开发自己的扩展,可以联系我们( mail: hi@akaxin.xyz ),我们将免费提供文档与技术答疑。 + +以下是我们开发的一个 “校园社交” 的扩展,截图如下: + +

+       +

+ +> 大家可以去 demo.akaxin.com 体验。 + + +四、技术贡献者 +---- + +> 以加入时间排序 + +* sisishiliu +* SAM2O2O +* childeYin +* yi.chao +* lei.yu +* cuikun +* alexfanchina +* Mino0885 +* 505541778 diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..a2ce872 --- /dev/null +++ b/build.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# ---------------------------------------------------------------------------- +# Copyright 2018-2028 Akaxin Group +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + + +cd `dirname $0` +mvn -T 2C clean package +cp openzaly-boot/target/openzaly-boot-*-SNAPSHOT.jar openzaly-server.jar diff --git a/openzaly-admin/pom.xml b/openzaly-admin/pom.xml new file mode 100755 index 0000000..1e3642d --- /dev/null +++ b/openzaly-admin/pom.xml @@ -0,0 +1,68 @@ + + + 4.0.0 + + com.akaxin + openzaly-parent + 0.0.1 + + com.akaxin.site + openzaly-admin + 0.0.1-RELEASE + jar + openzaly-admin + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-logging + + + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-logging + + + + + com.akaxin.site + openzaly-business + 0.0.1-RELEASE + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.0.2.RELEASE + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/OpenzalyAdminApplication.java b/openzaly-admin/src/main/java/com/akaxin/site/web/OpenzalyAdminApplication.java new file mode 100755 index 0000000..e97926f --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/OpenzalyAdminApplication.java @@ -0,0 +1,37 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ +package com.akaxin.site.web; + +import org.springframework.boot.Banner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * springboot的支持,放在openzaly-boot中 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-05 19:31:16 + */ +@Deprecated +@SpringBootApplication +public class OpenzalyAdminApplication { + + public static void main(String[] args) { + SpringApplication application = new SpringApplication(OpenzalyAdminApplication.class); + application.setBannerMode(Banner.Mode.OFF); + application.run(args); + } +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/bean/WebMessageBean.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/bean/WebMessageBean.java new file mode 100755 index 0000000..cb82f0b --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/bean/WebMessageBean.java @@ -0,0 +1,92 @@ +package com.akaxin.site.web.admin.bean; + +import com.akaxin.common.utils.GsonUtils; + +public class WebMessageBean { + private String siteUserId; + private String siteFriendId; + private String siteGroupId; + private String msgId; + private String webCode; + private int width; + private int height; + private String hrefUrl; + private long msgTime; + + public String getSiteUserId() { + return siteUserId; + } + + public void setSiteUserId(String siteUserId) { + this.siteUserId = siteUserId; + } + + public String getSiteFriendId() { + return siteFriendId; + } + + public void setSiteFriendId(String siteFriendId) { + this.siteFriendId = siteFriendId; + } + + public String getWebCode() { + return webCode; + } + + public void setWebCode(String webCode) { + this.webCode = webCode; + } + + public int getWidth() { + return width; + } + + public void setWidth(int width) { + this.width = width; + } + + public int getHeight() { + return height; + } + + public void setHeight(int height) { + this.height = height; + } + + public String getMsgId() { + return msgId; + } + + public void setMsgId(String msgId) { + this.msgId = msgId; + } + + public long getMsgTime() { + return msgTime; + } + + public void setMsgTime(long msgTime) { + this.msgTime = msgTime; + } + + public String getSiteGroupId() { + return siteGroupId; + } + + public void setSiteGroupId(String siteGroupId) { + this.siteGroupId = siteGroupId; + } + + public String getHrefUrl() { + return hrefUrl; + } + + public void setHrefUrl(String hrefUrl) { + this.hrefUrl = hrefUrl; + } + + public String toString() { + return GsonUtils.toJson(this); + } + +} \ No newline at end of file diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/common/MsgUtils.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/common/MsgUtils.java new file mode 100755 index 0000000..4ecab59 --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/common/MsgUtils.java @@ -0,0 +1,22 @@ +package com.akaxin.site.web.admin.common; + +import org.apache.commons.lang3.StringUtils; + +/** + * 消息工具类 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-25 11:49:21 + */ +public class MsgUtils { + public static String buildU2MsgId(String siteUserid) { + StringBuilder sb = new StringBuilder("U2-"); + if (StringUtils.isNotEmpty(siteUserid)) { + int len = siteUserid.length(); + sb.append(siteUserid.substring(0, len >= 8 ? 8 : len)); + sb.append("-"); + } + sb.append(System.currentTimeMillis()); + return sb.toString(); + } +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/common/Timeutils.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/common/Timeutils.java new file mode 100755 index 0000000..88bdd90 --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/common/Timeutils.java @@ -0,0 +1,16 @@ +package com.akaxin.site.web.admin.common; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.concurrent.TimeUnit; + +public class Timeutils { + //返回前num天的日期 + public static String getDate(Integer num) { + if (num != null && num >= 1) { + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); + return simpleDateFormat.format(new Date(System.currentTimeMillis()-TimeUnit.DAYS.toMillis(num))); + } + return null; + } +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/AbstractController.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/AbstractController.java new file mode 100755 index 0000000..862d09c --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/AbstractController.java @@ -0,0 +1,59 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ +package com.akaxin.site.web.admin.controller; + +import java.util.Map; + +import com.akaxin.common.utils.GsonUtils; +import com.akaxin.proto.core.PluginProto; +import com.akaxin.site.business.impl.site.SiteConfig; + +public class AbstractController { + + protected final int PAGE_SIZE = 20; + + protected final String SUCCESS = "success"; + + protected final String ERROR = "error"; + + protected final String NO_PERMISSION = "no-permission"; + + public boolean isManager(String siteUserId) { + return SiteConfig.isSiteManager(siteUserId); + } + + public boolean isAdmin(String siteUserId) { + return SiteConfig.isSiteSuperAdmin(siteUserId); + } + + public String getRequestSiteUserId(PluginProto.ProxyPluginPackage pluginPackage) { + Map headerMap = pluginPackage.getPluginHeaderMap(); + return headerMap.get(PluginProto.PluginHeaderKey.CLIENT_SITE_USER_ID_VALUE); + } + + @SuppressWarnings("unchecked") + public Map getRequestDataMap(PluginProto.ProxyPluginPackage pluginPackage) { + return GsonUtils.fromJson(pluginPackage.getData(), Map.class); + } + + public String trim(String parameter) { + if (parameter == null) { + return parameter; + } + String trim = parameter.replaceAll("[  ]", ""); + return trim; + } +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/CommomController.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/CommomController.java new file mode 100755 index 0000000..e756602 --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/CommomController.java @@ -0,0 +1,40 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ +package com.akaxin.site.web.admin.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + +@Controller +@RequestMapping("common") +public class CommomController { + + @RequestMapping("success") + public String toSuccessPage() { + return "success"; + } + + @RequestMapping("nopermission") + public String toNoPermissionPage() { + return "success"; + } + + @RequestMapping("error") + public String toErrorPage() { + return "error"; + } + +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/ConfigManageController.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/ConfigManageController.java new file mode 100755 index 0000000..ac68a6f --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/ConfigManageController.java @@ -0,0 +1,282 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.web.admin.controller; + +import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.lang3.StringUtils; +import org.apache.log4j.Level; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +import com.akaxin.common.logs.AkxLog4jManager; +import com.akaxin.common.utils.GsonUtils; +import com.akaxin.proto.core.ConfigProto; +import com.akaxin.proto.core.ConfigProto.ConfigKey; +import com.akaxin.proto.core.PluginProto; +import com.akaxin.site.business.impl.site.SiteConfig; +import com.akaxin.site.web.admin.exception.UserPermissionException; +import com.akaxin.site.web.admin.service.IConfigService; +import com.google.protobuf.InvalidProtocolBufferException; + +/** + * 阿卡信 - 后台管理 - 站点设置 + * + * akaxin 后台管理配置 + * + * @author Sam{@link an.guoyue254@gmail.com} ,Mino + * @since 2018-05-28 14:10:05 + */ +@Controller +@RequestMapping("manage") +public class ConfigManageController extends AbstractController { + private static final Logger logger = LoggerFactory.getLogger(UserManageController.class); + + @Autowired + private IConfigService configManageService; + + @RequestMapping("/index") + public String homePage(@RequestBody byte[] bodyParam) { + PluginProto.ProxyPluginPackage pluginPackage = null; + try { + pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + String siteUserId = getRequestSiteUserId(pluginPackage); + boolean isManager = SiteConfig.isSiteManager(siteUserId); + if (!isManager) { + throw new UserPermissionException("Current user is not a manager"); + } + return "admin"; + } catch (InvalidProtocolBufferException e) { + logger.error("to basic manage error", e); + } catch (UserPermissionException u) { + logger.error("to basic manage error : " + u.getMessage()); + } + return "error"; + } + + // 获取站点配置信息 + @RequestMapping("/basicConfig") + public ModelAndView toSiteConfigPage(@RequestBody byte[] bodyParam) { + + ModelAndView modelAndView = new ModelAndView("basic/config"); + Map model = modelAndView.getModel(); + // 设置默认属性 + PluginProto.ProxyPluginPackage pluginPackage = null; + try { + pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + String siteUserId = getRequestSiteUserId(pluginPackage); + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + if (isAdmin(siteUserId)) { + model.put("manager_type", "admin"); + } else if (isManager(siteUserId)) { + model.put("manager_type", "site_manager"); + } + + // 设置默认值 + model.put("uic_status", "0"); + model.put("pic_size", "1"); + model.put("pic_path", "/akaxin"); + model.put("group_members_count", "100"); + model.put("u2_encryption_status", "1"); + model.put("push_client_status", "0"); + model.put("log_level", "INFO"); + model.put("add_friends_status", "0");// 0表示允许 + model.put("create_groups_status", "0");// 0默认为允许 + model.put("group_qrcode_expire_time", "14");// 群二维码默认两周 + + Map map = configManageService.getSiteConfig(); + Set integers = map.keySet(); + String site_prot = ""; + String site_address = ""; + String http_prot = ""; + String http_address = ""; + for (Integer integer : integers) { + String res = map.get(integer); + switch (integer) { + case ConfigKey.SITE_NAME_VALUE: + model.put("site_name", res); + break; + case ConfigKey.SITE_ADDRESS_VALUE: + site_address = res; + break; + case ConfigKey.SITE_PORT_VALUE: + site_prot = res; + break; + case ConfigKey.SITE_HTTP_ADDRESS_VALUE: + http_address = res; + break; + case ConfigKey.SITE_HTTP_PORT_VALUE: + http_prot = res; + break; + case ConfigKey.SITE_LOGO_VALUE: + model.put("site_logo", res); + break; + case ConfigKey.SITE_INTRODUCTION_VALUE: + model.put("site_desc", res); + break; + case ConfigKey.REALNAME_STATUS_VALUE: + model.put("realName_status", res); + break; + case ConfigKey.INVITE_CODE_STATUS_VALUE: + model.put("uic_status", res); + break; + case ConfigKey.PIC_SIZE_VALUE: + model.put("pic_size", res); + break; + case ConfigKey.PIC_PATH_VALUE: + model.put("pic_path", res); + break; + case ConfigKey.GROUP_MEMBERS_COUNT_VALUE: + model.put("group_members_count", res); + break; + case ConfigKey.U2_ENCRYPTION_STATUS_VALUE: + model.put("u2_encryption_status", res); + break; + case ConfigKey.PUSH_CLIENT_STATUS_VALUE: + model.put("push_client_status", res); + break; + case ConfigKey.LOG_LEVEL_VALUE: + model.put("log_level", res); + break; + case ConfigKey.SITE_MANAGER_VALUE: + model.put("subgenus_admin", res); + break; + case ConfigKey.CONFIG_FRIEND_REQUEST_VALUE: + model.put("add_friends_status", res); + break; + case ConfigKey.CONFIG_CREATE_GROUP_VALUE: + model.put("create_groups_status", res); + break; + case ConfigKey.GROUP_QR_EXPIRE_TIME_VALUE: + model.put("group_qrcode_expire_time", res); + break; + } + + } + model.put("siteAddressAndPort", site_address + ":" + site_prot); + model.put("httpAddressAndPort", http_address + ":" + http_prot); + return modelAndView; + } catch (InvalidProtocolBufferException e) { + logger.error("to basic config page error", e); + } catch (UserPermissionException u) { + logger.error("to basic config page error : " + u.getMessage()); + } + return new ModelAndView("error"); + } + + // 更新站点配置信息 + @SuppressWarnings("unchecked") + @RequestMapping(method = RequestMethod.POST, value = "/updateConfig") + @ResponseBody + public String updateSiteConfig(HttpServletRequest request, @RequestBody byte[] bodyParam) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + + String siteUserId = getRequestSiteUserId(pluginPackage); + + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map dataMap = GsonUtils.fromJson(pluginPackage.getData(), Map.class); + logger.info("siteUserId={} update config={}", siteUserId, dataMap); + Map configMap = new HashMap(); + if (StringUtils.isNotEmpty(trim(dataMap.get("site_name")))) { + configMap.put(ConfigProto.ConfigKey.SITE_NAME_VALUE, trim(dataMap.get("site_name"))); + } + if (StringUtils.isNotEmpty(trim(dataMap.get("site_address")))) { + configMap.put(ConfigProto.ConfigKey.SITE_ADDRESS_VALUE, trim(dataMap.get("site_address"))); + } + if (StringUtils.isNotEmpty(trim(dataMap.get("site_port")))) { + configMap.put(ConfigProto.ConfigKey.SITE_PORT_VALUE, trim(dataMap.get("site_port"))); + } + if (StringUtils.isNotEmpty(trim(dataMap.get("group_members_count")))) { + configMap.put(ConfigProto.ConfigKey.GROUP_MEMBERS_COUNT_VALUE, + trim(dataMap.get("group_members_count"))); + } + if (StringUtils.isNotEmpty(trim(dataMap.get("pic_path")))) { + configMap.put(ConfigProto.ConfigKey.PIC_PATH_VALUE, trim(dataMap.get("pic_path"))); + } + if (StringUtils.isNotEmpty(dataMap.get("site_logo"))) { + configMap.put(ConfigProto.ConfigKey.SITE_LOGO_VALUE, dataMap.get("site_logo")); + } + if (StringUtils.isNotEmpty(dataMap.get("uic_status"))) { + configMap.put(ConfigProto.ConfigKey.INVITE_CODE_STATUS_VALUE, dataMap.get("uic_status")); + } + if (StringUtils.isNotEmpty(dataMap.get("realName_status"))) { + configMap.put(ConfigProto.ConfigKey.REALNAME_STATUS_VALUE, dataMap.get("realName_status")); + } + if (StringUtils.isNotEmpty(dataMap.get("u2_encryption_status"))) { + configMap.put(ConfigProto.ConfigKey.U2_ENCRYPTION_STATUS_VALUE, dataMap.get("u2_encryption_status")); + } + + if (StringUtils.isNotEmpty(dataMap.get("add_friends_status"))) { + configMap.put(ConfigProto.ConfigKey.CONFIG_FRIEND_REQUEST_VALUE, dataMap.get("add_friends_status")); + } + + if (StringUtils.isNotEmpty(dataMap.get("create_groups_status"))) { + configMap.put(ConfigProto.ConfigKey.CONFIG_CREATE_GROUP_VALUE, dataMap.get("create_groups_status")); + } + + if (StringUtils.isNotEmpty(dataMap.get("group_qrcode_expire_time"))) { + configMap.put(ConfigProto.ConfigKey.GROUP_QR_EXPIRE_TIME_VALUE, + dataMap.get("group_qrcode_expire_time")); + } + + if (StringUtils.isNotEmpty(dataMap.get("push_client_status"))) { + configMap.put(ConfigProto.ConfigKey.PUSH_CLIENT_STATUS_VALUE, dataMap.get("push_client_status")); + } + if (StringUtils.isNotEmpty(dataMap.get("log_level"))) { + String logLevel = dataMap.get("log_level"); + configMap.put(ConfigProto.ConfigKey.LOG_LEVEL_VALUE, logLevel); + Level level = Level.INFO; + if ("DEBUG".equalsIgnoreCase(logLevel)) { + level = Level.DEBUG; + } else if ("ERROR".equalsIgnoreCase(logLevel)) { + level = Level.ERROR; + } + // 更新日志级别 + AkxLog4jManager.setLogLevel(level); + } + // 普通管理员无权限 + if (isAdmin(siteUserId) && StringUtils.isNotEmpty(trim(dataMap.get("site_manager")))) { + configMap.put(ConfigProto.ConfigKey.SITE_MANAGER_VALUE, trim(dataMap.get("site_manager"))); + } + if (configManageService.updateSiteConfig(siteUserId, configMap)) { + return SUCCESS; + } + } catch (InvalidProtocolBufferException e) { + logger.error("update site config error", e); + } catch (UserPermissionException u) { + logger.error("update site config error : " + u.getMessage()); + return NO_PERMISSION; + } + return ERROR; + } + +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/GroupManageController.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/GroupManageController.java new file mode 100755 index 0000000..f90fc0c --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/GroupManageController.java @@ -0,0 +1,555 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.web.admin.controller; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +import com.akaxin.common.utils.GsonUtils; +import com.akaxin.proto.core.PluginProto; +import com.akaxin.site.business.dao.UserProfileDao; +import com.akaxin.site.storage.bean.GroupMemberBean; +import com.akaxin.site.storage.bean.GroupProfileBean; +import com.akaxin.site.storage.bean.SimpleGroupBean; +import com.akaxin.site.storage.bean.UserProfileBean; +import com.akaxin.site.web.admin.exception.UserPermissionException; +import com.akaxin.site.web.admin.service.IConfigService; +import com.akaxin.site.web.admin.service.IGroupService; +import com.google.protobuf.InvalidProtocolBufferException; + +/** + * 群组管理控制器 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-17 18:03:07 + */ +@Controller +@RequestMapping("group") +public class GroupManageController extends AbstractController { + private static final Logger logger = LoggerFactory.getLogger(UserManageController.class); + + @Resource(name = "groupManageService") + private IGroupService groupService; + @Autowired + private IConfigService configService; + + // admin.html 为群列表页 + @RequestMapping("/index") + public ModelAndView toGroupIndex(@RequestBody byte[] bodyParam) { + ModelAndView modelAndView = new ModelAndView("group/index"); + PluginProto.ProxyPluginPackage pluginPackage = null; + try { + pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + + String siteUserId = getRequestSiteUserId(pluginPackage); + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + List defaultGroupList = configService.getUserDefaultGroupList(); + ArrayList groupProfileBeans = new ArrayList<>(); + modelAndView.addObject("groupDefaultSize", "0"); + if (defaultGroupList != null && defaultGroupList.size() > 0) { + for (String s : defaultGroupList) { + GroupProfileBean groupProfile = groupService.getGroupProfile(s); + groupProfileBeans.add(groupProfile); + } + modelAndView.addObject("groupList", groupProfileBeans); + modelAndView.addObject("groupDefaultSize", String.valueOf(defaultGroupList.size())); + } + return modelAndView; + } catch (InvalidProtocolBufferException e) { + logger.error("to group index error", e); + } catch (UserPermissionException e) { + logger.error("to group index error : " + e.getMessage()); + } + return new ModelAndView("error"); + } + + @SuppressWarnings("unchecked") + public Map getRequestDataMapObj(PluginProto.ProxyPluginPackage pluginPackage) { + return GsonUtils.fromJson(pluginPackage.getData(), Map.class); + } + + // 跳转到manage界面 + @RequestMapping("manage") + + public ModelAndView toManage(@RequestBody byte[] bodyParams) { + ModelAndView modelAndView = new ModelAndView("group/manage"); + Map model = modelAndView.getModel(); + PluginProto.ProxyPluginPackage pluginPackage = null; + try { + pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParams); + + String siteUserId = getRequestSiteUserId(pluginPackage); + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map reqMap = getRequestDataMap(pluginPackage); + String siteGroupId = reqMap.get("group_id"); + GroupProfileBean groupProfile = groupService.getGroupProfile(siteGroupId); + model.put("group_id", siteGroupId); + model.put("defaultState", groupProfile.getDefaultState()); + return modelAndView; + } catch (InvalidProtocolBufferException e) { + logger.error("to group manage error", e); + } catch (UserPermissionException e) { + logger.error("to group manage error : " + e.getMessage()); + } + return new ModelAndView("error"); + } + + // 跳转到添加群成员界面 + @RequestMapping("/siteUser") + public ModelAndView toAddMember(@RequestBody byte[] bodyParams) { + ModelAndView modelAndView = new ModelAndView("group/addMember"); + Map model = modelAndView.getModel(); + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParams); + String siteUserId = getRequestSiteUserId(pluginPackage); + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map reqMap = getRequestDataMap(pluginPackage); + String siteGroupId = reqMap.get("group_id"); + model.put("siteGroupId", siteGroupId); + return modelAndView; + } catch (InvalidProtocolBufferException e) { + logger.error("to group add error", e); + } catch (UserPermissionException e) { + logger.error("to group add error : " + e.getMessage()); + } + return new ModelAndView("error"); + } + + /** + * 设置用户的默认群组 + * + * @param bodyParams + * @return + */ + @RequestMapping("/setUserDefaultGroup") + @ResponseBody + public String setUserDefaultGroup(@RequestBody byte[] bodyParams) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParams); + String requestSiteUserId = getRequestSiteUserId(pluginPackage); + if (!isManager(requestSiteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map reqMap = getRequestDataMap(pluginPackage); + String siteGroupId = reqMap.get("group_id"); + boolean flag = configService.setUserDefaultGroups(siteGroupId); + if (flag) { + return SUCCESS; + } + } catch (InvalidProtocolBufferException e) { + logger.error("to group add error", e); + } catch (UserPermissionException e) { + logger.error("to group add error : " + e.getMessage()); + return NO_PERMISSION; + } + return ERROR; + } + + @RequestMapping("/deleteUserDefaultGroup") + @ResponseBody + public String deleteUserDefaultGroup(@RequestBody byte[] bodyParams) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParams); + String siteUserId = getRequestSiteUserId(pluginPackage); + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map reqMap = getRequestDataMap(pluginPackage); + String siteGroupId = reqMap.get("group_id"); + boolean flag = configService.deleteUserDefaultGroup(siteGroupId); + if (flag) { + return SUCCESS; + } + } catch (InvalidProtocolBufferException e) { + logger.error("del group default error", e); + } catch (UserPermissionException e) { + logger.error("del group default error : " + e.getMessage()); + return NO_PERMISSION; + } + return ERROR; + } + + @RequestMapping("toMemberList") + public ModelAndView toMemberList(@RequestBody byte[] bodyParams) { + ModelAndView modelAndView = new ModelAndView("group/memberList"); + Map model = modelAndView.getModel(); + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParams); + String siteUserId = getRequestSiteUserId(pluginPackage); + // 增加权限校验 + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map reqMap = getRequestDataMap(pluginPackage); + String siteGroupId = reqMap.get("group_id"); + model.put("siteGroupId", siteGroupId); + return modelAndView; + } catch (InvalidProtocolBufferException e) { + logger.error("to group add error", e); + } catch (UserPermissionException e) { + logger.error("to group add error : " + e.getMessage()); + } + return new ModelAndView("error"); + } + + // 跳转群组资料(群信息页面,修改群信息页面) + @RequestMapping("/profile") + public ModelAndView toGroupProfile(HttpServletRequest request, @RequestBody byte[] bodyParams) { + ModelAndView modelAndView = new ModelAndView("group/profile"); + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParams); + String siteUserId = getRequestSiteUserId(pluginPackage); + + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map reqMap = getRequestDataMap(pluginPackage); + String siteGroupId = reqMap.get("group_id"); + + GroupProfileBean bean = groupService.getGroupProfile(siteGroupId); + modelAndView.addObject("siteGroupId", bean.getGroupId()); + modelAndView.addObject("groupName", bean.getGroupName()); + modelAndView.addObject("groupPhoto", bean.getGroupPhoto()); + modelAndView.addObject("ownerUserId", bean.getCreateUserId()); + modelAndView.addObject("groupNotice", bean.getGroupNotice()); + modelAndView.addObject("groupStatus", bean.getGroupStatus()); + modelAndView.addObject("createTime", bean.getCreateTime()); + return modelAndView; + } catch (InvalidProtocolBufferException e) { + logger.error("to group profile error", e); + } catch (UserPermissionException e) { + logger.error("to group profile error : " + e.getMessage()); + } + return new ModelAndView("error"); + } + + @RequestMapping("/refresh") + @ResponseBody + public Map refreshPage(@RequestBody byte[] bodyParams) { + HashMap dataMap = new HashMap<>(); + PluginProto.ProxyPluginPackage pluginPackage = null; + try { + pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParams); + + String siteUserId = getRequestSiteUserId(pluginPackage); + + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + List defaultGroupList = configService.getUserDefaultGroupList(); + if (defaultGroupList == null || defaultGroupList.size() <= 0) { + dataMap.put("size", 0); + return dataMap; + } + ArrayList> data = new ArrayList<>(); + for (String s : defaultGroupList) { + GroupProfileBean bean = groupService.getGroupProfile(s); + HashMap groupMap = new HashMap<>(); + groupMap.put("siteGroupId", bean.getGroupId()); + groupMap.put("groupName", bean.getGroupName()); + groupMap.put("groupPhoto", bean.getGroupPhoto()); + data.add(groupMap); + } + dataMap.put("size", data.size()); + dataMap.put("data", data); + } catch (InvalidProtocolBufferException e) { + logger.error("refresh group list error", e); + } catch (UserPermissionException e) { + logger.error("refresh group list error : " + e.getMessage()); + } + return dataMap; + } + + @RequestMapping(method = RequestMethod.POST, value = "/list") + @ResponseBody + public Map getGroupList(HttpServletRequest request, @RequestBody byte[] bodyParams) { + Map results = new HashMap(); + boolean nodata = true; + + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParams); + String siteUserId = getRequestSiteUserId(pluginPackage); + + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map reqMap = getRequestDataMap(pluginPackage); + int pageNum = Integer.valueOf(reqMap.get("page")); + List> data = new ArrayList>(); + List groupList = groupService.getGroupList(pageNum, PAGE_SIZE); + if (groupList != null && groupList.size() > 0) { + nodata = false; + List defaultGroupList = configService.getUserDefaultGroupList(); + for (SimpleGroupBean bean : groupList) { + if (defaultGroupList != null && defaultGroupList.size() > 0) { + boolean contains = defaultGroupList.contains(bean.getGroupId()); + if (contains) { + continue; + } + } + + Map groupMap = new HashMap(); + groupMap.put("siteGroupId", bean.getGroupId()); + groupMap.put("groupName", bean.getGroupName()); + groupMap.put("groupPhoto", bean.getGroupPhoto()); + data.add(groupMap); + } + + } + results.put("groupData", data); + } catch (InvalidProtocolBufferException e) { + logger.error("get group list error", e); + } catch (UserPermissionException e) { + logger.error("get group list error : " + e.getMessage()); + } + results.put("loading", nodata); + return results; + } + + @RequestMapping(method = RequestMethod.POST, value = "/updateProfile") + @ResponseBody + public String updateGroupProfile(HttpServletRequest request, @RequestBody byte[] bodyParams) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParams); + String siteUserId = getRequestSiteUserId(pluginPackage); + + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map reqMap = getRequestDataMap(pluginPackage); + GroupProfileBean bean = new GroupProfileBean(); + bean.setGroupId(trim(reqMap.get("siteGroupId"))); + bean.setGroupName(trim(reqMap.get("groupName"))); + bean.setGroupPhoto(trim(reqMap.get("groupPhoto"))); + bean.setGroupNotice(trim(reqMap.get("groupNotice"))); + if (groupService.updateGroupProfile(bean)) { + return SUCCESS; + } + } catch (InvalidProtocolBufferException e) { + logger.error("update group profile error", e); + } catch (UserPermissionException e) { + logger.error("update group profile error : " + e.getMessage()); + return NO_PERMISSION; + } + return ERROR; + } + + @RequestMapping(method = RequestMethod.POST, value = "/groupMember") + @ResponseBody + public Map getGroupMembers(HttpServletRequest request, @RequestBody byte[] bodyParams) { + Map results = new HashMap(); + boolean nodata = true; + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParams); + String siteUserId = getRequestSiteUserId(pluginPackage); + + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map reqMap = getRequestDataMap(pluginPackage); + String siteGroupId = reqMap.get("group_id"); + int pageNum = Integer.valueOf(reqMap.get("page")); + List> data = new ArrayList>(); + + List memberList = groupService.getGroupMembers(siteGroupId, pageNum, PAGE_SIZE); + if (memberList != null && memberList.size() > 0) { + if (PAGE_SIZE == memberList.size()) { + nodata = false; + } + + for (GroupMemberBean bean : memberList) { + Map memberMap = new HashMap(); + memberMap.put("siteUserId", bean.getUserId()); + memberMap.put("userName", bean.getUserName()); + memberMap.put("userPhoto", bean.getUserPhoto()); + memberMap.put("userStatus", bean.getUserStatus()); + memberMap.put("userRole", bean.getUserRole());// 是否为群主 + data.add(memberMap); + } + + } + results.put("groupMemberData", data); + } catch (InvalidProtocolBufferException e) { + logger.error("get group members error", e); + } catch (UserPermissionException e) { + logger.error("get group members error : " + e.getMessage()); + } + + results.put("loading", nodata); + return results; + } + + @RequestMapping(method = RequestMethod.POST, value = "/nonGroupMember") + @ResponseBody + public Map getNonGroupMembers(HttpServletRequest request, @RequestBody byte[] bodyParams) { + Map results = new HashMap(); + boolean nodata = true; + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParams); + String siteUserId = getRequestSiteUserId(pluginPackage); + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map reqMap = getRequestDataMap(pluginPackage); + String siteGroupId = reqMap.get("group_id"); + int pageNum = Integer.valueOf(reqMap.get("page")); + List> data = new ArrayList>(); + + List noMemberList = groupService.getNonGroupMembers(siteGroupId, pageNum, PAGE_SIZE); + for (GroupMemberBean bean : noMemberList) { + if (bean.getUserStatus() == 1) { + noMemberList.remove(bean); + } + } + + if (noMemberList != null && noMemberList.size() > 0) { + if (PAGE_SIZE == noMemberList.size()) { + nodata = false; + } + + for (GroupMemberBean bean : noMemberList) { + Map nonMemberMap = new HashMap(); + nonMemberMap.put("siteUserId", bean.getUserId()); + nonMemberMap.put("userName", bean.getUserName()); + nonMemberMap.put("userPhoto", bean.getUserPhoto()); + nonMemberMap.put("userStatus", bean.getUserStatus()); + nonMemberMap.put("userRole", bean.getUserRole());// 这里全部为非群成员 + data.add(nonMemberMap); + } + + } + results.put("nonGroupMemberData", data); + } catch (InvalidProtocolBufferException e) { + logger.error("get non group members error", e); + } catch (UserPermissionException e) { + logger.error("get non group members error : " + e.getMessage()); + } + + results.put("loading", nodata); + return results; + } + + // 添加群组成员:后台添加,群聊不添加通知消息 + @SuppressWarnings("unchecked") + @RequestMapping(method = RequestMethod.POST, value = "/addGroupMember") + @ResponseBody + public String addGroupMember(HttpServletRequest request, @RequestBody byte[] bodyParams) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParams); + String siteUserId = getRequestSiteUserId(pluginPackage); + + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map reqMap = getRequestDataMapObj(pluginPackage); + String siteGroupId = (String) reqMap.get("siteGroupId"); + List memberList = (List) reqMap.get("groupMembers"); + for (String id : memberList) { + UserProfileBean bean = UserProfileDao.getInstance().getUserProfileById(id); + if (bean.getUserStatus() == 1) { + memberList.remove(id); + } + } + logger.info("siteUserId={} add group={} members={}", siteUserId, siteGroupId, memberList); + + if (groupService.addGroupMembers(siteGroupId, memberList)) { + return SUCCESS; + } + } catch (InvalidProtocolBufferException e) { + logger.error("update group profile error", e); + } catch (UserPermissionException e) { + logger.error("update group profile error : " + e.getMessage()); + return NO_PERMISSION; + } + + return ERROR; + } + + // 添加群组成员:后台添加,群聊不添加通知消息 + @SuppressWarnings("unchecked") + @RequestMapping(method = RequestMethod.POST, value = "/removeGroupMember") + @ResponseBody + public String removeGroupMember(HttpServletRequest request, @RequestBody byte[] bodyParams) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParams); + String siteUserId = getRequestSiteUserId(pluginPackage); + + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map reqMap = getRequestDataMapObj(pluginPackage); + String siteGroupId = (String) reqMap.get("siteGroupId"); + List memberList = (List) reqMap.get("groupMembers"); + if (groupService.removeGroupMembers(siteGroupId, memberList)) { + return SUCCESS; + } + } catch (InvalidProtocolBufferException e) { + logger.error("update group profile error", e); + } catch (UserPermissionException e) { + logger.error("update group profile error : " + e.getMessage()); + return NO_PERMISSION; + } + + return ERROR; + } + + // 解散群聊:逻辑删除 + @RequestMapping(method = RequestMethod.POST, value = "/dissmiss") + @ResponseBody + public String dissmisGroup(HttpServletRequest request, @RequestBody byte[] bodyParams) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParams); + String siteUserId = getRequestSiteUserId(pluginPackage); + + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map reqMap = getRequestDataMap(pluginPackage); + String siteGroupId = reqMap.get("group_id"); + if (groupService.dismissGroup(siteGroupId)) { + return SUCCESS; + } + } catch (InvalidProtocolBufferException e) { + logger.error("update group profile error", e); + } catch (UserPermissionException e) { + logger.error("update group profile error : " + e.getMessage()); + return NO_PERMISSION; + } + + return ERROR; + } +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/MonitorController.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/MonitorController.java new file mode 100755 index 0000000..a229ec8 --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/MonitorController.java @@ -0,0 +1,99 @@ +package com.akaxin.site.web.admin.controller; + +import com.akaxin.common.utils.GsonUtils; +import com.akaxin.proto.core.PluginProto; +import com.akaxin.site.storage.bean.MonitorBean; +import com.akaxin.site.web.admin.common.Timeutils; +import com.akaxin.site.web.admin.exception.UserPermissionException; +import com.akaxin.site.web.admin.service.IMonitorService; +import com.google.protobuf.InvalidProtocolBufferException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +import java.util.Map; + +@Controller +@RequestMapping("monitor") +public class MonitorController extends AbstractController { + private static final Logger logger = LoggerFactory.getLogger(MonitorController.class); + + @Autowired + private IMonitorService monitorService; + + @RequestMapping("/index") + public ModelAndView toMonitor(@RequestBody byte[] bodyParam) { + ModelAndView modelAndView = new ModelAndView("monitor/index"); + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + if (!isManager(getRequestSiteUserId(pluginPackage))) { + throw new UserPermissionException("Current user is not a manager"); + } + Map model = modelAndView.getModel(); + + //转换可选时间 + model.put("data_2", Timeutils.getDate(2)); + model.put("data_3", Timeutils.getDate(3)); + model.put("data_4", Timeutils.getDate(4)); + model.put("data_5", Timeutils.getDate(5)); + model.put("data_6", Timeutils.getDate(6)); + model.put("flag", "success"); + return modelAndView; + } catch (InvalidProtocolBufferException e) { + logger.error("to data report error", e); + } catch (UserPermissionException e) { + logger.error("to data report error : "+e.getMessage()); + } + return new ModelAndView("error"); + } + + @RequestMapping("/refresh") + @ResponseBody + public MonitorBean refresh(@RequestBody byte[] bodyParam) { + PluginProto.ProxyPluginPackage pluginPackage = null; + int registerNum = 0; + int messageNum = 0; + int groupMsgNum = 0; + int u2MsgNum = 0; + int userNum = 0; + int groupNum = 0; + int friendNum = 0; + try { + pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + if (!isManager(getRequestSiteUserId(pluginPackage))) { + throw new UserPermissionException("Current user is not a manager"); + } + + Map uicReqMap = GsonUtils.fromJson(pluginPackage.getData(), Map.class); + Integer day = null; + if (uicReqMap != null) { + + day = Integer.parseInt(uicReqMap.get("dayNum")); + } + if (day == null) { + day = 0; + } + + long now = System.currentTimeMillis(); + registerNum = monitorService.queryNumRegisterPerDay(now, day); + messageNum = monitorService.queryNumMessagePerDay(now, day); + groupMsgNum = monitorService.queryGroupMessagePerDay(now, day); + u2MsgNum = monitorService.queryU2MessagePerDay(now, day); + userNum = monitorService.getSiteUserNum(now, 0); + groupNum = monitorService.getGroupNum(now, 0); + friendNum = monitorService.friendNum(now, 0); + return new MonitorBean(registerNum, messageNum, groupMsgNum, u2MsgNum, userNum, groupNum, friendNum); + + } catch (InvalidProtocolBufferException e) { + logger.error("data report refresh error", e); + } catch (UserPermissionException e) { + logger.error("data report refresh error : "+e.getMessage()); + } + return new MonitorBean(); + } +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/PluginManageController.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/PluginManageController.java new file mode 100755 index 0000000..58ce377 --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/PluginManageController.java @@ -0,0 +1,324 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.web.admin.controller; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.core.PluginProto; +import com.akaxin.site.storage.bean.PluginBean; +import com.akaxin.site.web.admin.exception.UserPermissionException; +import com.akaxin.site.web.admin.service.IPluginService; +import com.google.protobuf.InvalidProtocolBufferException; + +//插件扩展管理 +@Controller +@RequestMapping("plugin") +public class PluginManageController extends AbstractController { + private static final Logger logger = LoggerFactory.getLogger(UserManageController.class); + + @Autowired + private IPluginService pluginService; + + @RequestMapping("/indexPage") + public ModelAndView toPluginIndex(@RequestBody byte[] bodyParam) { + ModelAndView modelAndView = new ModelAndView("plugin/index"); + PluginProto.ProxyPluginPackage pluginPackage = null; + try { + pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + + if (!isManager(getRequestSiteUserId(pluginPackage))) { + throw new UserPermissionException("Current user is not a manager"); + } + return modelAndView; + + } catch (InvalidProtocolBufferException e) { + logger.error("to plugin error", e); + } catch (UserPermissionException e) { + logger.error("to plugin error : " + e.getMessage()); + } + return new ModelAndView("error"); + } + + @RequestMapping("/addPage") + public String toPluginAdd(@RequestBody byte[] bodyParam) { + PluginProto.ProxyPluginPackage pluginPackage = null; + try { + pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + + if (!isManager(getRequestSiteUserId(pluginPackage))) { + throw new UserPermissionException("Current user is not a manager"); + } + return "plugin/add"; + + } catch (InvalidProtocolBufferException e) { + logger.error("to plugin add page error", e); + } catch (UserPermissionException e) { + logger.error("to plugin add page error : " + e.getMessage()); + } + return "error"; + + } + + @RequestMapping("/listPage") + public String toPluginList(@RequestBody byte[] bodyParam) { + PluginProto.ProxyPluginPackage pluginPackage = null; + try { + pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + + if (!isManager(getRequestSiteUserId(pluginPackage))) { + throw new UserPermissionException("Current user is not a manager"); + } + return "plugin/list"; + + } catch (InvalidProtocolBufferException e) { + logger.error("to plugin list error", e); + } catch (UserPermissionException e) { + logger.error("to plugin list error : " + e.getMessage()); + } + return "error"; + } + + @RequestMapping("/editPage") + public ModelAndView toEditPage(@RequestBody byte[] bodyParam) { + ModelAndView modelAndView = new ModelAndView("plugin/update"); + Map model = modelAndView.getModel(); + PluginProto.ProxyPluginPackage pluginPackage = null; + try { + pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + + String siteUserId = getRequestSiteUserId(pluginPackage); + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + // 解析Plugin_id + int authKeyState = 1; + String data = pluginPackage.getData(); + String[] split = data.split(":\""); + String res = split[1].replaceAll("\"}", ""); + PluginBean plugin = pluginService.getPlugin(Integer.valueOf(res)); + model.put("name", plugin.getName()); + model.put("url_page", plugin.getUrlPage()); + model.put("api_url", plugin.getApiUrl()); + model.put("plugin_icon", plugin.getIcon()); + model.put("order", plugin.getSort()); + model.put("allow_ip", plugin.getAllowedIp()); + model.put("position", plugin.getPosition()); + model.put("per_status", plugin.getPermissionStatus()); + model.put("display_mode", plugin.getDisplayMode()); + model.put("plugin_id", plugin.getId()); + model.put("auth_key", plugin.getAuthKey()); + // 如果是默认添加的扩展则不提供修改authkey设置 + if (plugin.getId() == 1 || plugin.getId() == 2) { + authKeyState = 0; + } + model.put("authKeyState", authKeyState); + return modelAndView; + } catch (InvalidProtocolBufferException e) { + logger.error("to plugin error", e); + } catch (UserPermissionException e) { + logger.error("to plugin error : " + e.getMessage()); + } + return new ModelAndView("error"); + } + + // 增加新扩展 + @RequestMapping(method = RequestMethod.POST, value = "/addPlugin") + @ResponseBody + public String addPlugin(HttpServletRequest request, @RequestBody byte[] bodyParam) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + + String siteUserId = getRequestSiteUserId(pluginPackage); + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map pluginData = getRequestDataMap(pluginPackage); + PluginBean bean = new PluginBean(); + bean.setName(trim(pluginData.get("name"))); + bean.setIcon(pluginData.get("plugin_icon")); + bean.setUrlPage(trim(pluginData.get("url_page"))); + bean.setApiUrl(trim(pluginData.get("api_url"))); + bean.setAllowedIp(trim(pluginData.get("allow_ip"))); + bean.setPosition(Integer.valueOf(pluginData.get("position"))); + bean.setSort(Integer.valueOf(pluginData.get("order"))); + bean.setDisplayMode(PluginProto.PluginDisplayMode.NEW_PAGE_VALUE); + bean.setPermissionStatus(Integer.valueOf(pluginData.get("per_status"))); + bean.setDisplayMode(Integer.valueOf(pluginData.get("display_mode"))); + bean.setAddTime(System.currentTimeMillis()); + bean.setAuthKey(StringHelper.generateRandomString(16));// 随机生成 + + logger.info("siteUserId={} add new plugin bean={}", siteUserId, bean); + if (pluginService.addNewPlugin(bean)) { + return SUCCESS; + } + } catch (InvalidProtocolBufferException e) { + logger.error("add new plugin controller error", e); + } catch (UserPermissionException e) { + logger.error("add new plugin controller error : " + e.getMessage()); + return NO_PERMISSION; + } + + return ERROR; + } + + // 获取扩展列表 + @RequestMapping(method = RequestMethod.POST, value = "/pluginList") + @ResponseBody + public Map getPluginList(HttpServletRequest request, @RequestBody byte[] bodyParam) { + Map result = new HashMap(); + boolean nodata = true;// 是还有更多数据 + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + String siteUserId = getRequestSiteUserId(pluginPackage); + + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map dataMap = getRequestDataMap(pluginPackage); + int pageNum = Integer.valueOf(dataMap.get("page")); + List pluginList = pluginService.getPluginList(pageNum, PAGE_SIZE); + List> data = new ArrayList>(); + if (pluginList != null) { + if (PAGE_SIZE == pluginList.size()) { + nodata = false; + } + for (PluginBean bean : pluginList) { + Map pluginMap = new HashMap(); + pluginMap.put("plugin_id", bean.getId()); + pluginMap.put("name", bean.getName()); + pluginMap.put("plugin_icon", bean.getIcon()); + pluginMap.put("url_page", bean.getUrlPage()); + pluginMap.put("api_url", bean.getApiUrl()); + pluginMap.put("position", bean.getPosition()); + pluginMap.put("order", bean.getSort()); + pluginMap.put("per_status", bean.getPermissionStatus()); + pluginMap.put("allow_ip", bean.getAllowedIp()); + // add to list + data.add(pluginMap); + } + } + result.put("pluginData", pluginList); + } catch (InvalidProtocolBufferException e) { + logger.error("get plugin list error", e); + } catch (UserPermissionException e) { + logger.error("get plugin list error : " + e.getMessage()); + } + + result.put("loading", nodata); + return result; + } + + // 编辑扩展 + @RequestMapping(method = RequestMethod.POST, value = "/editPlugin") + @ResponseBody + + public String editPlugin(HttpServletRequest request, @RequestBody byte[] bodyParam) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + String siteUserId = getRequestSiteUserId(pluginPackage); + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map pluginData = getRequestDataMap(pluginPackage); + PluginBean bean = new PluginBean(); + bean.setId(Integer.valueOf(trim(pluginData.get("plugin_id")))); + bean.setName(trim(pluginData.get("name"))); + bean.setIcon(pluginData.get("plugin_icon")); + bean.setUrlPage(trim(pluginData.get("url_page"))); + bean.setApiUrl(trim(pluginData.get("api_url"))); + + bean.setSort(Integer.valueOf(pluginData.get("order"))); + bean.setPosition(Integer.valueOf(pluginData.get("position"))); + bean.setDisplayMode(Integer.valueOf(pluginData.get("display_mode"))); + bean.setPermissionStatus(Integer.valueOf(pluginData.get("per_status"))); + + bean.setAllowedIp(trim(pluginData.get("allow_ip"))); + if (pluginService.updatePlugin(bean)) { + return SUCCESS; + } + } catch (InvalidProtocolBufferException e) { + logger.error("edit plugin error", e); + } catch (UserPermissionException e) { + logger.error("edit plugin error : " + e.getMessage()); + return NO_PERMISSION; + } + + return ERROR; + } + + @RequestMapping(method = RequestMethod.POST, value = "/delPlugin") + @ResponseBody + public String deletePlugin(HttpServletRequest request, @RequestBody byte[] bodyParam) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + String siteUserId = getRequestSiteUserId(pluginPackage); + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map dataMap = getRequestDataMap(pluginPackage); + int pluginId = Integer.valueOf(dataMap.get("plugin_id")); + + if (pluginService.deletePlugin(pluginId)) { + return SUCCESS; + } + } catch (InvalidProtocolBufferException e) { + logger.error("edit plugin error", e); + } catch (UserPermissionException e) { + logger.error("edit plugin error : " + e.getMessage()); + return NO_PERMISSION; + } + return ERROR; + } + + @RequestMapping(method = RequestMethod.POST, value = "/reSet") + @ResponseBody + public String reSetAuthKey(HttpServletRequest request, @RequestBody byte[] bodyParam) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + String siteUserId = getRequestSiteUserId(pluginPackage); + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map dataMap = getRequestDataMap(pluginPackage); + int pluginId = Integer.valueOf(dataMap.get("plugin_id")); + String authKey = pluginService.reSetAuthKey(pluginId); + return authKey; + } catch (InvalidProtocolBufferException e) { + logger.error("edit plugin error", e); + } catch (UserPermissionException e) { + logger.error("edit plugin error : " + e.getMessage()); + return NO_PERMISSION; + } + + return ERROR; + } +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/UICManageController.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/UICManageController.java new file mode 100755 index 0000000..4e745cd --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/UICManageController.java @@ -0,0 +1,165 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ +package com.akaxin.site.web.admin.controller; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; + +import com.akaxin.site.web.admin.exception.UserPermissionException; +import com.google.protobuf.InvalidProtocolBufferException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +import com.akaxin.common.utils.GsonUtils; +import com.akaxin.proto.core.PluginProto; +import com.akaxin.site.business.impl.site.SiteConfig; +import com.akaxin.site.storage.bean.UicBean; +import com.akaxin.site.web.admin.service.IUICService; + +//邀请码管理 +@Controller +@RequestMapping("uic") +public class UICManageController extends AbstractController { + private static final Logger logger = LoggerFactory.getLogger(UserManageController.class); + private static final int UIC_PAGE_SIZE = 20; + + @Autowired + private IUICService uicServer; + + @RequestMapping("/index") + public ModelAndView toUICIndex(@RequestBody byte[] bodyParam) { + ModelAndView modelAndView = new ModelAndView("uic/index"); + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + if (!isManager(getRequestSiteUserId(pluginPackage))) { + throw new UserPermissionException("Current user is not a manager"); + } + return modelAndView; + } catch (InvalidProtocolBufferException e) { + logger.error("to Uic error", e); + } catch (UserPermissionException e) { + logger.error("to Uic error : "+e.getMessage()); + } + return new ModelAndView("error"); + } + + @RequestMapping("/unused") + public String toUnUsed(@RequestBody byte[] bodyParam) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + if (!isManager(getRequestSiteUserId(pluginPackage))) { + throw new UserPermissionException("Current user is not a manager"); + } + return "uic/unused_list"; + } catch (InvalidProtocolBufferException e) { + logger.error("get unused list error", e); + } catch (UserPermissionException e) { + logger.error("get unused list error : "+e.getMessage()); + } + return "error"; + } + + @RequestMapping("/used") + public String toused(@RequestBody byte[] bodyParam) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + if (!isManager(getRequestSiteUserId(pluginPackage))) { + throw new UserPermissionException("Current user is not a manager"); + } + return "uic/used_list"; + } catch (InvalidProtocolBufferException e) { + logger.error("get used list error",e); + } catch (UserPermissionException e) { + logger.error("get used list error : "+e.getMessage()); + } + return "error"; + } + + @RequestMapping(method = RequestMethod.POST, value = "/addUic") + @ResponseBody + public String addNewUIC(HttpServletRequest request, @RequestBody byte[] bodyParam) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + Map headerMap = pluginPackage.getPluginHeaderMap(); + String siteUserId = headerMap.get(PluginProto.PluginHeaderKey.CLIENT_SITE_USER_ID_VALUE); + boolean isManager = SiteConfig.isSiteManager(siteUserId); + if (!isManager) { + throw new UserPermissionException("Current user is not a manager"); + } + return uicServer.addUIC(100, 16) ? SUCCESS : ERROR; + } catch (InvalidProtocolBufferException e) { + logger.error("add new uic error", e); + } catch (UserPermissionException e) { + logger.error("add new uic error : "+e.getMessage()); + return NO_PERMISSION; + } + + return ERROR; + } + + @SuppressWarnings("unchecked") + @RequestMapping(method = RequestMethod.POST, value = "/uicList") + @ResponseBody + public Map getUICList(HttpServletRequest request, @RequestBody byte[] bodyParam) { + Map results = new HashMap(); + boolean nodata = true; + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + Map headerMap = pluginPackage.getPluginHeaderMap(); + String siteUserId = headerMap.get(PluginProto.PluginHeaderKey.CLIENT_SITE_USER_ID_VALUE); + boolean isManager = SiteConfig.isSiteManager(siteUserId); + if (!isManager) { + throw new UserPermissionException("Current user is not a manager"); + } + Map uicReqMap = GsonUtils.fromJson(pluginPackage.getData(), Map.class); + + int pageNum = Integer.valueOf(uicReqMap.get("page")); + int status = Integer.valueOf(uicReqMap.get("code_status")); + List uicList = uicServer.getUsedUicList(pageNum, UIC_PAGE_SIZE, status); + List> data = new ArrayList>(); + if (uicList != null && uicList.size() > 0) { + if (UIC_PAGE_SIZE == uicList.size()) { + nodata = false; + } + for (UicBean bean : uicList) { + Map uicMap = new HashMap(); + uicMap.put("uic", bean.getUic()); + uicMap.put("siteUserName", bean.getUserName()); + data.add(uicMap); + } + } + results.put("uicData", data); + } catch (InvalidProtocolBufferException e) { + logger.error("get used uic list error", e); + } catch (UserPermissionException e) { + logger.error("get used uic list error : "+e.getMessage()); + } + results.put("loading", nodata); + return results; + } + +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/UserManageController.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/UserManageController.java new file mode 100755 index 0000000..d9947b2 --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/UserManageController.java @@ -0,0 +1,465 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.web.admin.controller; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.core.PluginProto; +import com.akaxin.proto.core.UserProto.UserStatus; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.UserProfileBean; +import com.akaxin.site.web.admin.exception.ManagerException; +import com.akaxin.site.web.admin.exception.UserPermissionException; +import com.akaxin.site.web.admin.service.IConfigService; +import com.akaxin.site.web.admin.service.IUserService; +import com.google.protobuf.InvalidProtocolBufferException; + +/** + * 后台管理-用户管理 + */ +@Controller +@RequestMapping("user") +public class UserManageController extends AbstractController { + private static final Logger logger = LoggerFactory.getLogger(UserManageController.class); + + @Resource(name = "userManageService") + private IUserService userService; + @Autowired + private IConfigService configService; + + // 进入用户管理首页 + @RequestMapping("/index") + public ModelAndView toIndex(@RequestBody byte[] bodyParam) { + ModelAndView modelAndView = new ModelAndView("user/index"); + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + if (!isManager(getRequestSiteUserId(pluginPackage))) { + throw new UserPermissionException("Current user is not a manager"); + } + List defaultFriendList = configService.getUserDefaultFriendList(); + List userProfileBeans = new ArrayList<>(); + modelAndView.addObject("userDefaultSize", "0"); + if (defaultFriendList != null && defaultFriendList.size() > 0) { + for (String siteUserId : defaultFriendList) { + UserProfileBean userProfile = userService.getUserProfile(siteUserId); + userProfileBeans.add(userProfile); + } + modelAndView.addObject("userList", userProfileBeans); + modelAndView.addObject("userDefaultSize", String.valueOf(defaultFriendList.size())); + } + return modelAndView; + } catch (InvalidProtocolBufferException e) { + logger.error("to User Manage error", e); + } catch (UserPermissionException e) { + logger.error("to User Manage error : " + e.getMessage()); + } + return new ModelAndView("error"); + } + + /** + * 设置官方用户,默认为所有新用户的好友 + * + * @param bodyParam + * @return + */ + @RequestMapping("/setUserDefaultFriend") + @ResponseBody + public String setUserDefaultFriend(@RequestBody byte[] bodyParam) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + if (!isManager(getRequestSiteUserId(pluginPackage))) { + throw new UserPermissionException("Current user is not a manager"); + } + Map reqMap = getRequestDataMap(pluginPackage); + String friendSiteUserId = reqMap.get("siteUserId"); + boolean result = configService.setUserDefaultFriends(friendSiteUserId); + if (result) { + return SUCCESS; + } + } catch (InvalidProtocolBufferException e) { + logger.error("set user as default friend error", e); + } catch (UserPermissionException e) { + logger.error("set user as default friend error", e); + return NO_PERMISSION; + } catch (Exception e) { + logger.error("set user as default friend error", e); + } + return ERROR; + } + + @RequestMapping("/deleteUserDefaultFriend") + @ResponseBody + public String deleteUserDefaultFriend(@RequestBody byte[] bodyParam) { + try { + logger.info("siteUserId={} deleteUserDefaultFriend userId={} "); + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + String siteUserId = getRequestSiteUserId(pluginPackage); + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map reqMap = getRequestDataMap(pluginPackage); + String friendSiteUserId = reqMap.get("siteUserId"); + boolean flag = configService.deleteUserDefaultFriends(friendSiteUserId); + + logger.info("siteUserId={} deleteUserDefaultFriend userId={} ", siteUserId, friendSiteUserId); + if (flag) { + return SUCCESS; + } + } catch (InvalidProtocolBufferException e) { + logger.error("delete user as default friend error ", e); + } catch (UserPermissionException e) { + logger.error("delete user as default friend error : ", e); + return NO_PERMISSION; + } catch (Exception e) { + logger.error("delete user as default friend error", e); + } + return ERROR; + } + + /** + * 设置用户为管理员 + * + * @param bodyParam + * @return + */ + @RequestMapping("/setSiteManager") + @ResponseBody + public String setSiteManager(@RequestBody byte[] bodyParam) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + if (!isAdmin(getRequestSiteUserId(pluginPackage))) { + throw new UserPermissionException("Current user is not admin"); + } + Map reqMap = getRequestDataMap(pluginPackage); + String managerUserId = reqMap.get("siteUserId"); + boolean result = configService.addUserManager(managerUserId); + if (result) { + return SUCCESS; + } + } catch (InvalidProtocolBufferException e) { + logger.error("set site manager error : ", e.getMessage()); + } catch (UserPermissionException e) { + logger.error("set site manager error : " + e.getMessage()); + return NO_PERMISSION; + } + return ERROR; + } + + /** + * 删除用户管理员身份 + * + * @param bodyParam + * @return + */ + @RequestMapping("/deleteSiteManager") + @ResponseBody + public String deleteSiteManager(@RequestBody byte[] bodyParam) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + if (!isAdmin(getRequestSiteUserId(pluginPackage))) { + throw new UserPermissionException("Current user is not admin"); + } + Map reqMap = getRequestDataMap(pluginPackage); + String managerUserId = reqMap.get("siteUserId"); + boolean result = configService.deleteUserManager(managerUserId); + if (result) { + return SUCCESS; + } + } catch (InvalidProtocolBufferException e) { + logger.error("delete site manager error : ", e.getMessage()); + } catch (UserPermissionException e) { + logger.error("delete site manager error : " + e.getMessage()); + return NO_PERMISSION; + } + return ERROR; + } + + // 用户个人资料展示界面,此界面编辑用户资料,并执行更新 + @RequestMapping("/profile") + public ModelAndView toUserProfile(HttpServletRequest request, @RequestBody byte[] bodyParam) { + ModelAndView modelAndView = new ModelAndView("user/profile"); + + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + String currentUserId = getRequestSiteUserId(pluginPackage); + + if (!isManager(currentUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + + Map reqMap = getRequestDataMap(pluginPackage); + String siteUserId = reqMap.get("site_user_id"); + UserProfileBean bean = userService.getUserProfile(siteUserId); + + modelAndView.addObject("siteUserId", bean.getSiteUserId()); + modelAndView.addObject("siteLoginId", bean.getSiteLoginId()); + modelAndView.addObject("userName", bean.getUserName()); + modelAndView.addObject("userPhoto", bean.getUserPhoto()); + modelAndView.addObject("userIntroduce", bean.getSelfIntroduce()); + modelAndView.addObject("userStatus", bean.getUserStatus()); + modelAndView.addObject("regTime", bean.getRegisterTime()); + modelAndView.addObject("defaultState", bean.getDefaultState()); + boolean isManager = isManager(siteUserId); + modelAndView.addObject("managerState", isManager ? 1 : 0); + return modelAndView; + } catch (InvalidProtocolBufferException e) { + logger.error(StringHelper.format("siteUserId={} get user profile error"), e); + } catch (UserPermissionException e) { + logger.error("get user profile error : " + e.getMessage()); + } + return new ModelAndView("error"); + } + + @RequestMapping("/refresh") + @ResponseBody + public Map refreshPage(@RequestBody byte[] bodyParam) { + HashMap dataMap = new HashMap<>(); + + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + if (!isManager(getRequestSiteUserId(pluginPackage))) { + throw new UserPermissionException("Current user is not a manager"); + } + List userDefault = configService.getUserDefaultFriendList(); + if (userDefault == null || userDefault.size() <= 0) { + dataMap.put("size", 0); + return dataMap; + } + ArrayList> data = new ArrayList<>(); + for (String s : userDefault) { + UserProfileBean bean = userService.getUserProfile(s); + HashMap userMap = new HashMap<>(); + userMap.put("siteUserId", bean.getSiteUserId()); + userMap.put("userName", bean.getUserName()); + userMap.put("userPhoto", bean.getUserPhoto()); + userMap.put("userStatus", bean.getUserStatus()); + data.add(userMap); + } + dataMap.put("size", data.size()); + dataMap.put("data", data); + } catch (InvalidProtocolBufferException e) { + logger.error("refresh user list error", e); + } catch (UserPermissionException e) { + logger.error("refresh user list error : " + e.getMessage()); + } + + return dataMap; + } + + @RequestMapping(method = RequestMethod.POST, value = "/userList") + @ResponseBody + public Map getSiteUsers(HttpServletRequest request, @RequestBody byte[] bodyParam) { + Map results = new HashMap(); + boolean nodata = true; + + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + String siteUserId = getRequestSiteUserId(pluginPackage); + + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map dataMap = getRequestDataMap(pluginPackage); + int pageNum = Integer.valueOf(dataMap.get("page")); + + List> data = new ArrayList>(); + List userList = userService.getUserList(pageNum, PAGE_SIZE); + if (userList != null && userList.size() > 0) { + nodata = false; + + List defaultFriendList = configService.getUserDefaultFriendList(); + if (defaultFriendList != null && defaultFriendList.size() > 0) { + for (SimpleUserBean bean : userList) { + boolean contains = defaultFriendList.contains(bean.getUserId()); + Map userMap = new HashMap(); + if (contains) { + continue; + } + userMap.put("siteUserId", bean.getUserId()); + userMap.put("siteLoginId", bean.getSiteLoginId()); + userMap.put("userName", bean.getUserName()); + userMap.put("userPhoto", bean.getUserPhoto()); + userMap.put("userStatus", bean.getUserStatus()); + + data.add(userMap); + } + } else { + for (SimpleUserBean bean : userList) { + Map userMap = new HashMap(); + userMap.put("siteUserId", bean.getUserId()); + userMap.put("siteLoginId", bean.getSiteLoginId()); + userMap.put("userName", bean.getUserName()); + userMap.put("userPhoto", bean.getUserPhoto()); + userMap.put("userStatus", bean.getUserStatus()); + + data.add(userMap); + } + } + + } + + results.put("userData", data); + + } catch (InvalidProtocolBufferException e) { + logger.error("get site user list error", e); + } catch (UserPermissionException e) { + logger.error("get site user list error : " + e.getMessage()); + } + results.put("loading", nodata); + return results; + } + + @RequestMapping(method = RequestMethod.POST, value = "/updateProfile") + @ResponseBody + public String updateProfile(HttpServletRequest request, @RequestBody byte[] bodyParam) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + String siteUserId = getRequestSiteUserId(pluginPackage); + + // 权限控制 + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + + // 参数校验 + Map reqMap = getRequestDataMap(pluginPackage); + String toUserId = reqMap.get("siteUserId"); + String siteLoginId = reqMap.get("siteLoginId"); + String userName = trim(reqMap.get("userName")); + + if (StringUtils.isEmpty(toUserId)) { + throw new UserPermissionException("update user's siteUserId is null"); + } + + if (StringUtils.isNotEmpty(userName) && userName.length() > 16) { + throw new ManagerException("userName={} length={} longer than [1,16] error"); + } + + if (StringUtils.isNotEmpty(siteLoginId)) { + Matcher match = Pattern.compile("^[A-Za-z][A-Za-z0-9]{0,15}$").matcher(siteLoginId); + if (!match.matches()) { + throw new ManagerException("user's siteLoginId formatting error"); + } + } + + UserProfileBean originalBean = userService.getUserProfile(toUserId); + if (originalBean == null || StringUtils.isEmpty(originalBean.getSiteUserId())) { + throw new UserPermissionException("update user's profile is null from DB"); + } + + UserProfileBean bean = new UserProfileBean(); + bean.setSiteUserId(toUserId); + bean.setSiteLoginId(siteLoginId); + bean.setUserName(userName); + bean.setUserPhoto(trim(reqMap.get("userPhoto"))); + bean.setSelfIntroduce(trim(reqMap.get("userIntroduce"))); + + boolean result = userService.updateProfile(bean); + logger.info( + "siteUserId={} update user={} \n\t userName/nickName:{} -> {} \n\t siteLoginId:{} -> {} \n\t userPhoto:{} -> {}", + siteUserId, toUserId, originalBean.getUserName(), bean.getUserName(), originalBean.getSiteLoginId(), + bean.getSiteLoginId(), originalBean.getUserPhoto(), bean.getUserPhoto()); + + return result ? SUCCESS : ERROR; + + } catch (InvalidProtocolBufferException e) { + logger.error("update profile error", e); + } catch (UserPermissionException e) { + logger.error("update profile error : " + e.getMessage()); + return NO_PERMISSION; + } catch (ManagerException e) { + logger.error("update profile error:" + e.getMessage()); + } + + return ERROR; + } + + @RequestMapping(method = RequestMethod.POST, value = "/sealup") + @ResponseBody + public String sealup(HttpServletRequest request, @RequestBody byte[] bodyParam) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + String siteUserId = getRequestSiteUserId(pluginPackage); + + if (!isManager(siteUserId)) { + throw new UserPermissionException("Current user is not a manager"); + } + Map reqMap = getRequestDataMap(pluginPackage); + String reqUserId = reqMap.get("site_user_id"); + String reqStatus = reqMap.get("user_status"); + int status = UserStatus.NORMAL_VALUE; + if ("1".equals(reqStatus)) { + status = UserStatus.SEALUP_VALUE; + } + + logger.info("siteUserId={} sealup siteUserId={} to status={}", siteUserId, reqUserId, status); + if (userService.sealUpUser(reqUserId, status)) { + return SUCCESS; + } + } catch (InvalidProtocolBufferException e) { + logger.error("sealup user error", e); + } catch (UserPermissionException e) { + logger.error("sealup user error : ", e); + return NO_PERMISSION; + } catch (Exception e) { + logger.error("sealup user error : ", e); + } + return ERROR; + } + + @RequestMapping(method = RequestMethod.POST, value = "delUser") + @ResponseBody + public String deleteUser(HttpServletRequest request, @RequestBody byte[] bodyParam) { + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + String siteUserId = getRequestSiteUserId(pluginPackage); + + if (isManager(siteUserId)) { + Map reqMap = getRequestDataMap(pluginPackage); + String delUserID = reqMap.get("siteUserId"); + if (userService.delUser(delUserID)) { + return SUCCESS; + } + } else { + return NO_PERMISSION; + } + } catch (Exception e) { + logger.error("del User error", e); + } + return ERROR; + } + +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/UserSquareController.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/UserSquareController.java new file mode 100755 index 0000000..c878211 --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/controller/UserSquareController.java @@ -0,0 +1,145 @@ +package com.akaxin.site.web.admin.controller; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +import com.akaxin.common.utils.GsonUtils; +import com.akaxin.proto.core.PluginProto; +import com.akaxin.proto.core.UserProto; +import com.akaxin.site.business.dao.UserFriendDao; +import com.akaxin.site.business.impl.notice.User2Notice; +import com.akaxin.site.business.push.PushNotification; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.UserProfileBean; +import com.akaxin.site.web.admin.service.IUserService; +import com.google.protobuf.InvalidProtocolBufferException; + +/** + * 用户广场 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-12 18:24:29 + */ +@Controller +@RequestMapping("userSquare") +public class UserSquareController extends AbstractController { + private static final Logger logger = LoggerFactory.getLogger(UserManageController.class); + + @Resource(name = "userManageService") + private IUserService userService; + + @RequestMapping("/index") + public ModelAndView toIndex(@RequestBody byte[] bodyParam) { + ModelAndView modelAndView = new ModelAndView("siteMember/siteMember"); + Map model = modelAndView.getModel(); + PluginProto.ProxyPluginPackage pluginPackage = null; + try { + pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + Map headerMap = pluginPackage.getPluginHeaderMap(); + String siteUserId = headerMap.get(PluginProto.PluginHeaderKey.CLIENT_SITE_USER_ID_VALUE); + UserProfileBean userProfile = userService.getUserProfile(siteUserId); + model.put("site_user_id", siteUserId); + model.put("site_user_name", userProfile.getUserName()); + } catch (InvalidProtocolBufferException e) { + logger.error("to user square error", e); + return new ModelAndView("siteMember/error"); + } + + return modelAndView; + } + + @SuppressWarnings("unchecked") + @RequestMapping(method = RequestMethod.POST, value = "/pullMemberList") + @ResponseBody + public Map getMemberList(HttpServletRequest request, @RequestBody byte[] bodyParam) { + Map results = new HashMap(); + boolean nodata = true; + int pageSize = 20; + try { + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + Map headerMap = pluginPackage.getPluginHeaderMap(); + String siteUserId = headerMap.get(PluginProto.PluginHeaderKey.CLIENT_SITE_USER_ID_VALUE); + + Map ReqMap = GsonUtils.fromJson(pluginPackage.getData(), Map.class); + + int pageNum = Integer.valueOf(ReqMap.get("pageNum")); + List userList = userService.getUserList(pageNum, pageSize); + List> data = new ArrayList>(); + if (userList != null && userList.size() > 0) { + nodata = false; + for (SimpleUserBean bean : userList) { + Map memberMap = new HashMap(); + if (siteUserId != bean.getUserId()) { + memberMap.put("site_user_id", bean.getUserId()); + memberMap.put("site_user_name", bean.getUserName()); + memberMap.put("site_user_photo", bean.getUserPhoto()); + UserProto.UserRelation userRelation = UserFriendDao.getInstance().getUserRelation(siteUserId, + bean.getUserId()); + memberMap.put("site_user_relation", String.valueOf(userRelation.getNumber())); + } + data.add(memberMap); + } + } + results.put("Data", data); + + } catch (Exception e) { + logger.error("get Member list error", e); + } + results.put("loading", nodata); + return results; + } + + @RequestMapping("/applyFriend") + @ResponseBody + public String[] applyFriend(@RequestBody byte[] bodyParam) { + PluginProto.ProxyPluginPackage pluginPackage = null; + try { + pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(bodyParam); + Map headerMap = pluginPackage.getPluginHeaderMap(); + String siteUserId = headerMap.get(PluginProto.PluginHeaderKey.CLIENT_SITE_USER_ID_VALUE); + Map ReqMap = GsonUtils.fromJson(pluginPackage.getData(), Map.class); + String friendSiteUserId = ReqMap.get("site_user_id"); + String apply_reason = ReqMap.get("apply_reason"); + if (StringUtils.isBlank(siteUserId)) { + return new String[] { "添加失败", "0" }; + } else if (siteUserId.equals(friendSiteUserId)) { + + } else { + int applyTimes = UserFriendDao.getInstance().getApplyCount(friendSiteUserId, siteUserId); + if (applyTimes >= 5) { + return new String[] { "失败,次数过多", "0" }; + + } else { + if (UserFriendDao.getInstance().saveFriendApply(siteUserId, friendSiteUserId, apply_reason)) { + new User2Notice().applyFriendNotice(siteUserId, friendSiteUserId); + // 同时下发一条PUSH消息 + if (applyTimes < 2) { + PushNotification.sendAddFriend(siteUserId, friendSiteUserId); + } + return new String[] { "成功", friendSiteUserId }; + } + } + } + } catch (InvalidProtocolBufferException e) { + logger.error("Friend apply error.", e); + } + return new String[] { "添加失败", "0" }; + + } + +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/exception/ManagerException.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/exception/ManagerException.java new file mode 100755 index 0000000..27b4a55 --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/exception/ManagerException.java @@ -0,0 +1,18 @@ +package com.akaxin.site.web.admin.exception; + +import com.akaxin.common.utils.StringHelper; + +public class ManagerException extends Throwable { + /** + * + */ + private static final long serialVersionUID = -5303021403604515796L; + + public ManagerException(String message) { + super(message); + } + + public ManagerException(String messageParttern, Object... obs) { + this(StringHelper.format(messageParttern, obs)); + } +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/exception/UserPermissionException.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/exception/UserPermissionException.java new file mode 100755 index 0000000..3cf282e --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/exception/UserPermissionException.java @@ -0,0 +1,12 @@ +package com.akaxin.site.web.admin.exception; + +public class UserPermissionException extends Exception { + /** + * + */ + private static final long serialVersionUID = -5303021403604515796L; + + public UserPermissionException(String message) { + super(message); + } +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IConfigService.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IConfigService.java new file mode 100755 index 0000000..5b6de2c --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IConfigService.java @@ -0,0 +1,27 @@ +package com.akaxin.site.web.admin.service; + +import java.util.List; +import java.util.Map; + +public interface IConfigService { + + Map getSiteConfig(); + + boolean updateSiteConfig(String siteUserId, Map config); + + boolean addUserManager(String siteUserId); + + boolean deleteUserManager(String siteUserId); + + boolean setUserDefaultFriends(String siteUserId); + + boolean deleteUserDefaultFriends(String siteUserId); + + boolean setUserDefaultGroups(String siteGroupId); + + boolean deleteUserDefaultGroup(String siteGroupId); + + List getUserDefaultFriendList(); + + List getUserDefaultGroupList(); +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IGroupService.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IGroupService.java new file mode 100755 index 0000000..14cbb12 --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IGroupService.java @@ -0,0 +1,32 @@ +package com.akaxin.site.web.admin.service; + +import java.util.List; + +import com.akaxin.site.storage.bean.GroupMemberBean; +import com.akaxin.site.storage.bean.GroupProfileBean; +import com.akaxin.site.storage.bean.SimpleGroupBean; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-17 18:46:55 + */ +public interface IGroupService { + + GroupProfileBean getGroupProfile(String siteGroupId); + + boolean updateGroupProfile(GroupProfileBean bean); + + List getGroupList(int pageNum, int pageSize); + + List getGroupMembers(String siteGroupId, int pageNum, int pageSize); + + List getNonGroupMembers(String siteGroupId, int pageNum, int pageSize); + + boolean addGroupMembers(String siteGroupId, List newMemberList); + + boolean removeGroupMembers(String siteGroupId, List groupMemberList); + + boolean dismissGroup(String siteGroupId); + +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IMessageManageService.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IMessageManageService.java new file mode 100755 index 0000000..2c170c1 --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IMessageManageService.java @@ -0,0 +1,20 @@ +package com.akaxin.site.web.admin.service; + +import com.akaxin.site.web.admin.bean.WebMessageBean; + +/** + * 后台管理发送消息接口 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-25 11:11:10 + */ +public interface IMessageManageService { + + boolean sendU2WebMessage(WebMessageBean bean); + + boolean sendU2WebNoticeMessage(WebMessageBean bean); + + boolean sendGroupWebMessage(WebMessageBean bean); + + boolean sendGroupWebNoticeMessage(WebMessageBean bean); +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IMonitorService.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IMonitorService.java new file mode 100755 index 0000000..27d7772 --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IMonitorService.java @@ -0,0 +1,17 @@ +package com.akaxin.site.web.admin.service; + +public interface IMonitorService { + int queryNumRegisterPerDay(long now, int day); + + int queryNumMessagePerDay(long now, int day); + + int queryGroupMessagePerDay(long now, int day); + + int queryU2MessagePerDay(long now, int day); + + int getSiteUserNum(long now,int day); + + int getGroupNum(long now,int day); + + int friendNum(long now,int day); +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IPluginService.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IPluginService.java new file mode 100755 index 0000000..0ca78b6 --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IPluginService.java @@ -0,0 +1,19 @@ +package com.akaxin.site.web.admin.service; + +import java.util.List; + +import com.akaxin.site.storage.bean.PluginBean; + +public interface IPluginService { + boolean addNewPlugin(PluginBean bean); + + boolean deletePlugin(int pluginId); + + boolean updatePlugin(PluginBean bean); + + PluginBean getPlugin(int pluginId); + + List getPluginList(int pageNum, int pageSize); + + String reSetAuthKey(int pluginId); +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IUICService.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IUICService.java new file mode 100755 index 0000000..1c07848 --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IUICService.java @@ -0,0 +1,13 @@ +package com.akaxin.site.web.admin.service; + +import java.util.List; + +import com.akaxin.site.storage.bean.UicBean; + +public interface IUICService { + + boolean addUIC(int num, int length); + + List getUsedUicList(int pageNum, int pageSize, int status); + +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IUserService.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IUserService.java new file mode 100755 index 0000000..f9d776f --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/IUserService.java @@ -0,0 +1,23 @@ +package com.akaxin.site.web.admin.service; + +import java.util.List; + +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.UserProfileBean; + +public interface IUserService { + // 获取用户profile + UserProfileBean getUserProfile(String siteUserId); + + // 更新用户profile + boolean updateProfile(UserProfileBean userProfileBean); + + // 获取用户列表 + List getUserList(int pageNum, int pageSize); + + // 封禁用户 + boolean sealUpUser(String siteUserId, int status); + // 删除用户 + boolean delUser(String siteUserId); + +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/ConfigManageService.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/ConfigManageService.java new file mode 100755 index 0000000..7c643cc --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/ConfigManageService.java @@ -0,0 +1,184 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.web.admin.service.impl; + +import java.util.Collection; +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +import com.akaxin.site.business.dao.SiteConfigDao; +import com.akaxin.site.business.impl.site.SiteConfig; +import com.akaxin.site.web.admin.service.IConfigService; +import com.akaxin.site.web.utils.ArraysUtils; + +@Service +public class ConfigManageService implements IConfigService { + private static final Logger logger = LoggerFactory.getLogger(ConfigManageService.class); + + @Override + public Map getSiteConfig() { + Map configMap = SiteConfig.getConfigMap(); + return configMap; + } + + @Override + public boolean updateSiteConfig(String siteUserId, Map config) { + boolean isAdmin = SiteConfig.isSiteSuperAdmin(siteUserId); + boolean result = SiteConfigDao.getInstance().updateSiteConfig(config, isAdmin); + SiteConfig.updateConfig(); + logger.info("siteUserId={} isAdmin={} update configMap={} result={}", siteUserId, isAdmin, config, result); + return result; + } + + @Override + public boolean addUserManager(String siteUserId) { + boolean result = false; + String siteManagers = SiteConfigDao.getInstance().getSiteManagers(); + if (StringUtils.isNotEmpty(siteManagers)) { + if (!siteManagers.contains(siteUserId)) { + siteManagers = siteManagers + "," + siteUserId; + } + } else { + siteManagers = siteUserId; + } + result = SiteConfigDao.getInstance().updateSiteManagers(siteManagers); + SiteConfig.updateConfig(); + return result; + } + + @Override + public boolean deleteUserManager(String siteUserId) { + boolean result = false; + String siteManagers = SiteConfigDao.getInstance().getSiteManagers(); + if (StringUtils.isNotEmpty(siteManagers)) { + String[] managers = siteManagers.split(","); + List managerList = ArraysUtils.asList(managers); + if (managerList.contains(siteUserId)) { + managerList.remove(siteUserId); + String newManagers = listToString(null, ","); + result = SiteConfigDao.getInstance().updateSiteManagers(newManagers); + SiteConfig.updateConfig(); + } + } + return result; + } + + @Override + public boolean setUserDefaultFriends(String siteUserId) { + boolean result = false; + String defaultFriends = SiteConfigDao.getInstance().getDefaultUserFriends(); + if (StringUtils.isNotEmpty(defaultFriends)) { + if (!defaultFriends.contains(siteUserId)) { + defaultFriends = defaultFriends + "," + siteUserId; + } + } else { + defaultFriends = siteUserId; + } + result = SiteConfigDao.getInstance().updateDefaultUserFriends(defaultFriends); + SiteConfig.updateConfig(); + return result; + } + + @Override + public boolean deleteUserDefaultFriends(String siteUserId) { + boolean result = false; + String defaultFriends = SiteConfigDao.getInstance().getDefaultUserFriends(); + if (StringUtils.isNotEmpty(defaultFriends)) { + String[] friends = defaultFriends.split(","); + List friendList = ArraysUtils.asList(friends); + if (friendList.contains(siteUserId)) { + friendList.remove(siteUserId); + String newFriends = listToString(friendList, ","); + result = SiteConfigDao.getInstance().updateDefaultUserFriends(newFriends); + SiteConfig.updateConfig(); + } + } + return result; + } + + @Override + public boolean setUserDefaultGroups(String siteGroupId) { + boolean result = false; + String defaultGroups = SiteConfigDao.getInstance().getDefaultUserGroups(); + if (StringUtils.isNotEmpty(defaultGroups)) { + if (!defaultGroups.contains(siteGroupId)) { + defaultGroups = defaultGroups + "," + siteGroupId; + } + } else { + defaultGroups = siteGroupId; + } + result = SiteConfigDao.getInstance().updateDefaultUserGroups(defaultGroups); + SiteConfig.updateConfig(); + return result; + } + + @Override + public boolean deleteUserDefaultGroup(String siteGroupId) { + boolean result = false; + String defaultGroups = SiteConfigDao.getInstance().getDefaultUserGroups(); + if (StringUtils.isNotEmpty(defaultGroups)) { + String[] groups = defaultGroups.split(","); + List groupList = ArraysUtils.asList(groups); + if (groupList.contains(siteGroupId)) { + groupList.remove(siteGroupId); + String newGroups = listToString(groupList, ","); + result = SiteConfigDao.getInstance().updateDefaultUserGroups(newGroups); + } + } + return result; + } + + private static String listToString(Collection colls, String split) { + if (colls == null || colls.size() == 0) { + return null; + } + StringBuilder sb = new StringBuilder(); + int i = 0; + for (String str : colls) { + sb.append(str); + if (++i < colls.size()) { + sb.append(split); + } + } + return sb.toString(); + } + + @Override + public List getUserDefaultFriendList() { + String defaultFriends = SiteConfigDao.getInstance().getDefaultUserFriends(); + if (StringUtils.isNotEmpty(defaultFriends)) { + String[] friends = defaultFriends.split(","); + return ArraysUtils.asList(friends); + } + return null; + } + + @Override + public List getUserDefaultGroupList() { + String defaultGroups = SiteConfigDao.getInstance().getDefaultUserGroups(); + if (StringUtils.isNotEmpty(defaultGroups)) { + String[] groups = defaultGroups.split(","); + return ArraysUtils.asList(groups); + } + return null; + } + +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/GroupManageService.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/GroupManageService.java new file mode 100755 index 0000000..63f1b9e --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/GroupManageService.java @@ -0,0 +1,87 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.web.admin.service.impl; + +import java.util.List; +import java.util.Set; + +import org.springframework.stereotype.Service; + +import com.akaxin.site.business.dao.UserGroupDao; +import com.akaxin.site.business.impl.site.SiteConfig; +import com.akaxin.site.storage.bean.GroupMemberBean; +import com.akaxin.site.storage.bean.GroupProfileBean; +import com.akaxin.site.storage.bean.SimpleGroupBean; +import com.akaxin.site.web.admin.service.IGroupService; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-17 18:59:24 + */ +@Service("groupManageService") +public class GroupManageService implements IGroupService { + + @Override + public GroupProfileBean getGroupProfile(String siteGroupId) { + GroupProfileBean groupProfile = UserGroupDao.getInstance().getGroupProfile(siteGroupId); + groupProfile.setDefaultState(isUserDefaultGroup(groupProfile.getGroupId()) ? 1 : 0); + return groupProfile; + } + + private boolean isUserDefaultGroup(String siteGroupId) { + Set defaultGroups = SiteConfig.getUserDefaultGroups(); + if (defaultGroups != null && defaultGroups.size() > 0) { + return defaultGroups.contains(siteGroupId); + } + return false; + } + + @Override + public boolean updateGroupProfile(GroupProfileBean bean) { + return UserGroupDao.getInstance().updateGroupProfile(bean); + } + + @Override + public List getGroupList(int pageNum, int pageSize) { + return UserGroupDao.getInstance().getGroupList(pageNum, pageSize); + } + + @Override + public List getGroupMembers(String siteGroupId, int pageNum, int pageSize) { + return UserGroupDao.getInstance().getGroupMemberList(siteGroupId, pageNum, pageSize); + } + + @Override + public List getNonGroupMembers(String siteGroupId, int pageNum, int pageSize) { + return UserGroupDao.getInstance().getNonGroupMemberList(siteGroupId, pageNum, pageSize); + } + + @Override + public boolean addGroupMembers(String siteGroupId, List newMemberList) { + return UserGroupDao.getInstance().addGroupMember(null, siteGroupId, newMemberList); + } + + @Override + public boolean removeGroupMembers(String siteGroupId, List groupMemberList) { + return UserGroupDao.getInstance().deleteGroupMember(siteGroupId, groupMemberList); + } + + @Override + public boolean dismissGroup(String siteGroupId) { + return UserGroupDao.getInstance().deleteGroup(siteGroupId); + } + +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/MessageManageService.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/MessageManageService.java new file mode 100755 index 0000000..a9058a2 --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/MessageManageService.java @@ -0,0 +1,105 @@ +package com.akaxin.site.web.admin.service.impl; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +import com.akaxin.common.command.Command; +import com.akaxin.common.constant.RequestAction; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.CoreProto.MsgType; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.message.api.IMessageService; +import com.akaxin.site.message.service.ImMessageService; +import com.akaxin.site.web.admin.bean.WebMessageBean; +import com.akaxin.site.web.admin.service.IMessageManageService; + +/** + * 后台管理发送消息实现 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-25 11:14:05 + */ +@Service("messageManageService") +public class MessageManageService implements IMessageManageService { + private static final Logger logger = LoggerFactory.getLogger(MessageManageService.class); + private IMessageService imService = new ImMessageService(); + + @Override + public boolean sendU2WebMessage(WebMessageBean bean) { + CoreProto.U2Web u2Web = CoreProto.U2Web.newBuilder().setMsgId(bean.getMsgId()) + .setSiteUserId(bean.getSiteUserId()).setSiteFriendId(bean.getSiteFriendId()) + .setWebCode(bean.getWebCode()).setHeight(bean.getHeight()).setWidth(bean.getWidth()) + .setTime(System.currentTimeMillis()).setHrefUrl(bean.getHrefUrl()).build(); + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest.newBuilder() + .setType(MsgType.U2_WEB).setU2Web(u2Web).build(); + + Command command = new Command(); + command.setSiteUserId(bean.getSiteUserId()); + command.setSiteFriendId(bean.getSiteFriendId()); + command.setAction(RequestAction.IM_CTS_MESSAGE.getName()); + command.setParams(request.toByteArray()); + boolean result = imService.execute(command); + + logger.info("send u2 web message result={} bean={}", result, bean.toString()); + return result; + } + + @Override + public boolean sendU2WebNoticeMessage(WebMessageBean bean) { + CoreProto.U2WebNotice u2WebNotice = CoreProto.U2WebNotice.newBuilder().setMsgId(bean.getMsgId()) + .setSiteUserId(bean.getSiteUserId()).setSiteFriendId(bean.getSiteFriendId()) + .setWebCode(bean.getWebCode()).setHrefUrl(bean.getHrefUrl()).setTime(System.currentTimeMillis()) + .build(); + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest.newBuilder() + .setType(MsgType.U2_WEB_NOTICE).setU2WebNotice(u2WebNotice).build(); + + Command command = new Command(); + command.setAction(RequestAction.IM_CTS_MESSAGE.getName()); + command.setSiteUserId(bean.getSiteUserId()); + command.setSiteFriendId(bean.getSiteFriendId()); + command.setParams(request.toByteArray()); + boolean result = imService.execute(command); + + logger.info("send u2 web notice message result={} bean={}", result, bean.toString()); + return result; + } + + @Override + public boolean sendGroupWebMessage(WebMessageBean bean) { + CoreProto.GroupWeb groupWeb = CoreProto.GroupWeb.newBuilder().setMsgId(bean.getMsgId()) + .setSiteUserId(bean.getSiteUserId()).setSiteGroupId(bean.getSiteGroupId()).setWebCode(bean.getWebCode()) + .setHeight(bean.getHeight()).setHrefUrl(bean.getHrefUrl()).setWidth(bean.getWidth()) + .setTime(System.currentTimeMillis()).build(); + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest.newBuilder() + .setType(MsgType.GROUP_WEB).setGroupWeb(groupWeb).build(); + + Command command = new Command(); + command.setSiteUserId(bean.getSiteUserId()); + command.setAction(RequestAction.IM_CTS_MESSAGE.getName()); + command.setParams(request.toByteArray()); + boolean result = imService.execute(command); + + logger.info("send group web message result={} bean={}", result, bean.toString()); + return result; + } + + @Override + public boolean sendGroupWebNoticeMessage(WebMessageBean bean) { + CoreProto.GroupWebNotice groupWebNotice = CoreProto.GroupWebNotice.newBuilder().setMsgId(bean.getMsgId()) + .setSiteUserId(bean.getSiteUserId()).setSiteGroupId(bean.getSiteGroupId()).setWebCode(bean.getWebCode()) + .setTime(System.currentTimeMillis()).setHrefUrl(bean.getHrefUrl()).build(); + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest.newBuilder() + .setType(MsgType.GROUP_WEB_NOTICE).setGroupWebNotice(groupWebNotice).build(); + + Command command = new Command(); + command.setSiteUserId(bean.getSiteUserId()); + command.setAction(RequestAction.IM_CTS_MESSAGE.getName()); + command.setParams(request.toByteArray()); + boolean result = imService.execute(command); + + logger.info("send group web message result={} bean={}", result, bean.toString()); + return result; + } + +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/MonitorService.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/MonitorService.java new file mode 100755 index 0000000..a563b23 --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/MonitorService.java @@ -0,0 +1,47 @@ +package com.akaxin.site.web.admin.service.impl; + +import com.akaxin.site.business.dao.MonitorDao; +import com.akaxin.site.web.admin.service.IMonitorService; + +import org.springframework.stereotype.Service; + +@Service +public class MonitorService implements IMonitorService { + + private MonitorDao monitorDao = MonitorDao.getInstance(); + + @Override + public int queryNumRegisterPerDay(long now, int day) { + return monitorDao.queryNumRegisterPerDay(now, day); + } + + @Override + public int queryNumMessagePerDay(long now, int day) { + return monitorDao.queryNumMessagePerDay(now, day); + } + + @Override + public int queryGroupMessagePerDay(long now, int day) { + return monitorDao.queryGroupMessagePerDay(now, day); + } + + @Override + public int queryU2MessagePerDay(long now, int day) { + return monitorDao.queryU2MessagePerDay(now, day); + } + + @Override + public int getSiteUserNum(long now, int day) { + return monitorDao.getSiteUserNum(now, day); + } + + @Override + public int getGroupNum(long now, int day) { + return monitorDao.getGroupNum(now, day); + } + + @Override + public int friendNum(long now, int day) { + return monitorDao.friendNum(now, day); + } +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/PluginManageService.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/PluginManageService.java new file mode 100755 index 0000000..369398b --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/PluginManageService.java @@ -0,0 +1,66 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.web.admin.service.impl; + +import java.util.List; + +import org.springframework.stereotype.Service; + +import com.akaxin.site.business.dao.SitePluginDao; +import com.akaxin.site.storage.bean.PluginBean; +import com.akaxin.site.web.admin.service.IPluginService; + +/** + * 扩展管理Service + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-17 11:57:26 + */ +@Service("pluginManageService") +public class PluginManageService implements IPluginService { + + @Override + public boolean addNewPlugin(PluginBean bean) { + return SitePluginDao.getInstance().addPlugin(bean); + } + + @Override + public boolean deletePlugin(int pluginId) { + return SitePluginDao.getInstance().deletePlugin(pluginId); + } + + @Override + public boolean updatePlugin(PluginBean bean) { + return SitePluginDao.getInstance().updatePlugin(bean); + } + + @Override + public PluginBean getPlugin(int pluginId) { + return SitePluginDao.getInstance().getPluginProfile(pluginId); + } + + @Override + public List getPluginList(int pageNum, int pageSize) { + return SitePluginDao.getInstance().getAllPluginList(pageNum, pageSize); + } + + @Override + public String reSetAuthKey(int pluginId) { + return SitePluginDao.getInstance().reSetAuthKey(pluginId); + } + + +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/UICManageService.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/UICManageService.java new file mode 100755 index 0000000..1468e60 --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/UICManageService.java @@ -0,0 +1,54 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ +package com.akaxin.site.web.admin.service.impl; + +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +import com.akaxin.proto.core.UicProto.UicStatus; +import com.akaxin.site.business.dao.SiteUicDao; +import com.akaxin.site.storage.bean.UicBean; +import com.akaxin.site.web.admin.service.IUICService; + +@Service +public class UICManageService implements IUICService { + private static final Logger logger = LoggerFactory.getLogger(UICManageService.class); + + @Override + public boolean addUIC(int num, int length) { + try { + UicBean bean = new UicBean(); + bean.setStatus(UicStatus.UNUSED_VALUE); + bean.setCreateTime(System.currentTimeMillis()); + if (SiteUicDao.getInstance().batchAddUic(bean, num, length)) { + return true; + } + } catch (Exception e) { + logger.error("add uic error", e); + } + return false; + } + + @Override + public List getUsedUicList(int pageNum, int pageSize, int status) { + List uicList = SiteUicDao.getInstance().getUicList(pageNum, pageSize, status); + return uicList; + } + +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/UserManageService.java b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/UserManageService.java new file mode 100755 index 0000000..8b27e22 --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/admin/service/impl/UserManageService.java @@ -0,0 +1,152 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.web.admin.service.impl; + +import java.io.File; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +import com.akaxin.site.business.dao.UserGroupDao; +import com.akaxin.site.business.dao.UserProfileDao; +import com.akaxin.site.business.impl.site.SiteConfig; +import com.akaxin.site.business.utils.FilePathUtils; +import com.akaxin.site.storage.api.IGroupDao; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.api.IUserDeviceDao; +import com.akaxin.site.storage.api.IUserFriendDao; +import com.akaxin.site.storage.api.IUserProfileDao; +import com.akaxin.site.storage.api.IUserSessionDao; +import com.akaxin.site.storage.bean.SimpleGroupBean; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.UserDeviceBean; +import com.akaxin.site.storage.bean.UserProfileBean; +import com.akaxin.site.storage.service.DeviceDaoService; +import com.akaxin.site.storage.service.GroupDaoService; +import com.akaxin.site.storage.service.MessageDaoService; +import com.akaxin.site.storage.service.UserFriendDaoService; +import com.akaxin.site.storage.service.UserProfileDaoService; +import com.akaxin.site.storage.service.UserSessionDaoService; +import com.akaxin.site.web.admin.service.IUserService; + +@Service("userManageService") +public class UserManageService implements IUserService { + private IMessageDao messageDao = new MessageDaoService(); + private IUserFriendDao friendDao = new UserFriendDaoService(); + private IGroupDao groupDao = new GroupDaoService(); + private IUserProfileDao profileDao = new UserProfileDaoService(); + private IUserDeviceDao deviceDao = new DeviceDaoService(); + private IUserSessionDao sessionDao = new UserSessionDaoService(); + private static final Logger logger = LoggerFactory.getLogger(UserManageService.class); + + @Override + public UserProfileBean getUserProfile(String siteUserId) { + UserProfileBean bean = UserProfileDao.getInstance().getUserProfileById(siteUserId); + bean.setDefaultState(isUserDefaultFriend(bean.getSiteUserId()) ? 1 : 0); + return bean; + } + + private boolean isUserDefaultFriend(String siteUserId) { + Set defaultFriends = SiteConfig.getUserDefaultFriends(); + if (defaultFriends != null && defaultFriends.size() > 0) { + return defaultFriends.contains(siteUserId); + } + return false; + } + + @Override + public boolean updateProfile(UserProfileBean userProfileBean) { + return UserProfileDao.getInstance().updateUserProfile(userProfileBean); + } + + @Override + public List getUserList(int pageNum, int pageSize) { + return UserProfileDao.getInstance().getUserPageList(pageNum, pageSize); + } + + @Override + public boolean sealUpUser(String siteUserId, int status) { + return UserProfileDao.getInstance().updateUserStatus(siteUserId, status); + } + + @Override + public boolean delUser(String siteUserId) { + boolean delProfile = false; + ArrayList userFileIds = new ArrayList<>(); + try { + List userDeviceList = deviceDao.getUserDeviceList(siteUserId); + for (UserDeviceBean userDeviceBean : userDeviceList) { + sessionDao.deleteUserSession(siteUserId, userDeviceBean.getDeviceId()); + } + UserProfileBean userProfileById = profileDao.getUserProfileById(siteUserId); + String userPhoto = userProfileById.getUserPhoto(); + userFileIds.add(userPhoto); + delProfile = profileDao.delUser(siteUserId) && deviceDao.delDevice(siteUserId); + } catch (SQLException e) { + logger.error("del user profile error", e); + } + try { + List msgList = messageDao.queryMessageFile(siteUserId); + for (String fileId : msgList) { + userFileIds.add(fileId); + } + messageDao.delUserMessage(siteUserId); + } catch (SQLException e) { + logger.error("del user Message error", e); + } + try { + friendDao.delUserFriend(siteUserId); + } catch (SQLException e) { + logger.error("del user friend error", e); + } + try { + List userGroups = groupDao.getUserGroupList(siteUserId); + for (SimpleGroupBean userGroup : userGroups) { + String groupMasterId = UserGroupDao.getInstance().getGroupMaster(userGroup.getGroupId()); + if (groupMasterId.equals(siteUserId)) { + userFileIds.add(userGroup.getGroupPhoto()); + groupDao.rmGroupProfile(userGroup.getGroupId()); + } else { + ArrayList delList = new ArrayList<>(); + delList.add(siteUserId); + groupDao.deleteGroupMember(userGroup.getGroupId(), delList); + } + } + } catch (SQLException e) { + logger.error("del user group error", e); + } + for (String userFilePath : userFileIds) { + if (StringUtils.isNotBlank(userFilePath) && !"null".equals(userFilePath)) { + + if (userFilePath.startsWith("AKX-") || userFilePath.startsWith("akx-")) { + userFilePath = userFilePath.substring(4, userFilePath.length()); + } + File delFile = new File(FilePathUtils.getFilePathByFileId(userFilePath)); + if (delFile.exists()) { + delFile.delete(); + } + } + } + return delProfile; + } + +} diff --git a/openzaly-admin/src/main/java/com/akaxin/site/web/utils/ArraysUtils.java b/openzaly-admin/src/main/java/com/akaxin/site/web/utils/ArraysUtils.java new file mode 100755 index 0000000..0d83783 --- /dev/null +++ b/openzaly-admin/src/main/java/com/akaxin/site/web/utils/ArraysUtils.java @@ -0,0 +1,18 @@ +package com.akaxin.site.web.utils; + +import java.util.ArrayList; +import java.util.List; + +public class ArraysUtils { + + public static List asList(String[] objs) { + if (objs == null) + return null; + List list = new ArrayList(); + for (String obj : objs) { + list.add(obj); + } + return list; + } + +} diff --git a/openzaly-admin/src/main/resources/application.properties b/openzaly-admin/src/main/resources/application.properties new file mode 100755 index 0000000..ad121c2 --- /dev/null +++ b/openzaly-admin/src/main/resources/application.properties @@ -0,0 +1,10 @@ +#配置管理平台启动端口 +#server.port=80 +#设置输出日志 +#logging.file=admin.log +#设置日志的输出级别 +#logging.level.root=info +#配置mvc前缀,界面位置 +#spring.thymeleaf.prefix=classpath:/webapp/views/ +#静态资源 +#spring.resources.static-locations=classpath:/webapp/static/ \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/static/Public/css/style.css b/openzaly-admin/src/main/resources/webapp/static/Public/css/style.css new file mode 100755 index 0000000..e530f6f --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/static/Public/css/style.css @@ -0,0 +1,91 @@ +body, html { + height: 100%; + background-color: #f4f4f4; + -webkit-tap-highlight-color: transparent; +} + +.basic-title { + text-align: center; + font-weight: 400; + color: #1E88E5; + margin: 0 15%; +} + +.basic-sub-title { + text-align: center; + color: #1E88E5; +} + +.basic-header { + padding: 35px 0; +}css + +.basic-content-padded { + padding: 15px; +} + .margin_top_30px { + margin-top: 30px; + } + +.basic-second-title { + text-align: center; + color: #1E88E5; + font-weight: 400; + margin: 0 15%; +} +.basic-weui-grid { + position: relative; + float: left; + padding: 5px; + width: 60px; + height: 60px; +} +.basic-color { + background-color: #1E88E5; + color: #FFFFFF; +} +.basic-weui-btn_primary { + background-color: #1E88E5; +} + +.basic-weui-btn { + background-color: #1E88E5; + color: #FFFFFF; +} +.basic-weui-btn:hover { + background-color: #1E88E5; + color: #FFFFFF; + } + +.basic-weui-btn:active { + background-color: #1E88E5!important; + color: #FFFFFF; + } + +.basic-weui-btn_mini { + display: inline-block; + padding: 0 1.32em; + line-height: 2.3; +} + +.weui-dialog__btn { + color: #1E88E5; +} + +footer { + text-align: center; + font-size: 14px; + padding: 20px; +} + +.basic-color_bg { + background-color: #f4f4f4; +} +.weui-loadmore_line .weui-loadmore__tips { + background-color: #f4f4f4; +} + +footer a { + color: #999; + text-decoration: none; +} diff --git a/openzaly-admin/src/main/resources/webapp/static/Public/images/group.png b/openzaly-admin/src/main/resources/webapp/static/Public/images/group.png new file mode 100755 index 0000000..7acbbe3 Binary files /dev/null and b/openzaly-admin/src/main/resources/webapp/static/Public/images/group.png differ diff --git a/openzaly-admin/src/main/resources/webapp/static/Public/images/invite.png b/openzaly-admin/src/main/resources/webapp/static/Public/images/invite.png new file mode 100755 index 0000000..d588b0f Binary files /dev/null and b/openzaly-admin/src/main/resources/webapp/static/Public/images/invite.png differ diff --git a/openzaly-admin/src/main/resources/webapp/static/Public/images/monitor.png b/openzaly-admin/src/main/resources/webapp/static/Public/images/monitor.png new file mode 100755 index 0000000..9a4dee1 Binary files /dev/null and b/openzaly-admin/src/main/resources/webapp/static/Public/images/monitor.png differ diff --git a/openzaly-admin/src/main/resources/webapp/static/Public/images/plugin.png b/openzaly-admin/src/main/resources/webapp/static/Public/images/plugin.png new file mode 100755 index 0000000..167fca6 Binary files /dev/null and b/openzaly-admin/src/main/resources/webapp/static/Public/images/plugin.png differ diff --git a/openzaly-admin/src/main/resources/webapp/static/Public/images/setting.png b/openzaly-admin/src/main/resources/webapp/static/Public/images/setting.png new file mode 100755 index 0000000..4160703 Binary files /dev/null and b/openzaly-admin/src/main/resources/webapp/static/Public/images/setting.png differ diff --git a/openzaly-admin/src/main/resources/webapp/static/Public/images/user.png b/openzaly-admin/src/main/resources/webapp/static/Public/images/user.png new file mode 100755 index 0000000..cf749b7 Binary files /dev/null and b/openzaly-admin/src/main/resources/webapp/static/Public/images/user.png differ diff --git a/openzaly-admin/src/main/resources/webapp/views/admin.html b/openzaly-admin/src/main/resources/webapp/views/admin.html new file mode 100755 index 0000000..1060533 --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/admin.html @@ -0,0 +1,164 @@ + + + + + + + 后台管理 + + + + + + + + +

+ + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/basic/config.html b/openzaly-admin/src/main/resources/webapp/views/basic/config.html new file mode 100755 index 0000000..e896818 --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/basic/config.html @@ -0,0 +1,622 @@ + + + + + + + 站点设置 + + + + + + + +
+ 站点基本设置-设置说明 +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+

站点Logo上传

+
0/1
+
1/1
+
+
+
    + +
+
+ +
+
+
+
+
+
+ + +
+
+
是否开启绝密功能
+
+ + + + +
+
+ +
+
是否要求实名认证
+
+ + + + +
+
+ +
+
是否要求邀请码
+
+ + + + +
+
+ +
+ +
+
+
是否允许用户添加好友
+
+ + +
+
+ +
+
是否允许用户创建群组
+
+ + +
+
+
+ + + + +
+ 确定 +
+ + + + + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/error.html b/openzaly-admin/src/main/resources/webapp/views/error.html new file mode 100755 index 0000000..9f45cd1 --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/error.html @@ -0,0 +1,67 @@ + + + + + + + 用户管理后台 + + + + + + + +
+

站点管理后台

+
+
+
+ +
+

无操作权限

+

您不是当前站点的管理员,不能进行该操作!

+
+
+
+ + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/group/addMember.html b/openzaly-admin/src/main/resources/webapp/views/group/addMember.html new file mode 100755 index 0000000..e8858ff --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/group/addMember.html @@ -0,0 +1,223 @@ + + + + + 添加群成员 + + + + + + + +
+
+
+

+
+ +
+ +
+
+ + +
+ +
+ +
+ + + + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/group/index.html b/openzaly-admin/src/main/resources/webapp/views/group/index.html new file mode 100755 index 0000000..57f2ea9 --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/group/index.html @@ -0,0 +1,240 @@ + + + + + + + 群组管理 + + + + + + + +
+
+
+
下拉刷新
+
释放刷新
+
正在刷新
+
+
+
+ 默认群列表 +
+
+ +

+
+
+ +
+
+
+ 群列表 +
+
+
+
+ +
+ + + + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/group/manage.html b/openzaly-admin/src/main/resources/webapp/views/group/manage.html new file mode 100755 index 0000000..dd92a29 --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/group/manage.html @@ -0,0 +1,251 @@ + + + + + + + 群管理 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/group/memberList.html b/openzaly-admin/src/main/resources/webapp/views/group/memberList.html new file mode 100755 index 0000000..07951c7 --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/group/memberList.html @@ -0,0 +1,236 @@ + + + + + + + 群成员管理 + + + + + + + +
+
+

群成员列表

+
+ +
+
+
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/group/profile.html b/openzaly-admin/src/main/resources/webapp/views/group/profile.html new file mode 100755 index 0000000..4cea0ca --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/group/profile.html @@ -0,0 +1,242 @@ + + + + + + + 修改群信息 + + + + + + + +
+
+
+ +
+
+ +
+
+
+
+
+
+

图片上传

+
1/1
+
0/1
+
+
+
    +
  • +
+
+ +
+
+
+
+
+
+ 确定 +
+
+ + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/jump/jump.html b/openzaly-admin/src/main/resources/webapp/views/jump/jump.html new file mode 100755 index 0000000..595d2b7 --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/jump/jump.html @@ -0,0 +1,356 @@ + + + + + + + 测试jump跳转 + + + + + + + +
测试jump跳转
+ + + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/monitor/index.html b/openzaly-admin/src/main/resources/webapp/views/monitor/index.html new file mode 100755 index 0000000..58916f4 --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/monitor/index.html @@ -0,0 +1,173 @@ + + + + + + + 数据报表 + + + + + + + +
+
+
+ +
+
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/plugin/add.html b/openzaly-admin/src/main/resources/webapp/views/plugin/add.html new file mode 100755 index 0000000..66658f8 --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/plugin/add.html @@ -0,0 +1,413 @@ + + + + + + + 添加小程序 + + + + + + + + +
+ 基本信息 +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+

Logo

+
0/1
+
+
+
    +
+
+ +
+
+
+
+
+
+
+
+ 基本设置 +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+

小程序位置

+
+
+
+
+ +
+

小程序状态

+
+
+
+
+ +
+

展现方式

+
+
+
+
+
+
+ 确定 +
+
+ + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/plugin/error.html b/openzaly-admin/src/main/resources/webapp/views/plugin/error.html new file mode 100755 index 0000000..d302fcd --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/plugin/error.html @@ -0,0 +1,64 @@ + + + + + + + 扩展管理-错误提示 + + + + + + + +
+

编辑扩展信息

+
+
+
+ +
+

扩展不存在

+

当前扩展已经被删除!

+
+
+
+ + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/plugin/index.html b/openzaly-admin/src/main/resources/webapp/views/plugin/index.html new file mode 100755 index 0000000..28a1f53 --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/plugin/index.html @@ -0,0 +1,149 @@ + + + + + + + 小程序管理 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/plugin/list.html b/openzaly-admin/src/main/resources/webapp/views/plugin/list.html new file mode 100755 index 0000000..2c11551 --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/plugin/list.html @@ -0,0 +1,210 @@ + + + + + + + 小程序列表 + + + + + + + + +
+ 小程序列表 +
+
+ + +
+ +
+ + + + + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/plugin/update.html b/openzaly-admin/src/main/resources/webapp/views/plugin/update.html new file mode 100755 index 0000000..4c19b53 --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/plugin/update.html @@ -0,0 +1,625 @@ + + + + + + + 编辑小程序 + + + + + + + + +
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+

Logo

+
1/1
+
0/1
+
+
+
    +
  • +
+
+ +
+
+
+
+
+
+
+
+ 基本设置 +
+ + +
+ +
+ 高级设置 +
+
+
+
密钥(Authkey)
+
+ + + + +
+
+
+
+ +
+
+
+ +
+
+ +
+
+
+
+ + + + + + + + + +
+ + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/siteMember/error.html b/openzaly-admin/src/main/resources/webapp/views/siteMember/error.html new file mode 100755 index 0000000..8df0a18 --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/siteMember/error.html @@ -0,0 +1,70 @@ + + + + + + + 用户广场 + + + + + + + + + +
+

用户广场

+
+
+
+ +
+

请求失败

+

请联系站点管理人员

+
+
+
+ + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/siteMember/siteMember.html b/openzaly-admin/src/main/resources/webapp/views/siteMember/siteMember.html new file mode 100755 index 0000000..8746e64 --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/siteMember/siteMember.html @@ -0,0 +1,310 @@ + + + + + + 用户广场 + + + + + + + + +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/uic/index.html b/openzaly-admin/src/main/resources/webapp/views/uic/index.html new file mode 100755 index 0000000..08b626c --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/uic/index.html @@ -0,0 +1,141 @@ + + + + + + + 邀请码 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/uic/unused_list.html b/openzaly-admin/src/main/resources/webapp/views/uic/unused_list.html new file mode 100755 index 0000000..c73ce39 --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/uic/unused_list.html @@ -0,0 +1,239 @@ + + + + + + + 未使用列表 + + + + + + + +
+
+
+

未使用列表

+
+ +
+
+ +
+
+ +
+ + + + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/uic/used_list.html b/openzaly-admin/src/main/resources/webapp/views/uic/used_list.html new file mode 100755 index 0000000..4632456 --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/uic/used_list.html @@ -0,0 +1,155 @@ + + + + + + + 已使用列表 + + + + + + + + +
+ 已使用列表 +
+
+ +
+
+ +
+ + + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/user/error.html b/openzaly-admin/src/main/resources/webapp/views/user/error.html new file mode 100755 index 0000000..6cfa5d6 --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/user/error.html @@ -0,0 +1,68 @@ + + + + + + + 编辑用户信息-报错页面 + + + + + + + + +
+

编辑用户信息

+
+
+
+ +
+

用户不存在

+

当前用户已经删除站点身份,或者当前用户已经处于封禁状态!

+
+
+
+ + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/user/index.html b/openzaly-admin/src/main/resources/webapp/views/user/index.html new file mode 100755 index 0000000..f152e01 --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/user/index.html @@ -0,0 +1,238 @@ + + + + + 用户管理 + + + + + + + +
+
+
+
下拉刷新
+
释放刷新
+
正在刷新
+
+ +
+
+ 站点默认好友列表 +
+ + +
+ +
+
+ 站点成员列表 +
+
+ +
+
+ + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/user/profile.html b/openzaly-admin/src/main/resources/webapp/views/user/profile.html new file mode 100755 index 0000000..73adf6b --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/user/profile.html @@ -0,0 +1,413 @@ + + + + + + +编辑用户信息 + + + + + + + +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+

图片上传

+
1/1
+
0/1
+
+
+
    +
  • +
+
+ +
+
+
+
+
+ +
+ + + + + + + \ No newline at end of file diff --git a/openzaly-admin/src/main/resources/webapp/views/webMsg/test.html b/openzaly-admin/src/main/resources/webapp/views/webMsg/test.html new file mode 100755 index 0000000..042fb8b --- /dev/null +++ b/openzaly-admin/src/main/resources/webapp/views/webMsg/test.html @@ -0,0 +1,130 @@ + + + + + + +Web消息测试 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openzaly-boot/.gitignore b/openzaly-boot/.gitignore new file mode 100755 index 0000000..27e2792 --- /dev/null +++ b/openzaly-boot/.gitignore @@ -0,0 +1,7 @@ +/target/ +/.classpath +/.DS_Store +/.project +/openzalyDB.sqlite3 +/site-logs +/site-file \ No newline at end of file diff --git a/openzaly-boot/openzaly-server.config b/openzaly-boot/openzaly-server.config new file mode 100755 index 0000000..f11bfcf --- /dev/null +++ b/openzaly-boot/openzaly-server.config @@ -0,0 +1,82 @@ +# +# Copyright 2018-2028 Akaxin Group +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +######################################################## +### ***************Akaxin *************** +### openzaly-server +######################################################## + + + +## personal/PERSONAL edition : use sqlite database +## team/TEAM edition : use mysql database,support one master with several slaves +## enterprise/ENTERPRISE edition : use mysql + redis database ,support im server distribution +## ultimate edition : team or enterprise customization +openzaly.edition=PERSONAL + + +# openzaly version +openzaly.version=1.0.7 + +##### site tcp address,clients connect to site.address +site.address=0.0.0.0 +# site tcp port default 2021 +site.port=2021 + +# pluginapi server address +pluginapi.address=0.0.0.0 +# pluginapi server port +pluginapi.port=8280 + +# default back-stage management address +site.admin.address=127.0.0.1 +# default back-stage management port +site.admin.port=8288 + +# first user login site,use this user invite code(UIC) +site.uic=000000 + +# deposit pictures,audio,db default current path +# site.baseDir=${pwd} +# goup max members count = 100 +# group.members.count=100 + +## if openzaly.edition = personal/PERSONAL +openzaly.sqlite.url=openzalyDB.sqlite3 + + +## if openzaly.edition = team/TEAM +openzaly.mysql.host=localhost +openzaly.mysql.port=3306 +openzaly.mysql.database=openzaly + +openzaly.mysql.username=root +openzaly.mysql.password=1234567890 +openzaly.mysql.initial-size=10 +openzaly.mysql.max-size=100 +openzaly.mysql.max-idle=60 + +openzaly.mysql.useUnicode=true +openzaly.mysql.characterEncoding=utf-8 +openzaly.mysql.verifyServerCertificate=false +openzaly.mysql.useSSL=true + + +## if openzaly.edition = enterprise/ENTERPRISE +#### support support im server distribution + +## if openzaly.edition = ultimate edition +#### openzaly support customed for team or enterprise \ No newline at end of file diff --git a/openzaly-boot/pom.xml b/openzaly-boot/pom.xml new file mode 100755 index 0000000..203513f --- /dev/null +++ b/openzaly-boot/pom.xml @@ -0,0 +1,105 @@ + + + 4.0.0 + + com.akaxin + openzaly-parent + 0.0.1 + + com.akaxin.site + openzaly-boot + 0.0.1-SNAPSHOT + + + UTF-8 + 1.8 + 1.8 + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.0.2.RELEASE + + + com.akaxin.site.boot.main.Bootstrap + ZIP + + true + + + + + repackage + + + + + + + + + + + + com.akaxin.site + openzaly-connector + 0.0.1-RELEASE + + + + com.akaxin.site + openzaly-admin + 0.0.1-RELEASE + + + + commons-cli + commons-cli + 1.4 + + + + \ No newline at end of file diff --git a/openzaly-boot/src/assembly-zip.xml b/openzaly-boot/src/assembly-zip.xml new file mode 100755 index 0000000..a8b46fd --- /dev/null +++ b/openzaly-boot/src/assembly-zip.xml @@ -0,0 +1,26 @@ + + + make-assembly + + tar.gz + + false + + + src/main/resources/ + . + + + ../lib/ + /lib/ + + + + + /lib/ + runtime + + + \ No newline at end of file diff --git a/openzaly-boot/src/main/java/com/akaxin/site/boot/config/AkxProject.java b/openzaly-boot/src/main/java/com/akaxin/site/boot/config/AkxProject.java new file mode 100755 index 0000000..f2b82aa --- /dev/null +++ b/openzaly-boot/src/main/java/com/akaxin/site/boot/config/AkxProject.java @@ -0,0 +1,14 @@ +package com.akaxin.site.boot.config; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-03-26 19:07:30 + */ +public interface AkxProject { + String PROJECT_NAME = "openzaly-boot"; + + String PROJECT_LOG_NAME = "openzaly-boot"; + + String PLN = "[openzaly-boot]"; +} diff --git a/openzaly-boot/src/main/java/com/akaxin/site/boot/config/ConfigHelper.java b/openzaly-boot/src/main/java/com/akaxin/site/boot/config/ConfigHelper.java new file mode 100755 index 0000000..b7e343b --- /dev/null +++ b/openzaly-boot/src/main/java/com/akaxin/site/boot/config/ConfigHelper.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ +package com.akaxin.site.boot.config; + +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import org.apache.commons.lang3.StringUtils; + +import com.akaxin.proto.core.ConfigProto; +import com.akaxin.site.boot.utils.PropertiesUtils; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-24 12:50:20 + */ +public class ConfigHelper implements ConfigKey { + private static Properties prop; + + private ConfigHelper() { + + } + + public static Properties loadOZProperties() { + if (prop == null) { + // 加载openzaly.property 配置文件 + prop = PropertiesUtils.getOZProperties(); + } + return prop; + } + + /** + * 获取服务启动时设置的配置参数,如果启动未设置,则通过配置文件获取默认的值 + * + * @param configName + * @return + */ + public static String getStringConfig(String configName) { + String configValue = System.getProperty(configName); + if (StringUtils.isEmpty(configValue)) { + Object obj = loadOZProperties().get(configName); + return obj != null ? obj.toString() : null; + } + return configValue; + } + + public static int getIntConfig(String configName) { + String configValue = System.getProperty(configName); + if (StringUtils.isBlank(configValue)) { + configValue = loadOZProperties().get(configName).toString(); + } + return Integer.parseInt(configValue); + } + + public static Map getConfigMap() { + Map configMap = new HashMap(); + configMap.put(ConfigProto.ConfigKey.SITE_VERSION_VALUE, getStringConfig(SITE_VERSION)); + configMap.put(ConfigProto.ConfigKey.SITE_ADDRESS_VALUE, getStringConfig(SITE_ADDRESS)); + configMap.put(ConfigProto.ConfigKey.SITE_PORT_VALUE, getStringConfig(SITE_PORT)); + // 扩展的http功能接口 + configMap.put(ConfigProto.ConfigKey.SITE_HTTP_ADDRESS_VALUE, getStringConfig(PLUGIN_API_ADDRESS)); + configMap.put(ConfigProto.ConfigKey.SITE_HTTP_PORT_VALUE, getStringConfig(PLUGIN_API_PORT)); + String basePath = System.getProperty("user.dir"); + configMap.put(ConfigProto.ConfigKey.PIC_PATH_VALUE, basePath);// 存放资源的位置 + configMap.put(ConfigProto.ConfigKey.DB_PATH_VALUE, basePath); + // 默认100人 + configMap.put(ConfigProto.ConfigKey.GROUP_MEMBERS_COUNT_VALUE, "100"); + // 默认二人绝密聊天状态:开启二人绝密聊天功能 + configMap.put(ConfigProto.ConfigKey.U2_ENCRYPTION_STATUS_VALUE, + ConfigProto.U2EncryptionConfig.U2_OPEN_VALUE + ""); + // 默认匿名 + configMap.put(ConfigProto.ConfigKey.REALNAME_STATUS_VALUE, ConfigProto.RealNameConfig.REALNAME_NO_VALUE + ""); + // 默认开启邀请码 + configMap.put(ConfigProto.ConfigKey.INVITE_CODE_STATUS_VALUE, ConfigProto.InviteCodeConfig.UIC_YES_VALUE + ""); + // 默认Push状态:不显示push内容 + configMap.put(ConfigProto.ConfigKey.PUSH_CLIENT_STATUS_VALUE, + String.valueOf(ConfigProto.PushClientStatus.PUSH_HIDDEN_TEXT_VALUE)); + return configMap; + } +} diff --git a/openzaly-boot/src/main/java/com/akaxin/site/boot/config/ConfigKey.java b/openzaly-boot/src/main/java/com/akaxin/site/boot/config/ConfigKey.java new file mode 100755 index 0000000..e89dc2a --- /dev/null +++ b/openzaly-boot/src/main/java/com/akaxin/site/boot/config/ConfigKey.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ +package com.akaxin.site.boot.config; + +/** + * 站点服务,相关配置字段 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-24 19:49:19 + */ +public interface ConfigKey { + // 站点版本 + public String SITE_VERSION = "openzaly.version"; + // 站点服务地址,提供用户和站点之间连接使用 + public String SITE_ADDRESS = "site.address"; + // 站点服务监听端口 + public String SITE_PORT = "site.port"; + // 站点启动的http服务地址,内部扩展功能访问使用 + public String PLUGIN_API_ADDRESS = "pluginapi.address"; + // http服务监听端口 + public String PLUGIN_API_PORT = "pluginapi.port"; + // 站点管理扩展地址&&端口 + public String SITE_ADMIN_ADDRESS = "site.admin.address"; + public String SITE_ADMIN_PORT = "site.admin.port"; + // 站点管理员 + public String SITE_ADMINISTRATORS = "site.administrators"; + // 站点管理员首次登陆站点,设置的邀请码 + public String SITE_ADMIN_UIC = "site.uic"; + // 存放站点图片,音频相关文件路径 + public String SITE_BASE_DIR = "site.baseDir"; + // 最大成员人数 + public String GROUP_MEMBERS_COUNT = "group.members.count"; + +} diff --git a/openzaly-boot/src/main/java/com/akaxin/site/boot/config/ConfigListener.java b/openzaly-boot/src/main/java/com/akaxin/site/boot/config/ConfigListener.java new file mode 100755 index 0000000..cf3d145 --- /dev/null +++ b/openzaly-boot/src/main/java/com/akaxin/site/boot/config/ConfigListener.java @@ -0,0 +1,57 @@ +package com.akaxin.site.boot.config; + +import java.util.Map; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; + +import org.apache.log4j.Logger; + +import com.akaxin.common.logs.LogCreater; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.ConfigProto; +import com.akaxin.site.business.impl.site.SiteConfig; +import com.akaxin.site.message.utils.SiteConfigHelper; + +/** + * 站点配置监听器,定时更新缓存中数据 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-02-01 14:52:50 + */ +public class ConfigListener { + private static String logPath; + private static Logger logger; + + static { + Executors.newSingleThreadScheduledExecutor().scheduleWithFixedDelay(new Runnable() { + + @Override + public void run() { + doListenning(); + } + + }, 20, 20, TimeUnit.SECONDS); + } + + public static void startListenning() { + LogUtils.info(getLogger(), "start config listenning"); + } + + public static void doListenning() { + Map imConfigMap = SiteConfigHelper.updateConfig(); + LogUtils.info(getLogger(), "update im site config={}", imConfigMap); + Map apiConfigMap = SiteConfig.updateConfig(); + LogUtils.info(getLogger(), "update api site config={}", apiConfigMap); + } + + private static Logger getLogger() { + String currentPath = SiteConfigHelper.getConfig(ConfigProto.ConfigKey.DB_PATH); + if (logger == null || !currentPath.equals(logPath)) { + logPath = currentPath; + logger = LogCreater.createTimeLogger("config", currentPath + "/site-logs"); + } + + return logger; + } + +} diff --git a/openzaly-boot/src/main/java/com/akaxin/site/boot/config/SiteDefaultIcon.java b/openzaly-boot/src/main/java/com/akaxin/site/boot/config/SiteDefaultIcon.java new file mode 100755 index 0000000..a41c4ca --- /dev/null +++ b/openzaly-boot/src/main/java/com/akaxin/site/boot/config/SiteDefaultIcon.java @@ -0,0 +1,30 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ +package com.akaxin.site.boot.config; + +/** + * 站点相关的需要设置的默认图片 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-02-03 23:51:01 + */ +public interface SiteDefaultIcon { + // 默认后台管理图标 + public String DEFAULT_SITE_ADMIN_ICON = "iVBORw0KGgoAAAANSUhEUgAAAMgAAADECAYAAAGtnV5zAAAAAXNSR0IArs4c6QAAJltJREFUeAHtXQmcE0XWf505MzPggQIioiCHigJeHJ7gsSgogrCKyqrgCbuurn5eu+qqqOu6h7urKyp4sCuKioooIIsLeAHqeiKggCCKiiCKMDOZO9/7d6YmlU46SU+qk05S7/dLOumuflXvvXp1vHpVz6Bm6PrAzqD4repqEFWun9SmDV+J3MhALqjhdgbIzCfn6NbvtGRSaFf69RMr7B7Fvd9tSmXU85iZXH5osZkw1gtRGKQbdgWzZdejH9VLr6f20zYTGS1KOO7gIhIlfXS433y89Pxy+jwJtiaVCTA+8Uk9nTcnQF139dELa+rp9XFltC0QJCiayNzMOcZXwkyA4KsdTSaiZV83Uo/dfPT3k0rp5KeqqfcePtpZF6REsospeLkwQICMtlQHzSv+v/NNI9U2UkLkAk/CTETC9mWGiTgRa0R6+ZpUJoIdyED8lpEk+m0rE8NsOiNfb00GwGBLyfg+RYSPCohJyafbWKoKwbapLysyqP9ekWW4ZkCJWW2R/4S5gahiLPkyduFs2VVdHyTrSxP6hjtP67OoHKUbtpmINHZVVr6fqEIkzCQRAlGYeNdIpsdLmcKz9GRSYBinpFDIpF5Nz5AIRek2Zec/g0GalFSxHCQCl9ZNrFhgq4wOcCVMmh7BJyyGggRpoSSmxs88w0/9OxU4puGof1XR5qpw+yYQxMwEGbSmObHrOTPHLkGmuPZp76PZo8vozU2N1I9/93mkKmKslYjqmOwSyMV1Io+NT+Jx1vrtofGXuA/kZ/ZKjCIhu8DniQtqWjK44OVACxVn9CikP59QKvK0vSYshmCF6KSmn+aPqBQvro2eKlhzS0jJ4R0LWkpufTnZ/wkpeW9zo1nyTy+toAMeTlzqWBknpES81NoM8L4tJUIGIpNUrklTkkomMSlBjRrcJbrtEjMsZKhkcJdo8JbouUx5TErkBHayke8LXZLfk38nzCQRAhmZ3e+0CD53MnF9cLdhUpvQzLDr1Mo+VB/8yE5wXr9vEuLWCDXdxPvcGGanmwjklxZNTAdhOUNIwlZecHO3UoPeG18u/qbtmmwvkzQhZx8YMkjBiHvH0lrXCZH73GQyc6VqoRDJFATDUVWQtETiZXg6Tx1gIxZw9X9r6DueM1qJEdXkHyeX0q8X1pCPu8oO5QYtYwu5eCZwOL0qkchLaxvMfEVh/npiKc0YETLj414Tz4MbpbnwoL1Dg9JCzn3IvoWmcdxpwa3pUyZEVKMfa8IlReEFUWgkrl9cQwXMfSGhIx+vainHzFX11Jent6lCylVLFFgQJP6jYPj9JJs0BrLF4abXaulJLrQMclr5fmt+p0yIyBRVZ9D0KoKh+pOLQ830Yx/X07kvBmjiYcX02leh6ifSq74qI6THg+HJsJXTU96vU13uKHyOdWRCXzULHFElSfFGqyQilDbFvJW+nrREHvzA/ephpWzF1ibrLdv/jiRirfu2WPnBv0730zGdo40YTnDEw2995ogQ68v477Sa2aVPlcCUCbEWYO1lyY+fejwUbuliMcnJvZQJsWamsnBW3PH+J63s8ZB44RkGoOrkm0GKXLc5pYs2kxBk1vuZYHHg+8oVPGTqma7MU8rHMJZsmFgxRODIeokYhrGJm/R9eIW3knUkmH6rgmClgmuZ34BjSHYTAT5UB4Lf5k7zq0CynkChJeIJMUiF0BKRmOGJn45Gv3ZzCTcoaeTJoZORdNJVK51EgDEFXLIXRoeslckwypFEgLA7m31gAnUTbju2hH7BXtR920dPle3yTVoiAoHbRCCf37/hfNnCMSGCIK9dXSEE+vThhMTjULHFQAVTHOtIrEzfvbCcsERw6KNVLQS0LTEIlngsIdz/s9IW63wJV/vV0gLP/w0oZif/Brp2UU0s1EnfU0JIO39ofgZJvM/OUb97vZYuYt9xec0RPoDClx/O0ncuraOrjiymcbxj4YufkjfE2VGmpGrd8VZIOWEaGvNCwGxtbuRlBNlUBCIAIPbgaVWmpAaw9R4N4GcOTEgmkhhfSgi56egS02WwTbFhFvTuwSUE+xaqjUwM8sf/Cw4poqO4yoGodT820aXzU6tWwJtS1ercxmduYAEi4ff49Op6unFJLRWzLmCx889vh2zGKDQAhPz+mBJ6i50x/7OhwSRmR22Q+j2a2vpJSoRsC0TWbSz2YOsJAIpuhe95xw5ASAnEid/WtE7/p0RIgJmIgqBAvzy8mLDYg9+C+3BURGsGiFXgWPdCqZ1/p0SIyA4rUtf0L6bpK+qjCiyIEmnduiohBGuEgI8vCnWC31YGaa+KyKrVjTeFQY/cAiWt1r95B9vaH5pMaSza2NBCBKoOPqu3sQO0i0SAOUokIg/yLp7HjtWsJw0S84c/U+2WIFrwKiGkBVvzD5VKbMVt919J1bJDns77jgkZ0IqNGU4JwvqjU3BctZ5ilwwvgmOJeJEIlMnThMgtXyIGJk3IibwhJt3Q08Gqr+MdcJjxYZaXCOTdDXLaWDsd5Of4De87dKJOwLGyY3t4KuBkN4WTfJKuWk6QZiKtY4nIhfzbSSU0oocztye70XCqo4GUJAIXP6+AY2WPV3BwG8bnZOBX/6mhBTzVVQUpVS1rIVKtHlZ8Tv6nVLWcZOR2Wk2I2xx2il9LxCnH3E6fQxIxaLLb3HIbP7bv+TZMbHMLnzy03O3M3MIPzyDgjrCidZ8XLGn8ompbLngMucU45XhZI8zK1IzYFEhIEJWpr1EoL20eIWTtZsEMMuCSWf19pfNl7TziVbpIZe3Y4YN/bLoy1PnE5wAv5rX18Vd2OCvHpyVnnubMeDFXJKIF4jFJaoFogXiMAx4rjlJLqZW2XdgLcMi+BewA4SM+PybrAQ5/H3zXSE523Dol2hWBPDPST0fs5Z2FBqdMSTZ9L17ZrE9yzSFZnMoFMqpnYUxhYMFwPTstZiMUcd06rXthlCsgPElVr58oF0iH8shxAgSRzDK01wUF9y0cg7L28uR3hLeGpkjutQZDgneyVStikSUfsBPruYp7rgtERSGB4wQ+VQjrxPjE8iJWlU+m8WSFQNAvTRsWPucK2x5KHTa2OPtHAE6lEcIV9zAi9AI4JMu9IsMFHd7bycKqS+zb8rF80JLY1iHwwZnaPAeCA1vgueiMr+Q9K1ceEcr3sldqaKFC7wuRt5OrZwTyz/dC7vRy4Vd+30RnzKq23R2IABM381YVK1iFAY2AMHAKNjzZX/55Gd37Tp15cvnRfHjO/uwc/hLfG9e7iFZubaRv2AM+U+AZgYABz3/WYB4RHtoGEzq8bb9dfLTwnDJzhCMz6RE+VPFOPlQRR4+dz1stb+UtlwBsu5EBAriqWQM27Wyii1g4iNDy0Id1tGijzxQE9pzO4VPzbhhUTFOH+SkdDu9yGeXfSp2zgBgbCa8bGG56Ep1G2Yn3YoAJB7YLd2eiOVkwtsyMpQO8V7Az19zPG2hXbusXnVdmXnFfpP3jkBL6+QFh173ZvP8PZyoKePMX5YS8hjxZTRt5Sx00RmxpnXxcCZ3H2oEAQYkcNNH3yCDyl++l8jvMhVSwtPJdCA+MkoWxVpo8IrARAG0+hAHYzpvIDuNNmgLOOSgkhKdXRXrejeSBAJg3pllIc9bW04yV9aYw0Myt4/kEnl/PlQfNJVxx/YWZ79gz2mTh5Dd8fs1NygTuD7ADFkIAW9CKP8TPLmOhIVIFmiK0+91399ETzRsXcJ7lU83HPP7lxHBf8j7bm65bVBuxYeie5eFT5ibzXs+pH9VRPTddCJMFyGQzZRag+SujAhEF+cf/6gif3x1VYrbxCFaG+BZ/ZCbic0m/IrqO4yiJQ3nf+KqRLuTIEaLrfWNcOe0dCvNHA3mDLKJ6JYLNGey445XNEwIRBUSHK0Ds+bt7WR09zB3w1A8jO+t+HQpMzcGeWRmWXVBujprke9n02zMCwfm+VljDexgx8sHHDqAtx+4TlgqaOz+jwjbbbIRoLmSIisW8cdRuxIJdsW9x5y/DCTxaUnEAgYzTC78zOspKlgHYqtyPR1YYpuKDA6dzURjgh2c0JJFwMFnEmT65Dq5riNy+5zozVdDnuob04HmDmN2ilmcjIMYPjnVJB7guEJkITPw0xOeA601W/Oz1UysHlAskEwfhW4lK1/9bW3EWXqKyudJkYT6BFbjX2Cqbi83UX9imBoOkG6Dc/O5GIWWcdhEZ5DTyb7vJppzGS7+VN1leIi4by+JKk+WEEa05E8IJfjHkTvTOlqomGvlcIGZg6UTvqnye0SYrWWapJDgRrkw3cRltshDq3EuwXQrglqlyZVRDMkW0l/PNqIZ4mTGZKpsWSKY4b5OvFogNYzJ1WwskU5y3yVcLxIYxmbrNTlDGkkxlrvON5oC5QNH1gZ3ZuXIUTU9W3+GFsCktK0Y8Q/0qGAx2zmqKsrjwOC9r5fiKzS0CEbT0fqyyYyAQ/IxVpq24p6/ucAAasX5im0ky9iiB4GH3KZVD2e31BiMYPIIFE+nuLb+tfzvmADN8DTsvv+pvV/GblWcZUYsqEQLpOmXn7ewwe7PjXPQLreSAUVWwX3m7dcOMlvPKWgSi+5BW8lTBa0aB0Wf9ZRXmuWXmPIQ1Y5nu0BVwtpUogo3Bj3HMIl73oRPnZmpgK3Hp1xRxIHT4KAsEIypFODWalDgQLMf5lzjiTw9vU2KkupcD2yrv1bYsdfxMHVOQTtICSZ2NyjBwa9VTC0QZO9Ug0gJRw0dlWLRAlLFSDSItEDV8VIZFC0QZK9Ug0gJRw0dlWLRAlLFSDSItEDV8VIZFC0QZK9Ug0gJRw0dlWFzdH4IY07339FExTgvLcsDW6C/54LOFXzRQHa9vuwWuCKQn702ff3ZZZMQxtyjIAN6X1jXQlQvDp9WpLILyJqucj2N9JYeFAeafzseOP3RK+NhaTwvkaT6IPx/g5K6FrpzuoLzJOmiPaKXDUXwvs5rjSL1shG587ODgLuEzuQQNCMWB00xVgnKBWAs3fUU93fZmi5eL9XHW/Me4BAdnytCJ46KoBvUYLSW8gw+czAXAOV2vcaQHt8F1gaQjooDbTBL4p6+IcjQUj5RdXReIspLmCSItEI8J2vVOXRW9CFGBuCG5ErHHji9ZoSE38dHgIogLhp/y0eR2hMW7fzWHxRDnAsdLl4lnWSGQCw8JH7AMJv3+mPCx4skyTQ7oglglFXxk36C9w3ML64HMyeJVnc4zTdYp3QrpgaEhc4SwFe3uN+g2DkNhtU0eyUbLsXwI/8zmc98f4eg74iDmQXxcx3dVPEaV4NlRfjq8YwFVcRxCmHYEzBjhpw3bm6grh7QAZPqcE5TBMwIRwkChYCs6vXvkJAz3BYCldx1fYn7EPXHFgcvW42Rf4LgkEAiE8cQn9XRL80lwXdr6CMICeGV47hmBYOJl1QQwCkeGP8VhJuatb6AA13Cc+Y5YH7FMNEgfK6Lok6xJd7AAJ3JIo0V8gva8s8qoO5tDpnGEhAF8eD8O85fDZABPpsAzAnmcI+UgNJEMiIDwOp/tLgPifCBEBYKCgZHtuFmT4ZGPIydvvdm29luOulDJsacWcHwpRF7AusYfltUSBgsQ4JAnq2gNB4lErJFZn0Ye+i/jTsdvz3Tqd3D4IrnZQLgKIQx0yOgjzuxV2BKWooY1B0eOyzUbYVARTUEAhIXYUui8n+eIO4VMLcSHKDsIlTSZbWyIT9LQHID0Ho7SI0eDE3jSefWMhiCKJj4AhB5CjQbIHbZ5g78QJLj/9GrzOnRmtVnr8WqRpXohWMs8jsxz6v6FtDvPYQTjR7NgX2Qr7YUcRAZNmAA0m9awGOJZuq4WEtKVbXQ+V3H4OgCYKOJAIbKOGD3Jb0BjPrk4FAYP969fHDZgihBIIv2vOHbV8U9Um7Fsce+X/P9PJ5SaTRQ06LL5NXQY90sQPwYDb38T2UQKPOm6Zlwg1w4oNo8ix9wAcHuzdXgPZlZ/Ht4CEF3twIcrzWHpjUvCzL/v5NAw+Tmp3b+TO+/F55bRcVJMkWBzLJ45Y8poPmsMhrc9OdLzIdOqyM/CnXWmn6qaNdLMMINfGW2ylvC5vhh6yvDet6EaiujMAo7jGi4AsaiG87NjOP7g8c2LRqHGTaQg2pdD7T1+mp/EfOb25pB6B7PDBc55RDwqCPnE/QrpjB6hfDBR7FhuZPwQzDDVYXrS9ssqDGRc2TzI6dQmJKifYhzgP3tNvSmQEimqGvoHdNoyDOPJ5pV8A83W1FP9dBePrGq5y8CaP2IXoi86/dlqGtWryOz4N1smlDKudP22kJCubEP5iFB4cq77NAf3Wv51SFNwQrbo7EW6K5qbNzmoi1UYSHvT66HmDXOZcS8FaBVHDv2cZ+aIaQW4Y2kdIZooFtG8EqUtowJBsEgMQTG3EDCqZ2gughBIAlZfWkEHcOBJNCmPDfebTRKeoUMGyHYqaNSf3q6jHtxHWKN+mon5C88RG1GYXsR9L1wzKhAwAFE3UTuFOUNMDtEvjHkhYPIItR+z66Xnl7f0G5jArefaDph6atgl51AOjTTl/TpqDMvYTGP9ssbLtT7P1P+MC0QQPoNtTKJzns4dMuD9zY0EY+HX0nFemPyNnxug65qHuvuzYVBYbT+VNE3gzbZrRjt1K7Oa54VmGDwYD3/7Wq1puT32idgHLkMYCFwsANF8sh08Q4GYhwiGwry+nINEIlp0LMBQVhYG0qDzt+KJ9a6X73lGQy47NNKwCKa1L+PI0DzJA8CUUsVD4g7csccDWILdiu0RL19Vz2JXP1XYHeCRF47wGmKey4CJm1UYGFF9uSOy90aA+mwGz2gIQnIjTjpqCCyxf+dgxYA+7X00e3S4nzBv8hfWMbY2ByHGBBPx1L9i4YjOXqTLtqtnBGKNky4Y+fGWJtPM0bl55o77iPQshIH/0JJzeF6RC+CZJiseM69cGDYoIt1kXjvJVcgKgXzAAeuf43VxwEJe9YPFNlfBM01WIgZfu6iGrl2UKFX2P88KDcl+NidPgRZI8rxir5j4cyAHqGyTui4QeIfkCsTaRaWaNtcF8uo55arLnBF8e/M6zbiDo60Jqgvjev3tVGGYy6Zw40xkEldNnCp85WwlsC6SqcJtxeO6QESGVtOIuK+vkRxwvcmKzE7/S8QBLZBEHErzcy2QFBguVjhTQBH1qnKByP65Ubnl2I0VLpj6lQvkb++GnZ1zjP9R5CzdpH7tRblAsFonu/VEUZEjN2RvSpUkKRcICge3nnvfyU1NwSolFtPgiuoGuB4tGjtmrUuvqRDyKDvKJQvwSvzL22rWTrCk/BEvlsH91E1wfWKI5mv1NjdJsMeNU4iwrz2bwJUmK5sY4LWyaoF4TCJaIB4TiOudejx64c0+e7Sf2pdnvl7MWVtPV72qZgAQj+ZEz1zv1OMVAN7sXoERPUJrHZkWSuarplckwuUQQslkkbRAJO5vqXJnsidlkfBnRgWynecJXoKRz2Xe+zGjnXo8YQzlc3Hv/1l4Z1S8tE6eYbOnF079sSuzZwViV+Bcv5/RJivXmdsa+rRAWsM1F9/RAnGRua1BrQXSGq65+I4WiIvMbQ1qLZDWcM3Fd7RAXGRua1BrgbSGay6+owXiInNbg1oLpDVcc/EdLRAXmesUNW/Q2qkF4pRrLqYPkvGeFoiLDHaKmo/8vBv7GKc4fVGnd4cD6yZWLPCtn9hmkjvoNVZHHDBoMtKbTVaZ39jL0cs6sVIOGIaxacPENrcAqSmQleMrNmuhKOVx8sgMWs5nCe8jXojaCd9tys4HOGLARJFAX93hADN+h99v9IIyyDlECUR+iN+9H6vsGKgJ3sInVJ7HLgltrc/1f82BbOMAlIHDZMzwlxq3WxXCSktMBYFSVNcEX2ClGGh9Qf/XHMg5DnA3XlZqjIqlLBEKEuot6N1gMNg555igCdIcSMABTD78pXSkrCgthqyuU3beXh0IfquVIwEX9eOc5QDqPnQAuiCINHsQPREU7NBXzYEQB2Bwh43X6D6lcmhjMPiKZozmgOZAJAcKDOMUH2+ovyHytv6nOaA5AA5AN3xGMHiEZofmgOZANAegGz5e27CPIB/9jr6jOZA3HIButFix8oZqTajmgAMOaAVxwCydNP84oBUk/2SuKXbAAa0gDpilk+YfB7SC5J/MNcUOOKAVxAGzdNL844BWkPyTuabYAQe0gjhglk6afxzQCpJ/MtcUO+CAVhAHzNJJ848DGQ2F0Bp2+7nEZ/YqorMPLKIeu/uohE8D0eBdDmzniGlrOMbVEyvraf7nDZRtQS2z5ljx7rv56JFhpbRPW93peVcdEpdsxdYmmrQgQF/v9FbQBbuSZ0Vtm9CniP4ztkwrh50Us+j+IXv66PVx5TS6V3YMXjyvIP07FdA1A0qyqArooibiALax3nZsCR3W0fvjY8+r8cHc4mDeEQ8aOEbUDB7jPvxhHW2tDhL+a0g/Bwq5uW1fZtClhxbTuQcVEf7bQVmRQf06+Oj9zd6OgZug6tmRl777xb6Ig1eiMkag4eHPVtPmyuwY00YRkEM30DB9w3K49Y1aeuiDOpp7VhntWmIvv0Sy9QJr4ui4F4qXuAwvr2vQypGYTWlP8S0rynOfNqQ9X9UZZr2C1Hu7h1Ytr6zC99YmrSBZJTBdWM0Bpxzw/BzEKUFeSD+QLW8ncbxeTFI3/tREs9c0EOZKGrKPA1pBFMqsU4VBT57hpy6Wxcybjy6hRz6qpzuX1irMzTmqYraqHrFXAdXwyOejLY3UqK19CZmoFSQhi5JL0KHcoJkj/dS5Texp3UV9i6i+KUj3LK9LDqHiVHu3Mejln5fRLs1WJaxknzW7mjCZ1mDPAa0gNrw5oJ2PTtyvkHYrNehT9iX68LtGWvejfZN7Tf9iW+UQWYzsUUQzVzXQlzti4ylg3eq2q496sY8ZFO7LHUFauqmRquqTq8RD9i2km48u5nUjgxZvbKCZq+tpew3RMZ0L6JJ+RS3KgfJAYW7hnu3xFfX0BQ8DD2R6x/cppt57+Gj99ia6dnGtOTwUZc/Xq1YQi+T7ti+gqezztYc/tv0eC5EP8YJkHVvPzj+4yKzQCZZqWnLoyEOwJeeVmQ57X7GSLPqikd5gS88IVpxTuxVSqY00XlnfQP+3qJaq4yhKARd3XO9C2m+XUA82lhfq8BGAORCU/IufsJAaZAXxmSvZQzlfK+zuL6BfH1FM1/yXtSvPIZo7ec6QwfsW2CoHWLMnrxTfdJS96wu8VWF6buKwUIAC1p4irrOyEqEyoyJP6ItPuBKbL8T4OoUr8Zy1DQRFsQPke8XCWpoxwiAoOeC7qiDduKSGlnwZsoVj9Ror3UX8eCs/g6ctAN4Kdx1fal7x/z1e3b759czOl1AOL4BWEIsUsLg1ht3pMQRJBOhFZn1Wb1qpPtnaaE5+472D4Vp/niSP457naB72JAtreWiXjEtGO+71hIFgGhsF7mKjAJTxd6zQmAPFgne+aaSrXq2hEbOq6SzeQjD5uBIeZhXQ/rsatGJrSIFivZcv97SCWCS9aWcTjX2xmmaNKjPnAZbH5l/sa7j1zVrT7yvWc7t7GOYs2NBgfpAGnq23stPeoR3slQXzg/NfCtAWHtpZAXOWCw4poquPLCb0DgL++0UD/e3dkDHgwVNKzbkU3r/g5QB9xvMpANI/zM+OYkWdPaaMTn26mp7hOUuXtgZNOqyYXuR7AMyXbuHe5PWvQr2QeTOPvrSCxBA2LDxX8/j70eH+iA1Zq7lyTZgbMIcu8mvYtHUCT+hH9Syko/YuiKisSLctECRU2ud5PQQttgDsjRj9fIAG8LrJA0NLTYOAeIYrFGrSgpqo/EQaTMaH8nqLrBx4tpEn95ivQIHal4fmJKu+b6J1P4SNA3j+NpcFClLBnYvYeAaDhAzokS7pV8wKEpBv581vrSAxRN2DN2dNGxapHLD23M69hgyYR0zhit2LLUDxAEMfDF/wAczlHuh6thKJSTcq6uAZ1TT9tFL2cA33JhiS/ft0P418rjrmBqPKuiCdPTvA8SiJ9uWyYBh1bu/QhH/aR3Wmj9oNi2toBq/NDO5SQKsuraC3mq1iGOphPoUyXDSvhjbznASA3ZoADOuwdjOXfd2StaKZL+bYl1aQZoGiEndlE2u/9iFzp+xi/zQPPTCel+Fydum+bmCxfMv8jckyWmtYqbCS3pUrbnc224YHQETD9y+kk7jHOffFAH3AliXATq7sF86toVfYAxbWLgEo1+TjSun+/3GFr2oyvWXFM3FF1cZQDBPrXVmpgP/ZkWV0IQ+p0Osd9miVacaF8mBC3s7vo+WslI9/XN+SPxYRHzwlpEjoQS/gYZ1QGpFPPl7zWkHgEnI7T0qxndcOdrClB2sX8h6TY/fBJq5I5UAFv/yVGlr2dXgIJeMcc0AR/WFwiTlpxn0Mae77WSmN5R4A8x4A8vrHe3VsUYq0kqH1H9zFb6bBF1r0Z1Y30H2sNMIShftXHF5sKgd+w8iw8JwyWsvDqr++U0dLuVxWyxSUAgpzJZt0seYjAO/ePaTUHE6yRTivIcyVPGPDL9iShF1tiQCTW7TOMmCeAeuQgABbX6/jdQo75UC6WZ/WUxvWKbidCOjIi4HHc+WfsTKMfw1XaLiAYP5gB+U8wR7P25DRI1w8L2AOm5DWuo6Cuc96LvudrHC7c09kBxiqwSSMxUkBXXcxzIXFfPchy1sFSVbwaGVR8X6SRlg/WBwPsc7RNs7GIFHprIuPqJhwZpQBPUs85ZDT1jQEzaGZuPent+sIHyhvrNNDFp1b1rKQiHewPgKjgwwY0gGgXBp4/SpfmYCNVn0fqaJ7efgRT1nEirPMJ7wr9yqYa2BYNJHNo7EALf79PJyyPp/1WQO9yZNmGYbx/CEeYHiF3mj4M9V0KM8tPt4SqWB4N5Zy4P64OQFz8o3fWFf5Da9/WAGKoZUjzJX40giny8lfmDfcx2N+fADoKQ7ngwSuH1jSsqqM1vh6noxjMi229cLB71yubNNP8xMsXgC0+tfyvAQfeMuiZ0Dvg4m/FTCuh9PiVHZZkeFkNtnK7iF4huEbXD7iraLLOOL9xnbYoTOr4yXRzywciJaeJUE+/UXFhhn0ioU1EUMXrAXM4YUz2ZwLZUFlO48VBZYiGaBoSGtVjnpOBtPpIdMqzQMm5EHM6T0K6Z/cy8hzG+DE/m4VyiGXT/9OngN53YPYsQmtP9YGZozwm35USIf5w3w2wWI95A9s8kVlB2BijuEOoKLY4FVxn+mqgfRwb0er/b9vQ57A4h0zcfMXJs8Pn1pKh0nrH+I55ghYM9GQOQ5oBYnBe2x8eojdMDD5tsKF7NqBz2tcee9ZXhvRe2DS/Qa7ZOATD+C4iHWQGwYVR0yare/AvDv/LD/v24hevbem1f/d4YBWEAtfsaFoKq+iYxU7HsA8e3yXkL8STKQr2FlxycZGc6eeeTYXj5+AAUrWiV3LsXKN9RPst0jG4iXyxlGrGHphEREKqCG9HNAKYuE3fJOwecgJYP2gQ3loddzJe8mmhUsL1kzWaQVJlmXK0mkFsbByGU/SMXxCDxEL4KMET1nMKwbyguFY9q/C8ajWyXWsd8U99DgvrKmnBetDPQ4UYBSfVXseb3CyLujBevabV2ttdyEKnPrqDge0glj4CteN8bx4huFRb3bD6MDesN/zavqaHxpNk6uc/CXexIQPACbaB2CFitP5wLx7PvtHYRutDFhTwXoMPhq8xYE44vRWQdNdGoz2P2F3dLip4wQQrEfEg4W8z+PFZmWxS7eI94nDc1dD9nBAK4hCWV3PruUwA8eCeWyuncjOjPqonVjc8e49PcRSKBu4eGDPCFzj9+cVdljEfmTXDezKq9Udh0JOpw+VVhAXeA3XeLG11QX0GmUaOaCHWGlkts4q+ziQ9QqyG7tqyEfqZJ8IcrfEVpN1NlKa9QpyBjv5jeTDEjR4iwP7sxfzbweFN4d5q3TJlybraxZ6jz+fUMpnPwXped5fgUPPsJ9B3iKbPDt0ytZywGA5wCjRfTeDsL1YbANoLT6vvJf1CiIYCd8pnOphd0CaSKevmgNOOJD1QywnxOq0mgNOOaAVxCnHdPq84oBWkLwStybWKQc8ryD5fKqfU2FmW/p4h2V4hRbPK8gCPvL/cw7ooiG3OLCST5+cHyecg1eo9byC4OC2kbMC5v4LrzBNlyM1DuCk+DHPV5snSaaGyf23ja4P8EGsWQLYrnrLMSV0JG9f1ZB9HICr/y18SguOQ80WyCoFkZmKlVqcIYXQATjsuYIPZ8M5VF4DLKBh85UbgJatOZCVG+hbjROBhSr5gDscjYRDsp9aVU8bsnSYnLUK0mrppfnFxzjGiN323VSLgq3B2P2owT0OeH4O4h7p6cEcbwtuqiVwE3eqZcuV97WC5IokNR2ucEAriCts1UhzhQNaQXJFkpoOVziQt5N0HMQ2j8/aRcgyDdEc2M4xUIbxmcP5HoYtb3uQ2aP9Wjmi9aLlDhoO8CjfIW8VRIRHzvcKEI9+zaM8jjA1Z23s86viVZh8e6Z5xIu82eRqorqCYh6CEASIdqtbyxB3t3Coaax+370MYaezxgtJddVowZfXCtLCBYc/EOgSfmEcQzMroJDtEPCe1bEHnYsrZ/akOye99W+gosEjVUPucyBvJ+m5L1pNoQoOaAVRwUWNI2c5oBUkZ0WrCVPBAa0gKrioceQsB7SC5KxoNWEqOKAVRAUXNY6c5YBWkJwVrSZMBQe0gqjgosaRsxzQCpKzotWEqeCAVhAVXNQ4cpYDCK+xJmep04RpDqTAAeiGjw9tejUFHPpVzYHc5QDrhtH7mWBx4PvKreyY2jZ3KdWUaQ444wD3Hjv8e1Ts6Vt5llHn9xu9eGtIlTMUOrXmQK5ywKiCTkA3WFFC0H1esKRxY+USCtJAcU9fNQfyjgMGLS/Yt2LwumFGLWhvURDBiK5TK/sYDTQ3GAx2Fvf0VXMg1zlgGMYm8tGw9ZdVrJBpjVIQ8bC5R/kdBY2r+YjkcnFfXzUHcocDPK0wgn/lHuNO0WNYabNVEGtCTOZrt1UNaaLgiCAZBxnBYCdO04kn9xXWtPq/5oBXOMAVvJLL8k3QML4xKLiKzbZzStqVL8b8Ipky/j83OT3kqkKYLwAAAABJRU5ErkJggg=="; + + // 默认用户广场图标 + public String DEFAULT_FRIEND_SQUARE_ICON = "iVBORw0KGgoAAAANSUhEUgAAAMgAAADECAYAAAGtnV5zAAAAAXNSR0IArs4c6QAAIf9JREFUeAHtXQeYFEUWfjPLLmyAhSUtsKRdoiBJ0iJB4hIUVGA99b4FVA4MoJyJQwmCAkb0UDhPEAQ5zwUV4VAyIgYUkCgiOee47AJL2Ll6DT3bM9Mznaq7q2eq+JaprvRe/a9fVXWFVy645bKy4z2in96vK3dWZm5xFxZoDoFCVl1mE0BS7kJ65vksIVJEjv9P+ubKBasO6zc3wSetLBFM4Z+wbfUseLTplIBwn9LIgxyDQYlIM3/c+xxEuaOFICzEnwFpWjm/KpmIBMQC5LgV4+R+VRHxzzh0Yap/UMhnVXAhPCL3p/MOwMBmH8LtyZ29BSvBp6omIgEstUx8VXhrzX2w6M9JqmWjSERKQGQdw3rUHiY8KtUCEynCtf/cJrFs76/bFQVVSt4uQDjrt2GwYs9H3jg5jyKR0ctby+XzyiirySTjRGQpkMDJPz0ULCogPGhN5GQRkFtlQNCmvk7Z1hAbXUJlMTeTnb10BA6c3xyQJ2hNdpz6wSfx8HbfQExUMZ+wsSs7+DwHewhak+fazCcK1ylYPtnwYK9zUCKypegMVFRGneX6ZLOGSJQ7qqsPWRMerBkSIeNZcxM+AI/nCdqVQJRm9MlZwt8uTcha8goHtF1F3EVheu8zmjiVJpZrWgKIIAG5hNj0Xy/Ih0e/KC0t08dftWRDoTPzz68KLrFvwVqKfp/Sbz2cv3JcLjjcR/X+dUaMRZikfjGdvwzEcPE3QPBihPj7r3uP+nTDUmKYplaZdDFp0F9FInL9PHI+9d4jEBedKPsm+lNTJCI3uMNCkIBap0hEbnAnQoZEUK9C6Q6mUSSCifydz8DOJXRJQhIXFPqleQKIrDs83/smSROq9T/2ZZmApEH7k8YVuwckVgrYePQb2SQBNRFT+WcY1WGlGOX9NTy4kwrXW6qCJ5hSBoVLoTxN0apaYU0lyiQOHyKmD+5mZebdVNesefENoAACv15k8GUxSKiIWSNUqyvsNmOYbXUlkJ4lmmhFxYI28/7Eo8n3+7T7T/sHm/4crFX3J6yqlRe7lQLPDRgwT/0AxZ+Y1meR7oncvfDCtw1CZlctESxFqRIiYX+Kn23+ByzeOdk/WPF56MI0+Oc9e6B8QqpiWmo6EqwSyMGDDSfA+Ix1iswYSUCtIkpMlE9IU0piKJ5aRZSU8tEvkgwxqpSZWkVGd/wuKC2sRPfazwjDdxzvS//hOkao1zJooX4RhisSH1NKYCQ1qalf0YWP03ufhT9Ofk++kJJgZt+L4Ln1r1ONQYCrPkrSLCwpuE9TqyVXzJReh+SCA8LGdPoenvlfLRj0VXkfCdCoBBIzXBEtjHRMGwi4MCF1+FppKUOaV+o3/GpJCwvln5CxIaASYnqsTLBvZTGN0q8miTSu2AM2Hl2kVKZs/D+W3CEbHirwzW5bQkX7xKkaomCOD+87DsWK+C4U+5Rk0kP21lGwaMc7iqWrrohiSTYn0PRqKfGakngbvNblV6VkQvzmY0vgnR96q0qrJpFmidDovNQwprUl01wRNUzYkcay5tfsypGKuIzteTGbQ5Xlmz7npJIPw8m8U89jsuvF7IUDWwE8tQyXakEBLpfrO9LwtBdJOV8iLjg8q29eZWy1UEfixZo58dcNcRWw1XJ0JRD4Arh0LJyaXye+TIE8c4kEYmJvSNhIRPUw/q3u26BsfDVLYf/v5hHw7c5/qqKpavRr1dBdjmOcRpq4WnmVWVEi0u0BT3ydAnlXz8vRox6W2WCcsLm1brm2qspW1JGJXX8TCsq/nqeqEriGghLEv/apj6piQi5R9paRcsFBwxQrklisvJD5Yn7oRZ67UgcIzOOCkOj63/GeECY+m/mrWBG1xAfcEXz9Y2afHLXF6E5HpSKvdFoTkgGXiwqZkDSoUKhWqnFIIlZEUqnIpWsXrOA1JA0qFRmyIDUkESsiqVQEd1ZevXEpKL9a56iCFhQiQrFDDJHXJ2rgl+VgXOefyOEJ32VksRKhRgd7zvwKardm+RCVPFCrSDBGMVyszPhVXWDn6Z8l5EFYwdpzdr1PmJ4HKq9WsEqIDCXEJMHwxY1hRPul3mU3XH6rROaK0c3Z9IKYVPev4YooVQI5+6DXQTh2cZfAJJ68EN1rXX4hS3HJ4qOhX8MVUUu9XfX+wismHh8Z1nqukPXKdToTnYYq8tdGb6qtBzzS9H1vWpRiowrdYNj/anvDjHoMKXsOGUgG2x3sz9iYFW2heqkmPsGT7v7T2xD4ROh4MFSRBX+8Dvin1uEStb8b1XEVjF3hnfn0j1b9bOjVUk2FJHy85UzZ5GlJzWTDtQZaVpGWlfsE5U1Nyxc0860IxVcL23thDVyyf1ypULl4XC+MJuc35Nzm40vlgjWFKVbkw18eg8EtpkOZuCqaCvZPjIufZjrmZ1Gw8uIQJxQQqnSk/9ziocowNU5NJZABVRIROS1ZLBmqJ/n2BWIczV/cBKr1VdRUEZrM0i5LUdm1EMQG4Ykg/YW0nGW7P4SfD34uDTLsp1qRt3tsV8VQWunm1Cui+dWi0Xkp1VatgkvLUdVqSTNY4U8uXkMzGc0S0UzBogxMSkRP3XlF9KBmZh4uETPR1VN2GEnE5RqnBwGW8uDxPfesvrmjyBfgWpYY08IL7gzC9N6NZ/gw5JsaRS/kHkOLCY7fMYT1cYQjGoEvk8irIJBbgrgiBvJf6xFA7f4kMzfddXNL5v5861ngFAMRcOW4b+6PDYziIXYg4ClBhifO2KxsBzx20Ayb8aId4JlBkwvEDFQNlMkFYgA8M7JSnfOVMoi7UrvUfJJszBwAJWOFbx5ptCP91wuuwm6y8WfetjGw67Q536BUZ0rRtsQbGo7VOlIqfkwfvrAdXlra3C9U/yM1geCKiNx6L26VuXDlpOHD3fqrSC+nm+yRRevKcg7PhB/N+VMuSlMYlSard/1RAcKwcvO8phpTSoybaaQ7g9DagJ5VKX92qAikZ13f7XtoCNzoSQYtx8jHrGgH+85u8K+bqc+TfugrmACiTYSKQGgyValEHWJaSNtG0zEdVwssjF7ehux920iTHcvLYmrYW698e83CkCKG5ySapvSSBjnOz5RAXmi70DCAQ9LnGC7DzgKYEoidQLBCmymBrN430zAu/sZ2DRdocQFMCeTj9U9p3vAnxevYxZ3w7o+Z0iDH+ZkbZYlWkP593wkoWkT9SjKegwp1qMspkmFOIAhczTItQXq+Vw2YojCMbkuk8XGnht9gaZgSiBFLcM+3XQBvft9T+Fqe0ecC4JVLHk8B9J9XIljdhfBxnX8WrmZSkzZkQZQimehDnkr/VDjhbsQsX/3yHeC9u2+eoUPDvXinEp7PDqUxH91/ShDG2UuHFQVHCW/FYmwXCH7MNUu5V5FRNQlwmh9BRjdq2Z0wf/sEwY9CwZMIUodhMVGx8MP+OTBsUR1plK1+W5ssvFGM9uF9BBnBxr7gq99fE9YvnmvzFbx3z+4AoKetGwxr9n8aEG5ngK0a0qPO302pO54eF12/JsGthGaFiBPzW/1rq4a8veZ+U+srdu7BiMRExQnahH0OHnpiwdmqIWYCgM0WjrTUOBRcxRL0jmuroRksTdgJpBj5mERhaHW4wNSz7otas1FPH3YCefrObN0g9a6vzdqVbkIhMlLpQ9CGRoXiNb1kSsVV8vqt9ry+uoclJHEhzQxHRUNeWuJrzyDKVURoNvDmh3Bz+PGKGzpebOdrIH/r8eVUqkpt1wlyg3f64XWVkeZmb3wWlpOD0jQcVYGIDHWr/TQ80ODVsNj6I9bJ//fMpUOCuZZg96H6p1f7bIpA1BLn6QIRoNKHBBbLQ/QiQGWUpZd4qHx45RPelkTbTV3bH9Yemke7WGrlWSKQmqVbQEpifcFGnlrOS8X6zs6qzaeU7p66z0Ox6NBrJP5l5F09C3jVrxXO9D5Ez1ezFRXXQwN3K2469q2erKrzmN6HjP8uQzUzLCf85dAXpgsD62+6hrAMMou8ma4hLFaaZZ64QBiTDhcIFwhjCDDGjhtvD2OMp4hmRzA+Qy4+80Q0CoxUnhigmeo1z5Q1N/4Q+ZROYYS3iGMD7WXNzDx13CsQEYH+2WWTC+AyOU7q0Ta/IBbAf1UjgBpBTDI9Ic0QIBCMHDCvREaBp2C4xwNNiWASpBm43ygCrp1koWh5qqfqsDGZv1/1L81HIFlzE8aSHcr2r/T7cxm+z3mJCRVKT+6+O1+solcgvA8RIbH+l3wMNpiZmUfu9QUQPgz7ZSf8zDt06wUhUiwA2IJmFgWBYCdO7nRoKUbyX3sQuGV8FGd7E8iVa3xEZY8YfKmmQrWipMniwvCFxb6nva4Dk/jkon34B1L2QCcukEBYbAzx1OICsRF+OdJcIHKo2BjGBWIj+HKkuUDkULExjAvERvDlSHOByKFiYxgXiI3gy5HmApFDxcYw0zZb442FfYj52Fpl0sPmVBUezvl+3yxYvHMysbpKf2c+vgfUt5J2TBsIWU0m2fiOWUMaDda8uLgJdRtdVJusUR1WRoQwUORJcSnE0M1JqFqyIdU3gJpAnrnzc8BmKtLc2M4/arJ8p4QPlT4Ebb43rih/PhytXJMNE0p8MB+PF7OXKFoWYqMDb9B+k1xAMHRhGpU6UBHIM60DrScs3/1vmL3RHGs/VGqusxA8pz6l1yHAI3eiSyxWHooXLQMX80+LQbp/qTRZlclxNanDWwLCURhYR7zt4fGvA/cT3l/vZSkEuv1UNMSf+scbnvQP0vWMb93AZv+ChhW6BuRHywlogIz2OfEAQjIB+dfzhGFvfEwpb2zb6lnwyW/GLVeYIpDzl094GdXrea7NfLg9uVPQ7BiHVuJ2nPoBJnwXKLCgGSlF5OSfAqlAirhjqJRMpcmiwomkELTZG0oYkqSAZgLRpEe4OOYEMqnHDs3DSLSv8n7P/WEhE6YE0rRST+GDSw+y2N/cWfUhPVmZysOUQJ5In2UInMeaTTWUn4XMzAgkllhXQDtbRhzaWEwsVs5IEbbnZUYgqUl3UAEjLcnZ0zfMCERqItCIZCqaZHrPCE9a8jIjkFxK6wuXr5Gtyg52zAjkyIU/qMC4nxjhd7JjRiCHL/xOBUer7zOkwrSkEGYEgtPbu8/8ImFNuxdX8VgxGa6d+5s5mBEIsjPRoM3dcSs76sWBmXxMCeTajSswZW0/XeAs2vEOnL18RFdeljIxJRAEBg2FoR1cLW7V3umQvXWUlizMpjX2aWxStdAo8eZjS+Ct7tsUKWAzJfY9aIj/QzJTrNcNXZgqXDWuNz+NfMxpCFYKN0yoEQamHdlhBbRPfRS90Krqg8Kv3v+61KSzsKaXPuZjSkPwfnK8p1yra5faD7DZWrlnGvRr8q6Q/RL5QHx8fiVF69pD7/wMmlS8W8gzd+toraSpp2dGQ1pXe1iXMBARFCTeloNu8k83p+DjohPhDjKdj8PpYP/iYkp6hTFn0wtCfrv/Y0IgeOXdwGbGjNnjbW/o1h9ZALi8im5oq/8Iv8H+w+076C5fuwhLd00JlszScNsFgjd64qWQRh1eWVQuobpQzD8WF84cD2o+TbboBsldvGviLy9tIZvGjkDbBTKm42pq9cZbO9HlEkvU4q3Rrar+RXZJ+Nk2XwppcYR2+tJBwc/Cf7YKBBelUhLrUcMBN7Fh84fuvR8f8JY7rvNPXj96/tJwvPf51ZXBd7Z4E1nosVUgDzQYR72quH0IHXbk09Y9LvjLJ6SRK1YbCH7crtOt1lDB/8W2cUI64YGR/2wVSMvKmdRhwPtvxauW1uyfDdcLbpqiQi1BO/TTe58VaKLAFvzxOnX6Rgu0VSByG5eNVgjzd0i7+aGI/kNBpvWPX9yN0cw52wRidENDKCRfXpouROOufPxGkXO4ZIyb7Fhztn2pF0ABHDy/lfr6xZ6z64QN0Qj0q13WhsR7eLtvmLm2W2TUNoHghfIjl918k0VmaP7iVzqO4kI57G8eI5u5cdM2K862JstsAIa0mqOKRJtqf5X9TlGV2YREYSmQhxq9rjipKMXyja6bpI+2+sNOINgMZWicRi8ZWwGapvSyVRAi8bATyMj2y8W6afodkq6uidNUqI7EYSUQnDoxchJ4cIvpOiCkmyWsBHLDc90QOnlXzxvKTyOzKcNel9deNg0W1ZeBu1aeWlAVauMHHzFcr8XhCuP2k+pnnl03bVBrIaEqrSkCqVSiLpzM3aeKAdqJLuafgfWHv6ZdbEB5pYklB6lDujScKU3WU+mzafDGbBl1y7UFXFiTuvnbC6f0peFa/VQE4v9G4pm/9+7eBbiuHW6uc43BgFMu/u67vTP8g3Q9U7EGhBOFH/exv0PUhQCFTFuOL4W319xPoaRbtyMYLQlHNx+tG2S0GEfmx7rTEgYCQKXJwoJ+2D8HPt30PHojxl29cRke+6I01fpSEwhytWzXVGHYeSpvP1UmWSzsi21jYeCXZakvH1DpQ4IBhuvYpcg8EZ6ODQeHhmeOXdwF5y8fM606pnyHiNwePL+FLEJtER/5rwoEqDZZKujxJAoIcIEoAGR1tKlNltHKoFGw+skdNc9LydHF/b5T1vYnVkQvy0UzE2Zqp26klkNbfUZ2r99jpAjZvP3msn1PJrNNVqOK3WQBNRqI0zosO9ObLBzyplfJJJNxsapxwB0p5J5Y1em1JGxHTPHd8NzQkgX+INPyJ3L3aMqjN7GpTRYeokFjw+Hg0J4intAy25naZA1sbuwQjtmV11K+eFROSx49aU0VyJEL2/XwxGQetERqhTNVIPO3TwBWNzVrBffZb27TmkVXelP7EF0cRXgmUzUkwrHVVX0uEF2wmZeJC8Q8bHWVzAWiCzbzMnGBmIetrpK5QHTBZl4mLhDzsNVVMheILtjMy8QFYh62ukrmAtEFmzmZXC7XRS4Qc7DVW+oGLhC90JmQz+1yT3STlbmpJpTNi9SBwIw+OUvcn2TmPqEjL89CGwGXaxwWKTRZboirQLt8Xp4GBFxweFbfXMHwsCCQmZmnjnOhaACQYlLSZayd1TevslhkwNaOftkJU4gtqZuWv8RU/NcEBFw5boitjcogLTxAINJI9PfPLpvsgcujyJnWh8kWwtDWXPwz82eOAJMIuHLIiz/HBbFj/RXCn11ZBbmlFF+Rlqulfwb+zBEINwSwGyfKcp+csvgoCCpGgevSOmId0vdMfLghwuvDEZBDgHx8uD1xzaSK4p3IypqbMLYALh3jyiGHHA+LCARIx4A6gLog1lfoQfiHoAgH/+UI3EQAJ9xxjtc1YF6JjBsFNxZzYDgCHAFfBKLcUV3dBZ6C4b7B/IkjwBFABFA33MQmYVMOB0eAIxCIAOoG+Uj3sH2CPpBvHsIRsAgBT4J3FssiipwMR8BRCHAFcZS4OLNWI8AVxGrEOT1HIcAVxFHi4sxajQBXEKsR5/QchQBXEEeJizNrNQJcQaxGnNNzFAJcQRwlLs6s1QiYbjeZVoWSyK107ar3g4YVMqBaqcam2VWmxS8vJxABvKlky/Fl8N3emXAqz55bFAO5Ch3CtA3SMvFV4aGGE00xwR8aFh5rBQJbibLM2fSCcEeRFfT00GBSQcrGV4Mn02dB9VJN9NSJ53EYAkdydsD7Pz8MR3P+ZI5z5r5BOtX4G7zVfRtXDuZeFfMYqlSiDkzI2AA96vzdPCI6S2bqG6RP/dFwT111F4MeJpcsrNo7Dfad3QgXr56GggJt97HoxItnU4mAi9zZk1A0CaqSayvbpz5KvhsbKebMvH0slCpWganLYZkZYtUs0xJG3LVE8f5PvM/m043PkQuKrisCzhOwgwA5oQd9G4yFHrWHKTKF1zrjXdssOGZ6kL71X1FUDvygW7prCgu4+fAQHVVMuNw3LakZaTEbQtmE6pAQUwqiXNFEka9B3tVzZNbmABw4vxn2nFkH5y4fZf7iRJ8KUnggFnIge8tIcpPPLnik6QchZyEfaPAqVxB/zNNKhz63hS8Vznqw4IoWiYe7qveHDmkDIbl4Dd0snczdR6Y8P4aVZKh4+dpF3eU4KeO2EyvhVO5+KEcakWAuJdGaa6SC0ZeGM9ODKF20eaPgGlwvsHdY1TSlF2Q1fgcSi5WXYqjbjy9JZoNxwl/e1fNk7P0c/HTgv7rLc0JGlCP2qk5xzM1isQhcowrd4MP7TsCQ9DnUlMO/nvExJWFQ82kwvfcZaF75fv9o/mwTAlxBQgBfxB0DQ1r9B4a1ngvFyLDKCoc96ZMtZ8ELbRdCjIZbm63gLRJpcAUJIvUodzQ833YBNK3UM0gKc4PrlW8PL7VfRpQkzlxCvPSQCHAFCQJPVuO3oU7Z1kFirQnGtYNHmk4OOeNjDSeRS4UriIzsKyfWJ98BvWVirA9qWqmXsDnTesqcIiLAFUTmPahS8naIi06UibE+CNdY0ko3s54wpyggwBVE5kWIjS4uE2pfECvKah8C9lHmCiKD/YncvTKh9gWdyN1jH/EIp8wVROYF2H9uIxw8v1UmxvogPFiE21O4swcBriAyuF/MPwOfb3nZ9g2RuH/pfzvegdOXDspwyYOsQIArSBCUt51YAVN+zgKPpyBICvOD524dTfZqzTCfEKcQFAGuIEGhAVh/ZAGMWNoMzl/xufg0RA46UbhfafJPD8Ei0ntwZy8CXEEU8MdjoE8vrCGcnbaiN1mzfzYMnl9JUE4F1ni0BQgws5vXgroaIoHnUPCvWcq98JeG46FMXBVD5Ukz407ehTvehGW7ppIdy1elUeRcSRK0TyMn8ko2ApfLivbMA3hGfMWej+D85WM+vETiA1cQDVLHzYt4bmP3mV+hCDkMVTK2gobc8klxQgAPUl27cRmwfKmC4K5e3LhotbuD7D/rWfcF4YDToj8nWU2eKXpcQRTEgS14r9uGQ9vqWWRHL/27hooXLQ31y3cQ/kqTXglnz0S39+wGuHDlJNliX04MEn6vF+QLJxSB7NIy7jzCrgH/My6Xr+XAjtM/Gi/e4SVwBQkiwPQqmfBwozegeNEyQVLQD86o9RTsOLUGNh9bIhR+mhzTfXFxQxje7huf/Vi4JR7j3v3xAZ8eRw9H6VUegEEtpvlkxYXSiau7w9lLh33CI/HBikGto3C9s+qD8NH9p2Bwi48tVQ4EKcpVBJ6+83NoWaWvFzMc0r2y4i74+eDn3jD03J7cGV7ptIbwWNonXMsDDqMGt5jus1sYFXTEkmZcOW4ByRXkFhBoxXFi19/gb80/svWgEirJ4y1mwN11nvW+6wWeG/CvXx6Fr7dP9IahJyWxHrEn9Zvmc/FIAxuA3vVH+ZT3/b5ZpOfoQXqlfJ/wSH7gCkKk3zzlPnir21aoULwWM+9C39tfgQcbTvDh58vfX4XJxAKh1OQR9iDjOv8Etcu08kkb7AFPKQ6/61vAIaTocMX+003Pw/T1T9i6MCryw9JvxCtIRs0niZnT2RZNoWoTfddaQwTe8HSj6NYf/hrGrejgYwUFTx2OaL8U7kodICaT/cWp6fEZv0KtMuneeJw1m/RDH2GK2RvIPV4EIlpBbivXDh5q9LoXDBY92Ls93+ZrMgVc1MvevnO/wfAlTcB/l++AOybDvbeN8PmmEDOhnePXMtZB2fhCczs4QzZyWbp3UkBMy38LEYjYWSxsdbOavFuIBMO+uuXaCh/kE1d3A1w3QYeLeCOXtRLWSfBKCNHdV28EYPrfjiwUDPHh9wt+X3WqMcjHMN/hC7/Dq6s6+fREYhn8txCBiFWQdqn9NH/cFsJmvQ+Nqb3aeS2MIy81TvGiy7+eR6Z6M+HFdot8zs/jWfpQ5+n3n9sEr5OP8UgxVmdEWhE7xKpZuqXsUMQImGbnnU9msUTlEGm1JZcKhVIGMZ30F41B3Et6Gu6UEYjIHgTPefuvTitDZV8KHCZ9sDYL8ANd6v7a+C3oXGOwNEi1Hycn0DjFe6QHukJ6Iu7kEYhIBbl24wpM+K6bPCIOCMU9W481m0qmah8wxC1OUozPWA+vreoCZy4dMlRWuGaO2CGWUwUaT6zGj+yw0rByiPUvHVeZLJBugAbJXcQg/itBgCuIBAzWvXiRKS4KqrmMRktdcEbv2TZfkh28L2rJFhFpuYI4RMx478j4Lr8Ctvhmud71Rwp7s8wq34nlcgVxgNQaV+wBozuthtjoEqZzi9812EvhNn/uuGVF5t+Bu1IfgaHEwjxuMLTKVSH3Ck7sutFni71VtFmjw3sQ1iQi4Qc3Ij5MtsK4yYWYVjukjZeq2kHb6rqGomddsxSKCx4niwBuKxm/KkOY0i2XkGrZy4pWVfBY8YwNQwDXYCLZMaMgV67nhjzSWpQcd42Npn/klXXh48bEl5a2YJ1N1fyh3WO849Epjpkh1qaj34bEDLv8jJpPhUzDI9lHoBNZ+U+KrRSS0a3Hl4eMtzKSGQWZt+0VyL16NmTdW1d7GN7otgVSk0LfiBuyEB5pCwJ4+vE1Mk2ttDUGN2D+ZzM76zGurOx4jy2IyRBtUvFuckDoE5+zDzLJvEGn8vaTsfIvwrmIK9dyveHcYy8CeEIRLcDgLb41yKbQ8uT7SY3D752P1g1i6qZfphQEQaxUoo5wJLRE0bJqMOVpwgQB3HqPllTQsj5LjpkhlggKWvUbsqA6/HfzCMDZFO7CGwHsNdAYxeD5FZhTDkSeuR7E/3VAo2qZDcYBbrXgLnwQwIYwe8tI2HQs9OSM3TVmXkGkAOFMVpOK9xCbUJ2gYonawr4kM6wdSmlyvzEE8KP7DDFAd+zin7DtxErYQCzm41l4pzhHKYhTQOV8hg8CzH2DhA+0vCbhgABXkHCQIq+DaQhwBTENWl5wOCDAzF4sJ4GJq8K4Bb18QhrTbKOt3dkbn4Wr5O4R7vQhwBVEI264j2h0x1XEwHWcxpzWJ8c7TdBs6bR1gyN+V65e9PkQSyNyMUViyeGlQlu5GrNbnjwuOpErhwHUHT/NWyq2IjzUcCI0qtjN1msLDMggbLKi6SC8Z3HxzslkNxYzW/wM4etoBWlXvT880vR9QwDwzPQRwGuzRy5Nh5z8U/QLt7hERw+xpEabLcaNkwuBQMliyVCrrLr7SkIUw0SUoxUEZ2hO5u5jAkjORCECS3a+DxsOLygMcLDP0UMsEXdssXDGph7Z2BgdRe7R8ITH+FesH+u/eH/7OXIdw48HPhPuGgmnK9zCQkFYf4E4f85FwNFDLOfCzjl3CgJcQZwiKc6nLQhwBbEFdk7UKQhwBXGKpDiftiDAFcQW2DlRpyDAFcQpkuJ82oIAVxBbYOdEnYIAVxCnSIrzaQsCXEFsgZ0TdQoCREFcO53CLOeTI2AtAq6dbnABO6a0ra09p8YRCI0A0Q13qqfqMNKL5IROyWM5ApGGgCsHdcOF1e6fXTa5AC7tJl7n3GwSafLi9bUSgTw3xNWYmXnquPCRjp7EhAqlXeBaayUXnBZHgDUEUAdQF1AnkDehB5EymTUvvgE5TryI/KVIw7mfIxDWCLjgsNsD3Wdm5m2V1jNAQcTIId/UKHoh7/hL5PDR30kYH3qJwPDfcEIgD1yudxLjk1+b3H13vlzFgiqIf+Ix2fViDrgPtb/hKehJMt1GDu1VJGnInyfybtb0B4c/M4yAC68eO+pywVFyznR7lMu9oGpB5VVjMn+/qobp/wOmOgi15cwSYwAAAABJRU5ErkJggg=="; +} diff --git a/openzaly-boot/src/main/java/com/akaxin/site/boot/main/Bootstrap.java b/openzaly-boot/src/main/java/com/akaxin/site/boot/main/Bootstrap.java new file mode 100755 index 0000000..067243b --- /dev/null +++ b/openzaly-boot/src/main/java/com/akaxin/site/boot/main/Bootstrap.java @@ -0,0 +1,329 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.boot.main; + +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.Base64; +import java.util.Map; + +import org.apache.commons.lang3.StringUtils; +import org.apache.log4j.Level; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.HttpUriAction; +import com.akaxin.common.constant.RequestAction; +import com.akaxin.common.executor.AbstracteExecutor; +import com.akaxin.common.logs.AkxLog4jManager; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.core.FileProto.FileType; +import com.akaxin.site.boot.config.AkxProject; +import com.akaxin.site.boot.config.ConfigHelper; +import com.akaxin.site.boot.config.ConfigKey; +import com.akaxin.site.boot.config.ConfigListener; +import com.akaxin.site.boot.config.SiteDefaultIcon; +import com.akaxin.site.boot.spring.OpenzalySpringBoot; +import com.akaxin.site.boot.utils.BootLog; +import com.akaxin.site.boot.utils.Helper; +import com.akaxin.site.business.utils.FilePathUtils; +import com.akaxin.site.business.utils.FileServerUtils; +import com.akaxin.site.connector.exception.HttpServerException; +import com.akaxin.site.connector.exception.TcpServerException; +import com.akaxin.site.connector.handler.ApiRequestHandler; +import com.akaxin.site.connector.handler.HttpRequestHandler; +import com.akaxin.site.connector.handler.ImMessageHandler; +import com.akaxin.site.connector.handler.ImSiteAuthHandler; +import com.akaxin.site.connector.handler.WSRequestHandler; +import com.akaxin.site.connector.http.HttpServer; +import com.akaxin.site.connector.netty.NettyServer; +import com.akaxin.site.connector.ws.WsServer; +import com.akaxin.site.storage.DataSourceManager; +import com.akaxin.site.storage.dao.config.DBConfig; +import com.akaxin.site.storage.dao.sqlite.manager.PluginArgs; +import com.akaxin.site.storage.exception.InitDatabaseException; +import com.akaxin.site.storage.exception.NeedInitMysqlException; +import com.akaxin.site.storage.exception.UpgradeDatabaseException; + +/** + *

+ * Openzaly是Akaxin聊天软件的服务端开源项目,当你第一次从github上下载源码至本地后,可以通过
+ * Bootstrap中的main方法启动Openzaly服务器代码。Openzaly-server配合Akaxin客户端协同使用,
+ * Akaxin客户端可以在苹果的Appstore以及Akaxin官方下载
+ * 
+ * Openzaly-boot是Openzaly项目中的启动模块,主要负责项目的初始化,事件监听,日志等级变更,帮
+ * 助文档,标准化输出,服务启动:
+ * 
+ * 1.帮助文档
+ * 		Openzaly启动支持自定义参数,这些参数通过用户启动命令中增加[-h|-help]获取,具体执行如下:
+ * 		java -jar openzaly-server.jar -h
+ * 		java -jar openzaly-server.jar -help
+ * 
+ * 2.初始化工作
+ * 		项目启动前期,需要初始化服务端数据,当前需要初始化的数据包括:
+ * 		a.初始化数据库,自动创建SQLite中需要的table
+ * 		b.站点服务的默认配置或者用户自定义的配置信息
+ * 		c.默认后台管理与用户广场的ICON设置
+ * 
+ * 3.日志等级变更
+ * 		Openzaly项目中使用的日志框架为Log4j+SLF4J,默认的日志等级为INFO级别,在后台管理中,支持
+ * 		用户通过配置信息修改,来实时变更项目中的日志级别,从而达到在不停止服务情况下,修改日志级别。
+ * 
+ * 4.服务启动
+ * 		Openzaly项目启动的主要部分,包含三个服务的启动分别如下:
+ * 		a.提供扩展使用的Netty-Http服务
+ * 			使用Netty框架启动Http服务,当开发者开发站点的扩展功能,可以调用此Http接口实现与站点之
+ * 			间的交互。
+ * 
+ * 		b.提供客户端访问Netty-Tcp服务
+ * 			Akaxin的客户端【Andorid与IOS】通过tcp连接保持与站点之间的长连接,实现用户与Openzaly
+ * 			之间的IM功能以及部分API访问请求。
+ * 
+ * 		c.提供WEBIM使用的WebSocket服务
+ * 			暂时此功能未上线
+ * 
+ * 5.标准化输出
+ * 		在标准输出界面输出Openzaly的启动情况【log日志信息中支持更详细的启动记录】
+ * 
+ * 
+ * Begin from here,start the Openzaly server for clients
+ * ......
+ * 
+ * 
+ * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018.01.01 11:23:42 + */ +public class Bootstrap { + + public static void main(String[] args) { + + // set root dir + try { + setBaseDir(); + } catch (IOException ioe) { + BootLog.error("openzaly set base dir error"); + System.exit(-100); + } + + // 增加 -h|-help 启动参数 输出帮助文档 + // use java -jar -h|-help ,get more help message + if (Helper.startHelper(args)) { + return; + } + + PrintWriter pwriter = new PrintWriter(System.out); + Helper.showAkaxinBanner(pwriter); + Helper.buildEnvToSystemOut(pwriter); + + String nettyTcpHost = "0.0.0.0"; + int nettyTcpPort = 2021; + + String pluginAPiAddress = "0.0.0.0"; + int pluginAPiPort = 8280; + + try { + setDefaultSystemLogLevel(); + + // client tcp address from openzaly.properties + nettyTcpHost = ConfigHelper.getStringConfig(ConfigKey.SITE_ADDRESS); + nettyTcpPort = ConfigHelper.getIntConfig(ConfigKey.SITE_PORT); + + // plugin http address from openzaly.properties + pluginAPiAddress = ConfigHelper.getStringConfig(ConfigKey.PLUGIN_API_ADDRESS); + pluginAPiPort = ConfigHelper.getIntConfig(ConfigKey.PLUGIN_API_PORT); + + // add site config to database + initDataSource(); + // use thread to update site-config cached in memory + addConfigListener(); + + // start server + startNettyHttpServer(pluginAPiAddress, pluginAPiPort);// 0.0.0.0:8280 + startNettyTcpServer(nettyTcpHost, nettyTcpPort);// 0.0.0.0:2021 + + // disable websocket server + // startWebSocketServer("0.0.0.0", 9090);// 0.0.0.0:9090 + + // start spring boot for openzaly-admin + initSpringBoot(args); + + Helper.startSuccess(pwriter); + BootLog.info("start openzaly-server successfully"); + } catch (Exception e) { + Helper.startFail(pwriter); + BootLog.error("start Openzaly-server error", e); + BootLog.error("Openzaly-server exit..."); + System.exit(-1);// system exit + } catch (TcpServerException e) { + String errMessage = StringHelper.format("openzaly tcp-server {}:{} {}", nettyTcpHost, nettyTcpPort, + e.getCause().getMessage()); + Helper.startFailWithError(pwriter, errMessage); + BootLog.error("start Openzaly with tcp server error", e); + BootLog.error("Openzaly-server exit..."); + System.exit(-2);// system exit + } catch (HttpServerException e) { + String errMessage = StringHelper.format("openzaly http-server {}:{} {}", pluginAPiAddress, pluginAPiPort, + e.getCause().getMessage()); + Helper.startFailWithError(pwriter, errMessage); + BootLog.error("start Openzaly with http server error", e); + BootLog.error("Openzaly-server exit..."); + System.exit(-3);// system exit + } catch (InitDatabaseException e) { + String errMessage = StringHelper.format("openzaly init database error {}", e.getCause().getMessage()); + Helper.startFailWithError(pwriter, errMessage); + BootLog.error("start Openzaly with init database error", e); + BootLog.error("Openzaly-server exit..."); + System.exit(-4);// system exit + } catch (UpgradeDatabaseException e) { + Helper.printUpgradeWarn(pwriter); + BootLog.error("Openzaly-server current is an old version ,we need to upgrade.", e); + System.exit(-5);// system exit + } catch (NeedInitMysqlException e) { + Helper.printInitMysqlWarn(pwriter); + BootLog.error("Openzaly-server need to init mysql.", e); + System.exit(-6);// system exit + } finally { + if (pwriter != null) { + pwriter.close(); + } + } + } + + private static void setBaseDir() throws IOException { + String baseDir = ConfigHelper.getStringConfig(ConfigKey.SITE_BASE_DIR); + + if (StringUtils.isNotBlank(baseDir)) { + File file = new File(baseDir); + if (!file.isDirectory()) { + file.mkdirs(); + } + System.setProperty("user.dir", file.getCanonicalPath()); + } + } + + private static void setDefaultSystemLogLevel() { + // 更新日志级别 + AkxLog4jManager.setLogLevel(Level.INFO); + BootLog.info("{} set system log level={}", AkxProject.PLN, Level.INFO); + } + + /** + * 初始化数据源 + * + * @throws InitDatabaseException + * @throws UpgradeDatabaseException + * @throws NeedInitMysqlException + */ + private static void initDataSource() + throws InitDatabaseException, UpgradeDatabaseException, NeedInitMysqlException { + String adminHost = ConfigHelper.getStringConfig(ConfigKey.SITE_ADMIN_ADDRESS); + int adminPort = ConfigHelper.getIntConfig(ConfigKey.SITE_ADMIN_PORT); + + String dbDir = System.getProperty("user.dir"); + String adminUic = ConfigHelper.getStringConfig(ConfigKey.SITE_ADMIN_UIC); + Map siteConfigMap = ConfigHelper.getConfigMap(); + + DBConfig config = new DBConfig(); + config.setConfigMap(siteConfigMap); + config.setDbDir(dbDir); + config.setAdminAddress(adminHost); + config.setAdminPort(adminPort); + config.setAdminUic(adminUic); + config.setAdminServerName(PluginArgs.SITE_ADMIN_NAME); + config.setAdminIcon(getDefaultIcon(SiteDefaultIcon.DEFAULT_SITE_ADMIN_ICON)); + config.setParam(PluginArgs.FRIEND_SQUARE, getDefaultIcon(SiteDefaultIcon.DEFAULT_FRIEND_SQUARE_ICON)); + BootLog.info("{} init datasource config={}", AkxProject.PLN, config.toString()); + DataSourceManager.init(config); + } + + /** + * 启动Http服务,提供与扩展服务之间的hai(http application interface)接口功能 + * + * @throws HttpServerException + */ + private static void startNettyHttpServer(String address, int port) throws HttpServerException { + new HttpServer() { + + @Override + public void loadExecutor(AbstracteExecutor executor) { + executor.addChain(HttpUriAction.HTTP_ACTION.getRety(), new HttpRequestHandler()); + } + + }.start(address, port); + BootLog.info("{} start http server {}:{} ok.", AkxProject.PLN, address, port); + } + + /** + * 启动Netty服务器,提供用户与站点服务之间的长链接功能 + * + * @param address + * @param port + * @throws TcpServerException + */ + private static void startNettyTcpServer(String address, int port) throws TcpServerException { + new NettyServer() { + + @Override + public void loadExecutor(AbstracteExecutor executor) { + executor.addChain(RequestAction.IM_SITE.getName(), new ImSiteAuthHandler()); + executor.addChain(RequestAction.IM.getName(), new ImMessageHandler()); + executor.addChain(RequestAction.API.getName(), new ApiRequestHandler()); + } + + }.start(address, port); + BootLog.info("{} start netty server {}:{} ok.", AkxProject.PLN, address, port); + } + + // websocket for web-im + private static void startWebSocketServer(String address, int port) throws Exception { + new WsServer() { + + @Override + public void loadExecutor(AbstracteExecutor executor) { + executor.addChain("WS-ACTION", new WSRequestHandler()); + } + + }.start(address, port); + } + + // springboot for openzaly web + private static void initSpringBoot(String[] args) { + OpenzalySpringBoot.main(args); + } + + // add config listener,timing to update cached config value + private static void addConfigListener() { + ConfigListener.startListenning(); + BootLog.info("{} start listener to site-config", AkxProject.PLN); + } + + // get pic by base64 + private static String getDefaultIcon(String base64Str) { + try { + String fileBasePath = System.getProperty("user.dir"); + byte[] iconBytes = Base64.getDecoder().decode(base64Str); + String fileId = FileServerUtils.saveFile(iconBytes, FilePathUtils.getPicPath(fileBasePath), + FileType.SITE_PLUGIN, null); + return fileId; + } catch (Exception e) { + BootLog.error(StringHelper.format("{} set openzaly-admin default icon error", AkxProject.PLN), e); + } + return ""; + } + +} diff --git a/openzaly-boot/src/main/java/com/akaxin/site/boot/spring/CustomizationWebServerBean.java b/openzaly-boot/src/main/java/com/akaxin/site/boot/spring/CustomizationWebServerBean.java new file mode 100755 index 0000000..f224356 --- /dev/null +++ b/openzaly-boot/src/main/java/com/akaxin/site/boot/spring/CustomizationWebServerBean.java @@ -0,0 +1,43 @@ +package com.akaxin.site.boot.spring; + +import java.net.InetAddress; +import java.net.UnknownHostException; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.web.server.WebServerFactoryCustomizer; +import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory; +import org.springframework.stereotype.Component; + +import com.akaxin.site.boot.config.ConfigHelper; +import com.akaxin.site.boot.config.ConfigKey; + +@Component +public class CustomizationWebServerBean implements WebServerFactoryCustomizer { + private static Logger logger = LoggerFactory.getLogger(CustomizationWebServerBean.class); + + @Override + public void customize(ConfigurableServletWebServerFactory server) { + String adminAddress = ConfigHelper.getStringConfig(ConfigKey.SITE_ADMIN_ADDRESS); + String adminPort = ConfigHelper.getStringConfig(ConfigKey.SITE_ADMIN_PORT); + + // set admin port + if (StringUtils.isNumeric(adminPort)) { + server.setPort(Integer.valueOf(adminPort)); + } else { + server.setPort(8288); + } + + // set admin address + if (StringUtils.isNotEmpty(adminAddress)) { + try { + InetAddress address = InetAddress.getByName(adminAddress); + server.setAddress(address); + } catch (UnknownHostException e) { + } + } + server.setContextPath("/akaxin"); + } + +} diff --git a/openzaly-boot/src/main/java/com/akaxin/site/boot/spring/OpenzalyConfiguration.java b/openzaly-boot/src/main/java/com/akaxin/site/boot/spring/OpenzalyConfiguration.java new file mode 100755 index 0000000..4c7a52f --- /dev/null +++ b/openzaly-boot/src/main/java/com/akaxin/site/boot/spring/OpenzalyConfiguration.java @@ -0,0 +1,20 @@ +package com.akaxin.site.boot.spring; + +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; +import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +@EnableAutoConfiguration +public class OpenzalyConfiguration { + +// @Bean +// public ConfigurableServletWebServerFactory webServerFactory() { +// TomcatServletWebServerFactory webserver = new TomcatServletWebServerFactory(); +//// webserver.setPort(80822); +//// webserver.setContextPath("/akaxin"); +// return webserver; +// } +} diff --git a/openzaly-boot/src/main/java/com/akaxin/site/boot/spring/OpenzalySpringBoot.java b/openzaly-boot/src/main/java/com/akaxin/site/boot/spring/OpenzalySpringBoot.java new file mode 100755 index 0000000..30bb7b6 --- /dev/null +++ b/openzaly-boot/src/main/java/com/akaxin/site/boot/spring/OpenzalySpringBoot.java @@ -0,0 +1,45 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ +package com.akaxin.site.boot.spring; + +import org.springframework.boot.Banner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + *
+ * 	openzaly支持springboot框架,在启动main中会同样启动springboot
+ * 
+ * 	在maven modules中,springboot会存在启动main中扫描不到其他modules中的package,两种方法解决:
+ * 		其一:@SpringBootApplication(scanBasePackages={"com.akaxin.site.*"})
+ * 		其二:SpringApplication.run(Class...clazzs ,args),clazzs 把需要加载的主类添加上
+ * 
+ * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-05 19:25:55 + */ +@SpringBootApplication(scanBasePackages = { "com.akaxin.site.*" }) +public class OpenzalySpringBoot { + + public static void main(String[] args) { + + SpringApplication application = new SpringApplication(OpenzalySpringBoot.class); + application.setBannerMode(Banner.Mode.OFF); + // application.setDefaultProperties(properties); + application.run(args); + } + +} diff --git a/openzaly-boot/src/main/java/com/akaxin/site/boot/utils/BootLog.java b/openzaly-boot/src/main/java/com/akaxin/site/boot/utils/BootLog.java new file mode 100755 index 0000000..5c5d1ca --- /dev/null +++ b/openzaly-boot/src/main/java/com/akaxin/site/boot/utils/BootLog.java @@ -0,0 +1,24 @@ +package com.akaxin.site.boot.utils; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class BootLog { + private static final Logger logger = LoggerFactory.getLogger(BootLog.class); + + public static void info(String message) { + logger.info(message); + } + + public static void info(String message, Object... objs) { + logger.info(message, objs); + } + + public static void error(String message, Throwable t) { + logger.error(message, t); + } + + public static void error(String message) { + logger.error(message); + } +} diff --git a/openzaly-boot/src/main/java/com/akaxin/site/boot/utils/Helper.java b/openzaly-boot/src/main/java/com/akaxin/site/boot/utils/Helper.java new file mode 100755 index 0000000..9c8734e --- /dev/null +++ b/openzaly-boot/src/main/java/com/akaxin/site/boot/utils/Helper.java @@ -0,0 +1,241 @@ +package com.akaxin.site.boot.utils; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.PrintWriter; + +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.HelpFormatter; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.utils.PrintUtils; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.site.boot.config.ConfigHelper; +import com.akaxin.site.boot.config.ConfigKey; +import com.akaxin.site.storage.DataSourceManager; +import com.akaxin.site.storage.dao.config.DBConfig; +import com.akaxin.site.storage.dao.config.DBType; +import com.akaxin.site.storage.dao.sql.SQLConst; +import com.akaxin.site.storage.exception.MigrateDatabaseException; +import com.akaxin.site.storage.exception.NeedInitMysqlException; +import com.akaxin.site.storage.exception.UpgradeDatabaseException; + +public class Helper { + private static final Logger logger = LoggerFactory.getLogger(Helper.class); + + /** + * + * @param args + * @return true:only print helper message false:start openzaly-server + */ + public static boolean startHelper(String[] args) { + PrintWriter pw = null; + try { + Options options = new Options(); + options.addOption("h", false, "help message list"); + options.addOption("help", false, "help message list"); + options.addOption("team", false, "specify openzaly TEAM edition and init database config"); + options.addOption("upgrade", false, "upgrade openzaly server and database"); + options.addOption("migrate", false, "migrate data from sqlite to mysql"); + DefaultParser posixParser = new DefaultParser(); + CommandLine commandLine = posixParser.parse(options, args); + + if (commandLine.hasOption("h") || commandLine.hasOption("help")) { + pw = new PrintWriter(System.out); + // 1.print logo + showAkaxinBanner(pw); + // 2.print Userage + HelpFormatter helpFormatter = new HelpFormatter(); + helpFormatter.printHelp("java [=value] -jar openzaly-server.jar [-h|-help]", options, false); + // 3.print helper message + printHelperMessage(pw); + return true; + } else if (commandLine.hasOption("upgrade")) { + pw = new PrintWriter(System.out); + upgrade(pw); + return true; + } else if (commandLine.hasOption("team") || commandLine.hasOption("TEAM") + || commandLine.hasOption("Team")) { + pw = new PrintWriter(System.out); + initMysqlDatabase(pw); + return true; + } else if (commandLine.hasOption("migrate")) { + migrateSqlite2Mysql(); + return true; + } + return false; + } catch (ParseException e) { + logger.error("print helper with startHelper error", e); + } finally { + if (pw != null) { + pw.close(); + } + } + return true; + } + + public static void showAkaxinBanner(PrintWriter pw) { + BufferedReader buffer = null; + try { + InputStream inputStream = Helper.class.getResourceAsStream("/logo.txt"); + buffer = new BufferedReader(new InputStreamReader(inputStream)); + String line = null; + while ((line = buffer.readLine()) != null) { + pw.println(line); + } + pw.flush(); + inputStream.close(); + } catch (Exception e) { + logger.error("read helper message from file error", e); + } finally { + // 关闭buffer + try { + if (buffer != null) { + buffer.close(); + } + } catch (IOException e) { + logger.error("buffer close error with IOException"); + } + } + } + + public static void buildEnvToSystemOut(PrintWriter pwriter) { + pwriter.println(); + // openzaly version + String ozVersion = ConfigHelper.getStringConfig(ConfigKey.SITE_VERSION); + pwriter.println("openzaly-version : " + ozVersion); + // os + String osName = System.getProperty("os.name"); + String dataModel = System.getProperty("sun.arch.data.model"); // 32位 or 64位 + pwriter.println("OS Name : " + osName + " " + dataModel + "位"); + // java version + String javaVersion = System.getProperty("java.version"); // 获取JDK版本 + pwriter.println("java-version : " + javaVersion); + + pwriter.println(); + pwriter.println("[OK] openzaly-server is starting..."); + pwriter.flush(); + } + + public static void startSuccess(PrintWriter pwriter) { + pwriter.println("[OK] start openzaly-server successfully"); + pwriter.flush(); + } + + public static void startFail(PrintWriter pwriter) { + pwriter.println("[Error] start openzaly-server failed, server exit..."); + pwriter.println(); + pwriter.flush(); + } + + public static void startFailWithError(PrintWriter pwriter, String errMessage) { + pwriter.println("[Error] error message:" + errMessage); + pwriter.println("[Error] start openzaly-server failed, server exit..."); + pwriter.println(); + pwriter.flush(); + } + + public static void printUpgradeWarn(PrintWriter pwriter) { + pwriter.println("[Error] openzaly-server is an old version, you can execute following command to upgrade:"); + pwriter.println(); + pwriter.println("\t java -jar openzaly-server.jar -upgrade"); + pwriter.println(); + pwriter.flush(); + } + + public static void printInitMysqlWarn(PrintWriter pwriter) { + pwriter.println("[Error] openzaly-server need to init mysql first, you can execute following command:"); + pwriter.println(); + pwriter.println("\t java -jar openzaly-server.jar -init"); + pwriter.println(); + pwriter.flush(); + } + + private static void printHelperMessage(PrintWriter pw) { + pw.println(); + pw.println("example:java -Dsite.port=2021 -jar openzaly-server.jar "); + pw.println(); + pw.println("\t-Dsite.address \t\topenzaly Netty address default:0.0.0.0"); + pw.println("\t-Dsite.port \t\topenzaly Netty port default:2021"); + pw.println("\t-Dpluginapi.address \topenzaly PluginAddress default: 0.0.0.0"); + pw.println("\t-Dpluginapi.port \topenzaly PluginApi port default:8280"); + pw.println("\t-Dsite.admin.port \topenzaly admin port default:8288"); + pw.println("\t-Dsite.uic \topenzaly first uic for admin port default: \"000000\""); + pw.println("\t-Dsite.baseDir \t\topenzaly openzaly-server root dir default:./"); + pw.println(); + pw.flush(); + } + + private static void upgrade(PrintWriter pw) { + pw.println(); + pw.println("[INFO] start to upgrade openzaly-server..."); + try { + String dbDir = ConfigHelper.getStringConfig(ConfigKey.SITE_BASE_DIR); + String siteVersion = ConfigHelper.getStringConfig(ConfigKey.SITE_VERSION); + DBConfig config = new DBConfig(); + config.setDbDir(dbDir); + config.setDb(DBType.PERSONAL); + // 升级 + int dbUserVersion = DataSourceManager.upgradeDB(config); + int needVersion = SQLConst.SITE_DB_VERSION_11; + pw.println("[INFO] upgrade openzaly-server version : " + siteVersion); + if (needVersion == dbUserVersion) { + pw.println("[OK] upgrade database user-version : " + dbUserVersion); + pw.println("[OK] upgrade openzaly-server finish ..."); + } else { + pw.println("[ERROR] upgrade database user-version : " + dbUserVersion); + pw.println("[ERROR] upgrade openzaly-server fail ..."); + } + } catch (UpgradeDatabaseException e) { + pw.println("[ERROR] upgrade openzaly-server error"); + logger.error("upgrade database error", e); + } + pw.println(); + pw.flush(); + } + + private static void initMysqlDatabase(PrintWriter pw) { + pw.println("[INFO] starting init mysql"); + try { + DataSourceManager.initMysqlConfig(); + pw.println("[OK] init mysql finish ,please execute command to start openzaly-server"); + pw.println(); + pw.println("\t java -jar openzaly-server.jar"); + } catch (FileNotFoundException e) { + logger.error("init mysql error,", e); + pw.println(StringHelper.format("[ERROR] init mysql error:[{}]", e.getMessage())); + } catch (IOException e) { + logger.error("init mysql error,", e); + pw.println(StringHelper.format("[ERROR] init mysql error:[{}]", e.getMessage())); + } + pw.println(); + pw.flush(); + } + + /** + * 把sqlite数据迁移mysql中 + * + */ + private static void migrateSqlite2Mysql() { + PrintUtils.print("[INFO]openzaly is migrating sqlite to mysql..."); + try { + DataSourceManager.migrateDB(); + PrintUtils.print("[OK] migrate sqlite to mysql finish"); + } catch (MigrateDatabaseException e) { + PrintUtils.print("[ERROR] migrate sqlite to mysql error,msg={}", e.getMessage()); + } catch (NeedInitMysqlException e) { + PrintUtils.print("[ERROR] please execute command before migrate database."); + PrintUtils.print(); + PrintUtils.print("java -jar openzaly-server.jar -init"); + PrintUtils.print(); + } + PrintUtils.flush(); + } +} diff --git a/openzaly-boot/src/main/java/com/akaxin/site/boot/utils/PropertiesUtils.java b/openzaly-boot/src/main/java/com/akaxin/site/boot/utils/PropertiesUtils.java new file mode 100755 index 0000000..0899afb --- /dev/null +++ b/openzaly-boot/src/main/java/com/akaxin/site/boot/utils/PropertiesUtils.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.boot.utils; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * 通过openzaly.properties加载配置项 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-24 19:45:17 + */ +public class PropertiesUtils { + private static final Logger logger = LoggerFactory.getLogger(PropertiesUtils.class); + + public static Properties getOZProperties() { + InputStream inputStream = null; + Properties properties = new Properties(); + try { + inputStream = PropertiesUtils.class.getResourceAsStream("/openzaly-server.config"); + properties.load(inputStream); + } catch (IOException e) { + logger.error("load properties from openzaly.properties error,user default", e); + properties = getDefaultProperties(); + } finally { + if (inputStream != null) { + try { + inputStream.close(); + } catch (IOException e) { + logger.error("inputStream close error", e); + } + } + } + return properties; + } + + /** + * when load openzaly.properties into System properties error,invoke + * getDefaultProperties method + * + * @return + */ + public static Properties getDefaultProperties() { + Properties properties = new Properties(); + properties.put("site.project.env", "ONLINE"); + properties.put("site.version", "0.9.5"); + properties.put("site.address", "0.0.0.0"); + properties.put("site.port", "2021"); + properties.put("pluginapi.address", "0.0.0.0"); + properties.put("pluginapi.port", "8280"); + properties.put("site.admin.address", "127.0.0.1"); + properties.put("site.admin.port", "8288"); + properties.put("site.admin.uic", "000000"); + properties.put("site.baseDir", "./"); + properties.put("group.members.count", "100"); + return properties; + } + + public static Properties getProperties(String configPath) throws IOException { + Properties properties = new Properties(); + InputStream inputStream = null; + try { + inputStream = ClassLoader.getSystemResourceAsStream(configPath); + properties.load(inputStream); + return properties; + } catch (Exception e) { + logger.error("get properties error", e); + } finally { + if (inputStream != null) { + inputStream.close(); + } + } + return properties; + } + +} diff --git a/openzaly-boot/src/main/resources/application.properties b/openzaly-boot/src/main/resources/application.properties new file mode 100755 index 0000000..dbfc321 --- /dev/null +++ b/openzaly-boot/src/main/resources/application.properties @@ -0,0 +1,21 @@ +#配置访问地址 +server.address=127.0.0.1 +#配置管理平台启动端口 +server.port=8288 +#设置输出日志 +logging.file=${user.dir}/site-logs/admin.log +#logging.file=site-logs/admin.log +#设置日志的输出级别 +logging.level.root=warn +#配置mvc前缀,界面位置 +spring.thymeleaf.prefix=classpath:/webapp/views/ +#静态资源 +spring.resources.static-locations=classpath:/webapp/static/ + +#设置spring的http请求编码 +spring.http.encoding.force=true +spring.http.encoding.charset=UTF-8 +spring.http.encoding.enabled=true +server.tomcat.uri-encoding=UTF-8 + +spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration \ No newline at end of file diff --git a/openzaly-boot/src/main/resources/log4j.properties b/openzaly-boot/src/main/resources/log4j.properties new file mode 100755 index 0000000..b54ab67 --- /dev/null +++ b/openzaly-boot/src/main/resources/log4j.properties @@ -0,0 +1,31 @@ +# ------ log4j ------ +log4j.rootLogger=INFO,debug,info,warn,error + +#log4j.appender.console=org.apache.log4j.ConsoleAppender +#log4j.appender.console.Target=System.out +#log4j.appender.console.layout=org.apache.log4j.PatternLayout +#log4j.appender.console.layout.ConversionPattern=[%p] %d [%c] %m%n + +log4j.appender.debug=org.apache.log4j.DailyRollingFileAppender +log4j.appender.debug.File=${user.dir}/site-logs/debug.log +log4j.appender.debug.Threshold=DEBUG +log4j.appender.debug.layout=org.apache.log4j.PatternLayout +log4j.appender.debug.layout.ConversionPattern=[%p] %d [%c] %m%n + +log4j.appender.info=org.apache.log4j.DailyRollingFileAppender +log4j.appender.info.File=${user.dir}/site-logs/info.log +log4j.appender.info.Threshold=INFO +log4j.appender.info.layout=org.apache.log4j.PatternLayout +log4j.appender.info.layout.ConversionPattern=[%p] %d [%c] %m%n + +log4j.appender.warn=org.apache.log4j.DailyRollingFileAppender +log4j.appender.warn.File=${user.dir}/site-logs/error.log +log4j.appender.warn.Threshold=WARN +log4j.appender.warn.layout=org.apache.log4j.PatternLayout +log4j.appender.warn.layout.ConversionPattern=[%p] %d [%c] %m%n + +log4j.appender.error=org.apache.log4j.DailyRollingFileAppender +log4j.appender.error.File=${user.dir}/site-logs/error.log +log4j.appender.error.Threshold=ERROR +log4j.appender.error.layout=org.apache.log4j.PatternLayout +log4j.appender.error.layout.ConversionPattern=[%p] %d [%c] %m%n diff --git a/openzaly-boot/src/main/resources/logo.txt b/openzaly-boot/src/main/resources/logo.txt new file mode 100755 index 0000000..c7f254d --- /dev/null +++ b/openzaly-boot/src/main/resources/logo.txt @@ -0,0 +1,16 @@ + + / \ + / . \ + \ . \ + / \ \ / _ _ __ _ __ __ ___ _ _ + / . \ | / / \ / \ | |/ / / \ \ \/ / |_ _| | \ | | + / . _ \ / / . \ / _ \ | ' / / _ \ \ / | | | \| | + \ / / \ - . / / ___ \ | . \ / ___ \ / \ | | | |\ | + \ / / | \ / /_/ \_\ |_|\_\ /_/ \_\ /_/\_\ |___| |_| \_| + / . \ \ / + \ . \ + \ / + \ / + + +Akaxin is an open source and free proprietary IM software,you can build private openzaly-server for everyone in any server. \ No newline at end of file diff --git a/openzaly-boot/src/main/resources/openzaly-server.config b/openzaly-boot/src/main/resources/openzaly-server.config new file mode 100755 index 0000000..6a6c481 --- /dev/null +++ b/openzaly-boot/src/main/resources/openzaly-server.config @@ -0,0 +1,100 @@ +# +# Copyright 2018-2028 Akaxin Group +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +######################################################## +### ***************Akaxin *************** +### openzaly-server +######################################################## + + + +## personal/PERSONAL edition : use sqlite database +## team/TEAM edition : use mysql database,support one master with several slaves +## enterprise/ENTERPRISE edition : use mysql + redis database ,support im server distribution +## ultimate edition : team or enterprise customization +openzaly.edition=TEAM + + +# openzaly version +openzaly.version=1.1.7 + +##### site tcp address,clients connect to site.address +site.address=0.0.0.0 +# site tcp port default 2021 +site.port=2021 + +# pluginapi server address +pluginapi.address=0.0.0.0 +# pluginapi server port +pluginapi.port=8280 + +# default back-stage management address +site.admin.address=127.0.0.1 +# default back-stage management port +site.admin.port=8288 + +# first user login site,use this user invite code(UIC) +site.uic=000000 + +# deposit pictures,audio,db default current path +# site.baseDir=${pwd} + +## if openzaly.edition = personal/PERSONAL OR migrate sqlite to mysql +##openzaly.sqlite.url=openzalyDB.sqlite3 + + +## if openzaly.edition = team/TEAM +##***************mysql master************** +##openzaly.mysql.host=localhost +##openzaly.mysql.port=3306 +##openzaly.mysql.database=openzaly + +##openzaly.mysql.username=root +##openzaly.mysql.password=1234567890 + +openzaly.mysql.initial-size=10 +openzaly.mysql.max-size=100 +openzaly.mysql.max-idle=60 + +openzaly.mysql.useUnicode=true +openzaly.mysql.characterEncoding=utf-8 +openzaly.mysql.verifyServerCertificate=false +openzaly.mysql.useSSL=true + +##***************mysql slave************** +##openzaly.mysql.slave.host=localhost +##openzaly.mysql.slave.port=3306 +##openzaly.mysql.slave.database=openzaly + +##openzaly.mysql.slave.username=root +##openzaly.mysql.slave.password=1234567890 +##openzaly.mysql.slave.initial-size=10 +##openzaly.mysql.slave.max-size=100 +##openzaly.mysql.slave.max-idle=60 + +##openzaly.mysql.slave.useUnicode=true +##openzaly.mysql.slave.characterEncoding=utf-8 +##openzaly.mysql.slave.verifyServerCertificate=false +##openzaly.mysql.slave.useSSL=true + + +## if openzaly.edition = enterprise/ENTERPRISE +#### support support im server distribution + +## if openzaly.edition = ultimate edition +#### openzaly support customed for team or enterprise + + diff --git a/openzaly-boot/src/test/java/com/akaxin/site/boot/test/TestDefaultIcon.java b/openzaly-boot/src/test/java/com/akaxin/site/boot/test/TestDefaultIcon.java new file mode 100755 index 0000000..5e8b379 --- /dev/null +++ b/openzaly-boot/src/test/java/com/akaxin/site/boot/test/TestDefaultIcon.java @@ -0,0 +1,17 @@ +package com.akaxin.site.boot.test; + +import java.util.Base64; + +import com.akaxin.site.business.utils.FileServerUtils; + +public class TestDefaultIcon { + public static void main(String args[]) { + // String fileUrl = "site-admin-icon.jpg"; + String fileUrl = "管理.png"; + byte[] fileBytes = FileServerUtils.fileToBinary(fileUrl); + + String str = Base64.getEncoder().encodeToString(fileBytes); + System.out.println(str); + + } +} diff --git a/openzaly-boot/src/test/java/com/akaxin/site/boot/test/TestFile.java b/openzaly-boot/src/test/java/com/akaxin/site/boot/test/TestFile.java new file mode 100755 index 0000000..bad75e3 --- /dev/null +++ b/openzaly-boot/src/test/java/com/akaxin/site/boot/test/TestFile.java @@ -0,0 +1,28 @@ +package com.akaxin.site.boot.test; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.proto.core.FileProto.FileType; +import com.akaxin.site.business.utils.FilePathUtils; +import com.akaxin.site.business.utils.FileServerUtils; + +public class TestFile { + private static final Logger logger = LoggerFactory.getLogger(TestFile.class); + + private static String getDefaultSiteAdminIcon() { + try { + byte[] iconBytes = FileServerUtils.fileToBinary("Test.jpg"); + String fileId = FileServerUtils.saveFile(iconBytes, FilePathUtils.getPicPath(), FileType.GROUP_PORTRAIT, + null); + return fileId; + } catch (Exception e) { + logger.error("get default icon error", e); + } + return ""; + } + + public static void main(String args[]) { + System.out.println(getDefaultSiteAdminIcon()); + } +} diff --git a/openzaly-boot/src/test/java/com/akaxin/site/boot/test/TestHttpClient.java b/openzaly-boot/src/test/java/com/akaxin/site/boot/test/TestHttpClient.java new file mode 100755 index 0000000..38b9a89 --- /dev/null +++ b/openzaly-boot/src/test/java/com/akaxin/site/boot/test/TestHttpClient.java @@ -0,0 +1,16 @@ +package com.akaxin.site.boot.test; + +import java.util.HashMap; +import java.util.Map; + +import com.akaxin.common.http.ZalyHttpClient; +import com.akaxin.common.utils.GsonUtils; + +public class TestHttpClient { + public static void main(String args[]) throws Exception { + Map map = new HashMap(); + map.put("test", "aaaaa"); + byte[] body = ZalyHttpClient.getInstance().postString("http://localhost:8080/hai/user/queryList", GsonUtils.toJson(map)); + System.out.println("body=" + new String(body)); + } +} \ No newline at end of file diff --git a/openzaly-boot/src/test/java/com/akaxin/site/boot/test/TestSystemPro.java b/openzaly-boot/src/test/java/com/akaxin/site/boot/test/TestSystemPro.java new file mode 100755 index 0000000..16ee45f --- /dev/null +++ b/openzaly-boot/src/test/java/com/akaxin/site/boot/test/TestSystemPro.java @@ -0,0 +1,7 @@ +package com.akaxin.site.boot.test; + +public class TestSystemPro { + public static void main(String[] args) { + System.out.println(System.getProperty("test.abc")); + } +} diff --git a/openzaly-business/.gitignore b/openzaly-business/.gitignore new file mode 100755 index 0000000..b83d222 --- /dev/null +++ b/openzaly-business/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/openzaly-business/pom.xml b/openzaly-business/pom.xml new file mode 100755 index 0000000..66da54b --- /dev/null +++ b/openzaly-business/pom.xml @@ -0,0 +1,53 @@ + + + 4.0.0 + + com.akaxin + openzaly-parent + 0.0.1 + + com.akaxin.site + openzaly-business + 0.0.1-RELEASE + + + 1.6 + 1.6 + + + + + com.akaxin.common + openzaly-common + 0.0.1-RELEASE + + + + com.akaxin.proto + openzaly-protobuf + 0.0.1-RELEASE + + + + com.akaxin.site + openzaly-storage + 0.0.1-RELEASE + + + + com.akaxin.site + openzaly-message + 0.0.1-RELEASE + + + + + \ No newline at end of file diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/api/IRequest.java b/openzaly-business/src/main/java/com/akaxin/site/business/api/IRequest.java new file mode 100755 index 0000000..6af6ec8 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/api/IRequest.java @@ -0,0 +1,10 @@ +package com.akaxin.site.business.api; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; + +public interface IRequest { + + public CommandResponse process(Command command); + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/bean/MsgNoticeBean.java b/openzaly-business/src/main/java/com/akaxin/site/business/bean/MsgNoticeBean.java new file mode 100755 index 0000000..28c3e10 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/bean/MsgNoticeBean.java @@ -0,0 +1,5 @@ +package com.akaxin.site.business.bean; + +public class MsgNoticeBean { + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/bean/PlatformPhoneBean.java b/openzaly-business/src/main/java/com/akaxin/site/business/bean/PlatformPhoneBean.java new file mode 100755 index 0000000..9da266b --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/bean/PlatformPhoneBean.java @@ -0,0 +1,71 @@ +package com.akaxin.site.business.bean; + +import org.apache.commons.lang3.StringUtils; + +import com.akaxin.common.utils.GsonUtils; + +public class PlatformPhoneBean { + + private String phoneId; + private String countryCode; + private String userIdPubk; + + /** + * @return the phoneId + */ + public String getPhoneId() { + return phoneId; + } + + /** + * @param phoneId + * the phoneId to set + */ + public void setPhoneId(String phoneId) { + this.phoneId = phoneId; + } + + /** + * @return the countryCode + */ + public String getCountryCode() { + return countryCode; + } + + /** + * @param countryCode + * the countryCode to set + */ + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * @return the countryCode_phoneId + */ + public String getFullPhoneId() { + if (StringUtils.isNotEmpty(this.countryCode)) { + return this.countryCode + "_" + phoneId; + } + return "+86_" + phoneId; + } + + /** + * @return the userIdPubk + */ + public String getUserIdPubk() { + return userIdPubk; + } + + /** + * @param userIdPubk + * the userIdPubk to set + */ + public void setUserIdPubk(String userIdPubk) { + this.userIdPubk = userIdPubk; + } + + public String toString() { + return GsonUtils.toJson(this); + } +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/cache/WebSessionCache.java b/openzaly-business/src/main/java/com/akaxin/site/business/cache/WebSessionCache.java new file mode 100755 index 0000000..ef263ee --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/cache/WebSessionCache.java @@ -0,0 +1,54 @@ +package com.akaxin.site.business.cache; + +import java.util.concurrent.TimeUnit; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; + +/** + * 缓存websession,过期1分钟 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-05-07 19:25:38 + */ +public class WebSessionCache { + private static final Logger logger = LoggerFactory.getLogger(WebSessionCache.class); + + /** + * 最大数量1000个 最长过期时间1分钟 + * + */ + private static Cache webSessCache = CacheBuilder.newBuilder().maximumSize(1000) + .expireAfterWrite(60, TimeUnit.SECONDS).build(); + + public static String getSiteUserId(String sessionId) { + String siteUserId = webSessCache.getIfPresent(sessionId); + if (StringUtils.isNotEmpty(siteUserId)) { + webSessCache.invalidate(sessionId); + } + return siteUserId; + } + + public static void putWebAuthSession(String sessionId, String siteUserId) { + webSessCache.put(sessionId, siteUserId); + } + + public static void main(String[] args) { + webSessCache.put("101", "hello world!"); + + String hello = getSiteUserId("101"); + System.out.println("hello = " + hello); + + String hello2 = getSiteUserId("101"); + System.out.println("hello = " + hello2); + + String hello3 = getSiteUserId("1012"); + System.out.println("hello = " + hello3); + + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/constant/AkxProject.java b/openzaly-business/src/main/java/com/akaxin/site/business/constant/AkxProject.java new file mode 100755 index 0000000..32283e7 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/constant/AkxProject.java @@ -0,0 +1,6 @@ +package com.akaxin.site.business.constant; + +public interface AkxProject { + +// String PLN = "[openzaly-business]"; +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/constant/GroupConfig.java b/openzaly-business/src/main/java/com/akaxin/site/business/constant/GroupConfig.java new file mode 100755 index 0000000..fcf9ec2 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/constant/GroupConfig.java @@ -0,0 +1,22 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.constant; + +public interface GroupConfig { + int GROUP_MAX_MEMBER_COUNT = 200; + + int GROUP_MIN_MEMBER_COUNT = 4; +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/constant/NoticeText.java b/openzaly-business/src/main/java/com/akaxin/site/business/constant/NoticeText.java new file mode 100755 index 0000000..4077bcf --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/constant/NoticeText.java @@ -0,0 +1,30 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.constant; + +/** + * 通知相关的默认配置文案,{*}表示支持事件点击的位置 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-12-28 14:38:15 + */ +public interface NoticeText { + public String USER_ADD_FRIEND = "我通过了你的好友验证,现在可以开始聊天了"; + public String USER_ADD_GROUP = " 加入了群聊"; + + public String USER_ADD_GROUP_QR_CODE = " 通过群组二维码加入群聊"; + +} \ No newline at end of file diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/dao/ExpireTokenDao.java b/openzaly-business/src/main/java/com/akaxin/site/business/dao/ExpireTokenDao.java new file mode 100755 index 0000000..7b9b18d --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/dao/ExpireTokenDao.java @@ -0,0 +1,76 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.dao; + +import java.sql.SQLException; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.site.storage.api.ITokenDao; +import com.akaxin.site.storage.bean.ExpireToken; +import com.akaxin.site.storage.service.TokenDaoService; + +/** + * 站点相关过期token操作 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-28 16:57:56 + */ +public class ExpireTokenDao { + private static final Logger logger = LoggerFactory.getLogger(ExpireTokenDao.class); + + private ITokenDao tokenDao = new TokenDaoService(); + private static ExpireTokenDao instance = new ExpireTokenDao(); + + public static ExpireTokenDao getInstance() { + return instance; + } + + /** + * 新增扩展 + * + * @param bean + * @return + */ + public boolean addToken(ExpireToken bean) { + try { + return tokenDao.addToken(bean); + } catch (SQLException e) { + logger.error("add expire token error.", e); + } + return false; + } + + public ExpireToken getExpireToken(String token) { + try { + return tokenDao.getExpireToken(token); + } catch (SQLException e) { + logger.error("add expire token error.", e); + } + return null; + } + + public ExpireToken getExpireTokenByBid(String bid, long time) { + try { + return tokenDao.getExpireTokenByBid(bid, time); + } catch (SQLException e) { + logger.error("get expire token by bid and time error.", e); + } + return null; + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/dao/MonitorDao.java b/openzaly-business/src/main/java/com/akaxin/site/business/dao/MonitorDao.java new file mode 100755 index 0000000..1e194c8 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/dao/MonitorDao.java @@ -0,0 +1,96 @@ +package com.akaxin.site.business.dao; + +import com.akaxin.site.storage.api.*; +import com.akaxin.site.storage.service.*; +import org.slf4j.LoggerFactory; + +import java.sql.SQLException; +import java.time.DayOfWeek; + +public class MonitorDao { + private static final org.slf4j.Logger logger = LoggerFactory.getLogger(UserProfileDao.class); + private static MonitorDao instance = new MonitorDao(); + private IMessageDao messageDao = new MessageDaoService(); + private IUserProfileDao userProfileDao = new UserProfileDaoService(); + private IUserGroupDao userGroupDao = new UserGroupDaoService(); + private IGroupDao groupDao = new GroupDaoService(); + private IUserFriendDao friendDao = new UserFriendDaoService(); + + + public static MonitorDao getInstance() { + return instance; + } + + //监控查询状态(消息数量) + public int queryNumMessagePerDay(long time,int day) { + try { + int groupMessagePerDay = userGroupDao.queryGroupMessagePerDay(time,day); + int u2MessagePerDay = messageDao.queryU2MessagePerDay(time,day); + return groupMessagePerDay + u2MessagePerDay; + } catch (SQLException e) { + logger.error("query Num of Message Per Day error.", e); + } + return -1; + } + + //监控查询状态(单群组) + public int queryGroupMessagePerDay(long now,int day) { + try { + return userGroupDao.queryGroupMessagePerDay(now,day); + } catch (SQLException e) { + logger.error("query Num of Message Group Only error.", e); + } + return -1; + } + + //监控查询状态(单个人) + public int queryU2MessagePerDay(long now,int day) { + try { + return messageDao.queryU2MessagePerDay(now,day); + } catch (SQLException e) { + logger.error("query Num of Message U2 Only error.", e); + } + return -1; + + } + + //监控查询状态(注册人数) + public int queryNumRegisterPerDay(long now,int day) { + try { + return userProfileDao.queryRegisterNumPerDay(now,day); + } catch (SQLException e) { + logger.error("query Num of Register Per Day error.", e); + } + return -1; + } + + //查询全部用户数 + public int getSiteUserNum(long now,int day) { + try { + return userProfileDao.getUserNum(now,day); + } catch (SQLException e) { + logger.error("query Num of SiteUser error", e); + } + return -1; + } + + //查询全部群组数量 + public int getGroupNum(long now,int day) { + try { + return groupDao.getGroupNum(now,day); + } catch (SQLException e) { + logger.error("query Num of Group error.", e); + } + return -1; + } + + + public int friendNum(long now,int day) { + try { + return friendDao.friendNum(now,day); + } catch (SQLException e) { + logger.error("query Num of friend error.",e); + } + return -1; + } +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/dao/SiteConfigDao.java b/openzaly-business/src/main/java/com/akaxin/site/business/dao/SiteConfigDao.java new file mode 100755 index 0000000..0101748 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/dao/SiteConfigDao.java @@ -0,0 +1,122 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.dao; + +import java.sql.SQLException; +import java.util.Map; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.proto.core.ConfigProto.ConfigKey; +import com.akaxin.site.storage.api.ISiteConfigDao; +import com.akaxin.site.storage.service.SiteConfigDaoService; + +/** + * 站点配置,供业务逻辑使用 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-25 16:18:58 + */ +public class SiteConfigDao { + private static final Logger logger = LoggerFactory.getLogger(SiteConfigDao.class); + + private SiteConfigDao() { + } + + public static SiteConfigDao getInstance() { + return SingletonHolder.instance; + } + + static class SingletonHolder { + private static SiteConfigDao instance = new SiteConfigDao(); + } + + private ISiteConfigDao siteConfigDao = new SiteConfigDaoService(); + + public Map getSiteConfig() { + try { + return siteConfigDao.getSiteConfig(); + } catch (SQLException e) { + logger.error("get site profile error.", e); + } + return null; + } + + public boolean updateSiteConfig(Map configMap, boolean isAdmin) { + int count = 0; + try { + if (configMap != null) { + count = siteConfigDao.updateSiteConfig(configMap, isAdmin); + if (count == configMap.size()) { + return true; + } + } + } catch (SQLException e) { + logger.error("update site configmap error.", e); + } + return false; + } + + public boolean updateSiteConfig(int key, String value) { + try { + return siteConfigDao.updateSiteConfig(key, value) > 0; + } catch (SQLException e) { + logger.error("update site config error.", e); + } + return false; + } + + public String getSiteManagers() { + try { + return siteConfigDao.getSiteConfigValue(ConfigKey.SITE_MANAGER_VALUE); + } catch (SQLException e) { + logger.error("get site user managers error.", e); + } + return null; + } + + public boolean updateSiteManagers(String userManagers) { + return updateSiteConfig(ConfigKey.SITE_MANAGER_VALUE, userManagers); + } + + public String getDefaultUserFriends() { + try { + return siteConfigDao.getSiteConfigValue(ConfigKey.DEFAULT_USER_FRIENDS_VALUE); + } catch (SQLException e) { + logger.error("get site default user friends error.", e); + } + return null; + } + + public boolean updateDefaultUserFriends(String defaultFriends) { + return updateSiteConfig(ConfigKey.DEFAULT_USER_FRIENDS_VALUE, defaultFriends); + } + + public String getDefaultUserGroups() { + try { + return siteConfigDao.getSiteConfigValue(ConfigKey.DEFAULT_USER_GROUPS_VALUE); + } catch (SQLException e) { + logger.error("get site official group default error.", e); + } + return null; + } + + public boolean updateDefaultUserGroups(String defaultGroupIds) { + return updateSiteConfig(ConfigKey.DEFAULT_USER_GROUPS_VALUE, defaultGroupIds); + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/dao/SiteLoginDao.java b/openzaly-business/src/main/java/com/akaxin/site/business/dao/SiteLoginDao.java new file mode 100755 index 0000000..8a55d50 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/dao/SiteLoginDao.java @@ -0,0 +1,110 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.dao; + +import java.sql.SQLException; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.site.storage.api.IUserDeviceDao; +import com.akaxin.site.storage.api.IUserProfileDao; +import com.akaxin.site.storage.api.IUserSessionDao; +import com.akaxin.site.storage.bean.UserDeviceBean; +import com.akaxin.site.storage.bean.UserProfileBean; +import com.akaxin.site.storage.bean.UserSessionBean; +import com.akaxin.site.storage.service.DeviceDaoService; +import com.akaxin.site.storage.service.UserProfileDaoService; +import com.akaxin.site.storage.service.UserSessionDaoService; + +import javax.transaction.TransactionRequiredException; + +/** + * 用户登陆使用dao,负责用户信息入库 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.10.20 + */ +public class SiteLoginDao { + private static final Logger logger = LoggerFactory.getLogger(SiteLoginDao.class); + private static SiteLoginDao userLoginDao = new SiteLoginDao(); + + private IUserDeviceDao userDeviceDao = new DeviceDaoService(); + private IUserProfileDao userProfileDao = new UserProfileDaoService(); + private IUserSessionDao userSessionDao = new UserSessionDaoService(); + + public static SiteLoginDao getInstance() { + return userLoginDao; + } + + public boolean registerUser(UserProfileBean userBean) { + try { + return userProfileDao.saveProfile(userBean); + } catch (SQLException e) { + logger.error("register user error.", e); + } + return false; + } + + public boolean saveUserDevice(UserDeviceBean deviceBean) { + try { + return userDeviceDao.saveUserDevice(deviceBean); + } catch (SQLException e) { + logger.error("save user Device error.", e); + } + return false; + } + + public boolean updateUserDevice(UserDeviceBean deviceBean) { + try { + return userDeviceDao.updateUserDevice(deviceBean); + } catch (SQLException e) { + logger.error("update user Device error.", e); + } + return false; + } + + public boolean saveUserSession(UserSessionBean sessionBean) { + try { + return userSessionDao.saveUserSession(sessionBean); + } catch (SQLException e) { + logger.error("save user session error.", e); + } + return false; + } + + public String checkDeviceId(String userId, String userDevicePuk) { + try { + return userDeviceDao.getDeviceId(userId, userDevicePuk); + } catch (SQLException e) { + logger.error("check device id error,", e); + } + return null; + } + + public boolean deleteSession(String siteUserId, String deviceId) { + try { + return userSessionDao.deleteUserSession(siteUserId, deviceId); + } catch (SQLException e) { + logger.error("delete session error.", e); + } + return false; + } + + public boolean addDefault(UserProfileBean regBean) { + return true; + } +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/dao/SitePluginDao.java b/openzaly-business/src/main/java/com/akaxin/site/business/dao/SitePluginDao.java new file mode 100755 index 0000000..13dd621 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/dao/SitePluginDao.java @@ -0,0 +1,148 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.dao; + +import java.sql.SQLException; +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.proto.core.PluginProto; +import com.akaxin.site.storage.api.IPluginDao; +import com.akaxin.site.storage.bean.PluginBean; +import com.akaxin.site.storage.service.PluginServiceDao; + +public class SitePluginDao { + private static final Logger logger = LoggerFactory.getLogger(SitePluginDao.class); + private IPluginDao pluginDao = new PluginServiceDao(); + private static SitePluginDao instance = new SitePluginDao(); + + public static SitePluginDao getInstance() { + return instance; + } + + /** + * 新增扩展 + * + * @param bean + * @return + */ + public boolean addPlugin(PluginBean bean) { + try { + return pluginDao.addPlugin(bean); + } catch (SQLException e) { + logger.error("add plugin error.", e); + } + return false; + } + + /** + * 删除扩展 + * + * @param pluginId + * @return + */ + public boolean deletePlugin(int pluginId) { + try { + return pluginDao.deletePlugin(pluginId); + } catch (SQLException e) { + logger.error("delete plugin error.", e); + } + return false; + } + + public boolean updatePlugin(PluginBean bean) { + try { + return pluginDao.updatePlugin(bean); + } catch (SQLException e) { + logger.error("update plugin error.", e); + } + return false; + } + + /** + * 获取管理员的扩展列表 + * + * @param pageNum + * @param pageSize + * @param position + * @return + */ + public List getAdminPluginPageList(int pageNum, int pageSize, int position) { + List pluginList = null; + try { + pluginList = pluginDao.getPluginPageList(pageNum, pageSize, position); + } catch (SQLException e) { + logger.error("get plugin list error.", e); + } + return pluginList; + } + + /** + * 获取普通用户的扩展列表 + * + * @param pageNum + * @param pageSize + * @param position + * @return + */ + public List getOrdinaryPluginPageList(int pageNum, int pageSize, int position) { + List pluginList = null; + try { + pluginList = pluginDao.getPluginPageList(pageNum, pageSize, position, + PluginProto.PermissionStatus.AVAILABLE_VALUE); + } catch (SQLException e) { + logger.error("get plugin list error.", e); + } + return pluginList; + } + + /** + * 获取所有扩展列表 + * + * @param pageNum + * @param pageSize + * @return + */ + public List getAllPluginList(int pageNum, int pageSize) { + List pluginList = null; + try { + pluginList = pluginDao.getAllPluginList(pageNum, pageSize); + } catch (SQLException e) { + logger.error("get plugin list error.", e); + } + return pluginList; + } + + public PluginBean getPluginProfile(int pluginId) { + try { + return pluginDao.getPluginProfile(pluginId); + } catch (SQLException e) { + logger.error("get plugin by id error.", e); + } + return null; + } + + public String reSetAuthKey(int pluginId) { + try { + return pluginDao.reSetAuthKey(pluginId); + } catch (SQLException e) { + logger.error("reset AuthKey error.", e); + } + return "false"; + } +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/dao/SiteUicDao.java b/openzaly-business/src/main/java/com/akaxin/site/business/dao/SiteUicDao.java new file mode 100755 index 0000000..b883496 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/dao/SiteUicDao.java @@ -0,0 +1,106 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.dao; + +import java.sql.SQLException; +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.site.storage.api.IUicDao; +import com.akaxin.site.storage.bean.UicBean; +import com.akaxin.site.storage.service.UicDaoService; + +public class SiteUicDao { + private static final Logger logger = LoggerFactory.getLogger(SiteUicDao.class); + private IUicDao uicDao = new UicDaoService(); + private static SiteUicDao instance = new SiteUicDao(); + + public static SiteUicDao getInstance() { + return instance; + } + + /** + * 新增扩展 + * + * @param bean + * @return + */ + public boolean addUic(UicBean bean) { + try { + return uicDao.addUic(bean); + } catch (SQLException e) { + logger.error("add uic error.", e); + } + return false; + } + + /** + * 批量增加UIC + * + * @param bean + * @param num + * @return + */ + public boolean batchAddUic(UicBean bean, int num, int length) { + try { + return uicDao.batchAddUic(bean, num, length); + } catch (SQLException e) { + logger.error("add uic error.", e); + } + return false; + } + + public UicBean getUicInfo(String uic) { + try { + return uicDao.getUicInfo(uic); + } catch (SQLException e) { + logger.error("add uic error.", e); + } + return null; + } + + public boolean updateUic(UicBean bean) { + try { + return uicDao.updateUic(bean); + } catch (SQLException e) { + logger.error("update plugin error.", e); + } + return false; + } + + public List getUicList(int pageNum, int pageSize, int status) { + List pluginList = null; + try { + pluginList = uicDao.getUicPageList(pageNum, pageSize, status); + } catch (SQLException e) { + logger.error("get plugin list error.", e); + } + return pluginList; + } + + public List getAllUicList(int pageNum, int pageSize) { + List uicList = null; + try { + uicList = uicDao.getAllUicPageList(pageNum, pageSize); + } catch (SQLException e) { + logger.error("get plugin list error.", e); + } + return uicList; + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/dao/SiteUserDao.java b/openzaly-business/src/main/java/com/akaxin/site/business/dao/SiteUserDao.java new file mode 100755 index 0000000..e472723 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/dao/SiteUserDao.java @@ -0,0 +1,38 @@ +package com.akaxin.site.business.dao; + +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.site.storage.api.ISiteUsersDao; +import com.akaxin.site.storage.service.SiteUsersDaoService; + +/** + * 获取站点数据库信息,例如所有用户 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-20 18:27:46 + */ +public class SiteUserDao { + private static final Logger logger = LoggerFactory.getLogger(SiteUserDao.class); + private ISiteUsersDao siteUsersDao = new SiteUsersDaoService(); + + private static class SingletonHolder { + private static SiteUserDao instance = new SiteUserDao(); + } + + public static SiteUserDao getInstance() { + return SingletonHolder.instance; + } + + public List getSiteUsersByPage(int pageNum, int pageSize) { + try { + return siteUsersDao.getSiteUserByPage(pageNum, pageSize); + } catch (Exception e) { + logger.error("get site user by page error", e); + } + return null; + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/dao/UserDeviceDao.java b/openzaly-business/src/main/java/com/akaxin/site/business/dao/UserDeviceDao.java new file mode 100755 index 0000000..6081123 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/dao/UserDeviceDao.java @@ -0,0 +1,72 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.dao; + +import java.sql.SQLException; +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.site.storage.api.IUserDeviceDao; +import com.akaxin.site.storage.bean.UserDeviceBean; +import com.akaxin.site.storage.service.DeviceDaoService; + +public class UserDeviceDao { + private static final Logger logger = LoggerFactory.getLogger(UserDeviceDao.class); + private static UserDeviceDao instance = new UserDeviceDao(); + + private IUserDeviceDao userDeviceDaoService = new DeviceDaoService(); + + public static UserDeviceDao getInstance() { + return instance; + } + + /** + * 获取个人设备的具体信息 + * + * @param siteUserId + * @param deviceId + * @return + */ + public UserDeviceBean getDeviceDetails(String siteUserId, String deviceId) { + try { + return userDeviceDaoService.getDeviceDetails(siteUserId, deviceId); + } catch (SQLException e) { + logger.error("get device details error", e); + } + return null; + } + + public List getActiveDeviceList(String siteUserId) { + try { + return userDeviceDaoService.getActiveDeviceList(siteUserId); + } catch (SQLException e) { + logger.error("get user devices error.", e); + } + return null; + } + + public List getBoundDevices(String siteUserId) { + try { + return userDeviceDaoService.getUserDeviceList(siteUserId); + } catch (Exception e) { + logger.error("get user devices error.", e); + } + return null; + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/dao/UserFriendDao.java b/openzaly-business/src/main/java/com/akaxin/site/business/dao/UserFriendDao.java new file mode 100755 index 0000000..0c024e9 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/dao/UserFriendDao.java @@ -0,0 +1,247 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.dao; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.proto.core.UserProto; +import com.akaxin.site.storage.api.IFriendApplyDao; +import com.akaxin.site.storage.api.IUserFriendDao; +import com.akaxin.site.storage.bean.ApplyFriendBean; +import com.akaxin.site.storage.bean.ApplyUserBean; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.UserFriendBean; +import com.akaxin.site.storage.service.FriendApplyDaoService; +import com.akaxin.site.storage.service.UserFriendDaoService; + +/** + * 用户好友相关操作 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-02-01 17:49:41 + */ +public class UserFriendDao { + private static final Logger logger = LoggerFactory.getLogger(UserFriendDao.class); + private static UserFriendDao instance = new UserFriendDao(); + private IUserFriendDao userFriendDao = new UserFriendDaoService(); + private IFriendApplyDao friendApplyDao = new FriendApplyDaoService(); + private final int RELATION_NUMBERo = 1; + + public static UserFriendDao getInstance() { + return instance; + } + + public int getUserFriendNum(String siteUserId) { + try { + return userFriendDao.getUserFriendNum(siteUserId); + } catch (SQLException e) { + logger.error("get user friend num error", e); + } + return -1; + } + + public List getUserFriends(String userId) { + List friendList = new ArrayList(); + try { + friendList = userFriendDao.getUserFriends(userId); + } catch (SQLException e) { + logger.error("get user friend list error", e); + } + return friendList; + } + + public List getUserFriendsByPage(String siteUserId, int pageNum, int pageSize) { + List friendList = null; + try { + friendList = userFriendDao.getUserFriendsByPage(siteUserId, pageNum, pageSize); + } catch (SQLException e) { + logger.error("get user friend list error", e); + } + return friendList; + } + + public boolean saveFriendApply(String siteUserId, String siteFriendId, String applyReason) { + try { + return friendApplyDao.saveApply(siteFriendId, siteUserId, applyReason); + } catch (SQLException e) { + logger.error("friend apply error.", e); + } + return false; + } + + // 查询二者是否为好友 + public boolean isFriend(String siteUserId, String siteFriendId) throws SQLException { + return userFriendDao.queryIsFriendRelation(siteUserId, siteFriendId, false); + } + + public boolean isNotFriend(String siteUserId, String siteFriendId) throws SQLException { + return !isFriend(siteUserId, siteFriendId); + } + + public boolean agreeApply(String siteUserId, String siteFriendId, boolean agree) { + boolean result = true; + try { + if (agree) { + if (userFriendDao.queryRelation(siteUserId, siteFriendId) != RELATION_NUMBERo) { + result = userFriendDao.saveRelation(siteUserId, siteFriendId, RELATION_NUMBERo); + } + if (userFriendDao.queryRelation(siteFriendId, siteUserId) != RELATION_NUMBERo) { + result = userFriendDao.saveRelation(siteFriendId, siteUserId, RELATION_NUMBERo) && result; + } + } + } catch (Exception e) { + result = false; + logger.error("agree friend apply error.", e); + } + return result; + } + + public ApplyFriendBean agreeApplyWithClear(String siteUserId, String siteFriendId, boolean isMaster) { + ApplyFriendBean bean = null; + try { + bean = friendApplyDao.getApplyInfo(siteUserId, siteFriendId, isMaster); + friendApplyDao.deleteApply(siteFriendId, siteUserId); + friendApplyDao.deleteApply(siteUserId, siteFriendId); + } catch (SQLException e) { + logger.error("agree apply friend with clear error", e); + } + return bean; + } + + public UserProto.UserRelation getUserRelation(String siteUserId, String siteFriendId) { + int relation = 0; + try { + relation = userFriendDao.queryRelation(siteUserId, siteFriendId); + if (relation == RELATION_NUMBERo) { + relation = userFriendDao.queryRelation(siteFriendId, siteUserId); + if (relation == RELATION_NUMBERo) { + return UserProto.UserRelation.RELATION_FRIEND; + } + return UserProto.UserRelation.RELATION_CARE; + } else { + relation = userFriendDao.queryRelation(siteFriendId, siteUserId); + if (relation == RELATION_NUMBERo) { + return UserProto.UserRelation.RELATION_FANS; + } + } + } catch (SQLException e) { + logger.error("get user relation error.siteUserId={} siteFriendId={}", e); + } + return UserProto.UserRelation.RELATION_NONE; + } + + /** + * 获取一个好友的申请总数 + * + * @param siteUserId + * @param siteFriendId + * @return + */ + public int getApplyCount(String siteUserId, String siteFriendId) { + int count = 0; + try { + count = friendApplyDao.getApplyCount(siteUserId, siteFriendId); + } catch (SQLException e) { + logger.error("get apply user count error.", e); + } + return count; + } + + /** + * 获取用户当前的好友申请总数 + * + * @param siteUserId + * @return + */ + public int getApplyCount(String siteUserId) { + int count = 0; + try { + count = friendApplyDao.getApplyCount(siteUserId); + } catch (SQLException e) { + logger.error("get apply user count error.", e); + } + return count; + } + + public List getApplyUserList(String siteUserId) { + try { + return friendApplyDao.getApplyUsers(siteUserId); + } catch (SQLException e) { + logger.error("get apply user list error.", e); + } + return null; + } + + public boolean deleteFriend(String siteUserId, String siteFriendId) { + boolean result = false; + try { + result = userFriendDao.deleteRelation(siteUserId, siteFriendId); + } catch (SQLException e) { + logger.error("delete friend error.", e); + } + return result; + } + + public UserFriendBean getFriendSetting(String siteUserId, String siteFriendId) { + try { + UserFriendBean bean = userFriendDao.getFriendSetting(siteUserId, siteFriendId); + if (bean == null) { + bean = new UserFriendBean(); + bean.setMute(false); + } + return bean; + } catch (SQLException e) { + logger.error("get friend setting error", e); + } + return null; + } + + public boolean updateFriendSetting(String siteUserId, UserFriendBean bean) { + try { + return userFriendDao.updateFriendSetting(siteUserId, bean); + } catch (SQLException e) { + logger.error("update friend setting error", e); + } + return false; + } + + public boolean getFriendMute(String siteUserId, String siteFriendId) throws SQLException { + return userFriendDao.isMute(siteUserId, siteFriendId); + } + + public boolean updateFriendMute(String siteUserId, String siteFriendId, boolean mute) { + try { + return userFriendDao.updateMute(siteUserId, siteFriendId, mute); + } catch (SQLException e) { + logger.error("update friend mute error", e); + } + return false; + } + + public boolean remarkFriend(String siteUserId, String siteFriendId, String aliasName, String aliasInLatin) { + try { + return userFriendDao.remarkFriend(siteUserId, siteFriendId, aliasName, aliasInLatin); + } catch (SQLException e) { + logger.error("update friend mute error", e); + } + return false; + } +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/dao/UserGroupDao.java b/openzaly-business/src/main/java/com/akaxin/site/business/dao/UserGroupDao.java new file mode 100755 index 0000000..ac8f3a0 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/dao/UserGroupDao.java @@ -0,0 +1,418 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.dao; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.core.GroupProto; +import com.akaxin.site.business.impl.notice.GroupNotice; +import com.akaxin.site.storage.api.IGroupDao; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.api.IUserGroupDao; +import com.akaxin.site.storage.bean.GroupMemberBean; +import com.akaxin.site.storage.bean.GroupProfileBean; +import com.akaxin.site.storage.bean.SimpleGroupBean; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.UserGroupBean; +import com.akaxin.site.storage.service.GroupDaoService; +import com.akaxin.site.storage.service.MessageDaoService; +import com.akaxin.site.storage.service.UserGroupDaoService; + +/** + * 用户群组群组相关数据源操作 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-10-20 17:30:14 + */ +public class UserGroupDao { + private static final Logger logger = LoggerFactory.getLogger(UserGroupDao.class); + + private IGroupDao groupDao = new GroupDaoService(); + private IMessageDao messageDao = new MessageDaoService(); + private IUserGroupDao userGroupDao = new UserGroupDaoService(); + + private UserGroupDao() { + + } + + static class SingletonHolder { + private static UserGroupDao instance = new UserGroupDao(); + } + + public static UserGroupDao getInstance() { + return SingletonHolder.instance; + } + + // 获取群主 + public String getGroupMaster(String groupId) { + try { + return groupDao.getGroupOwner(groupId); + } catch (Exception e) { + logger.error("get group master error.", e); + } + return null; + } + + public int getUserGroupCount(String siteUserId) { + try { + return groupDao.getUserGroupCount(siteUserId); + } catch (Exception e) { + logger.error("get user group num error.", e); + } + return -1; + } + + public List getUserGroupList(String siteUserId) { + List goupList = new ArrayList(); + try { + goupList = groupDao.getUserGroupList(siteUserId); + } catch (Exception e) { + logger.error("get user group list error.", e); + } + return goupList; + } + + public List getUserGroupList(String siteUserId, int pageNum, int pageSize) { + List goupList = null; + try { + goupList = groupDao.getUserGroupList(siteUserId, pageNum, pageSize); + } catch (Exception e) { + logger.error("get user group list by page error.", e); + } + return goupList; + } + + public List getGroupMemberList(String groupId, int pageNum, int pageSize) { + List membersList = new ArrayList(); + try { + membersList = groupDao.getGroupMemberList(groupId, pageNum, pageSize); + } catch (Exception e) { + logger.error("get group members error.", e); + } + return membersList; + } + + // 管理后台使用 + public int getNonGroupMemberNum(String groupId) { + try { + return groupDao.getNonGroupMemberNum(groupId); + } catch (Exception e) { + logger.error("get non group members error.", e); + } + return 0; + } + + // 管理后台使用 + public List getNonGroupMemberList(String groupId, int pageNum, int pageSize) { + List membersList = new ArrayList(); + try { + membersList = groupDao.getNonGroupMemberList(groupId, pageNum, pageSize); + } catch (Exception e) { + logger.error("get non group members error.", e); + } + return membersList; + } + + public int getUserFriendNonGroupMemberNum(String siteUserId, String groupId) { + try { + return groupDao.getUserFriendNonGroupMemberNum(siteUserId, groupId); + } catch (Exception e) { + logger.error("get user friend non group member number error.", e); + } + return 0; + } + + public List getUserFriendNonGroupMemberList(String siteUserId, String groupId, int pageNum, + int pageSize) { + List userList = new ArrayList(); + try { + userList = groupDao.getUserFriendNonGroupMemberList(siteUserId, groupId, pageNum, pageSize); + } catch (Exception e) { + logger.error("get user friend non group members error.", e); + } + return userList; + } + + // 获取群成员人数 + public int getGroupMemberCount(String groupId) { + try { + return groupDao.getGroupMembersCount(groupId); + } catch (SQLException e) { + logger.error("get group member count error.", e); + } + return 0; + } + + // 创建群 + public GroupProfileBean createGroup(String createUserId, String groupName, List userIds) { + GroupProfileBean bean = new GroupProfileBean(); + try { + bean.setCreateTime(System.currentTimeMillis()); + bean.setGroupName(groupName); + bean.setCreateUserId(createUserId); + // 群头像使用默认 + // bean.setGroupPhoto(GROUP_DEFAULT_ICON); + bean.setGroupStatus(GroupProto.GroupStatus.GROUP_NORMAL_VALUE); + // 1.创建群资料 + bean = groupDao.addGroupProfile(bean); + // 2.添加群成员入库 + if (bean != null) { + for (String memberId : userIds) { + int status = GroupProto.GroupMemberRole.MEMBER_VALUE; + if (createUserId.equals(memberId)) { + status = GroupProto.GroupMemberRole.OWNER_VALUE; + } + groupDao.addGroupMember(memberId, bean.getGroupId(), status); + } + // 3.群消息中发送通知 + new GroupNotice().addGroupMemberNotice(createUserId, bean.getGroupId(), userIds); + } + } catch (Exception e) { + // 事务回滚,删除操作 + // 删除1.群资料 + // 删除2.群成员 + logger.error("create group error.", e); + } + return bean; + } + + public boolean addGroupMember(String siteUserId, String groupId, List userIdList) { + try { + // 1.获取当前,群消息最大游标 + long maxPointer = messageDao.queryMaxGroupPointer(groupId); + // 2.设置个人默认游标 + // 3.增加群成员 + for (String memberId : userIdList) { + messageDao.updateGroupPointer(groupId, memberId, null, maxPointer); + int status = GroupProto.GroupMemberRole.MEMBER_VALUE; + if (!groupDao.addGroupMember(memberId, groupId, status)) { + return false; + } + } + // 添加完用户,向群消息中添加GroupMsgNotice + new GroupNotice().addGroupMemberNotice(siteUserId, groupId, userIdList); + return true; + } catch (Exception e) { + logger.error("add group member error.", e); + } + return false; + } + + public boolean addDefaultGroupMember(String defaultGroupId, String siteUserId) { + try { + if (addGroupMember(defaultGroupId, siteUserId)) { + // 添加完用户,向群消息中添加GroupMsgNotice + new GroupNotice().addDefaultGroupMemberNotice(defaultGroupId, siteUserId); + return true; + } + } catch (Exception e) { + logger.error("add group member error.", e); + } + return false; + } + + public boolean addGroupMemberByToken(String siteGroupId, String siteUserId) { + try { + if (addGroupMember(siteGroupId, siteUserId)) { + // 添加完用户,向群消息中添加GroupMsgNotice + new GroupNotice().addGroupMemberByTokenNotice(siteGroupId, siteUserId); + return true; + } + } catch (Exception e) { + logger.error("add group member by token error.", e); + } + return false; + } + + private boolean addGroupMember(String siteGroupId, String siteUserId) throws SQLException { + // 1.获取当前,群消息最大游标 + long maxPointer = messageDao.queryMaxGroupPointer(siteGroupId); + // 2.设置个人默认游标 + // 3.增加群成员 + messageDao.updateGroupPointer(siteGroupId, siteUserId, null, maxPointer); + int status = GroupProto.GroupMemberRole.MEMBER_VALUE; + return groupDao.addGroupMember(siteUserId, siteGroupId, status); + } + + public boolean isGroupMember(String siteUserId, String groupId) { + try { + GroupMemberBean bean = groupDao.getGroupMember(siteUserId, groupId); + if (bean != null && StringUtils.isNotEmpty(bean.getUserId())) { + return true; + } + } catch (SQLException e) { + logger.error("is group member error.", e); + } + return false; + } + + public GroupProfileBean getGroupProfile(String groupId) { + GroupProfileBean profileBean = null; + try { + profileBean = groupDao.queryGroupProfile(groupId); + } catch (SQLException e) { + logger.error("get group profile error.", e); + } + return profileBean; + } + + public int getGroupStatus(String siteGroupId) { + try { + return groupDao.getGroupStatus(siteGroupId); + } catch (SQLException e) { + logger.error(StringHelper.format("get group={} status error", siteGroupId), e); + } + return 0;// 默认不可用的群组 + } + + public boolean updateGroupProfile(GroupProfileBean gprofileBean) { + int result = 0; + try { + result = groupDao.updateGroupProfile(gprofileBean); + } catch (SQLException e) { + logger.error("update group profile error."); + } + return result > 0; + } + + public boolean updateGroupIGC(GroupProfileBean bean) { + int result = 0; + try { + result = groupDao.updateGroupIGC(bean); + } catch (Exception e) { + logger.error(StringHelper.format("update group profile error.bean={}", bean), e); + } + return result > 0; + } + + public boolean deleteGroup(String groupId) { + try { + return groupDao.deleteGroupProfile(groupId); + } catch (Exception e) { + logger.error("delete group error,groupId=" + groupId, e); + } + return false; + } + + public boolean deleteGroupMember(String groupId, List userIds) { + try { + return groupDao.deleteGroupMember(groupId, userIds); + } catch (SQLException e) { + logger.error("delete group member error", e); + } + return false; + } + + public List checkGroupMember(String siteGroupId, List userIds) throws SQLException { + return userGroupDao.checkGroupMember(siteGroupId, userIds); + } + + public boolean quitGroup(String groupId, String userId) { + try { + return groupDao.deleteGroupMember(groupId, Arrays.asList(userId)); + } catch (SQLException e) { + logger.error("delete group member error", e); + } + return false; + } + + public List getGroupList(int pageNum, int pageSize) { + List goupList = null; + try { + goupList = groupDao.getGroupList(pageNum, pageSize); + } catch (Exception e) { + logger.error("get group list error.", e); + } + return goupList; + } + + public boolean updateGroupOwner(String siteUserId, String groupId) { + try { + return groupDao.updateGroupOwner(siteUserId, groupId) > 0; + } catch (SQLException e) { + logger.error("update group owner error"); + } + return false; + } + + public UserGroupBean getUserGroupSetting(String siteUserId, String siteGroupId) { + try { + UserGroupBean bean = userGroupDao.getUserGroupSetting(siteUserId, siteGroupId); + if (bean == null) { + bean = new UserGroupBean(); + bean.setMute(false); + } + return bean; + } catch (SQLException e) { + logger.error("get user group setting error", e); + } + return null; + } + + public boolean updateUserGroupSetting(String siteUserId, UserGroupBean bean) { + try { + return userGroupDao.updateUserGroupSetting(siteUserId, bean); + } catch (SQLException e) { + logger.error("update user group setting error", e); + } + return false; + } + + public boolean getUserGroupMute(String siteUserId, String siteGroupId) { + try { + return userGroupDao.isMute(siteUserId, siteGroupId); + } catch (SQLException e) { + logger.error("get user group setting error", e); + } + return true; + } + + public boolean updateUserGroupMute(String siteUserId, UserGroupBean bean) { + try { + return userGroupDao.updateUserGroupSetting(siteUserId, bean); + } catch (SQLException e) { + logger.error("update user group setting error", e); + } + return false; + } + + public int getTotalGroupNum() { + try { + return groupDao.getTotalGroupNum(); + } catch (SQLException e) { + logger.error("get total group num error", e); + } + return 0; + } + + public GroupProfileBean getSimpleGroupBeanById(String groupId) { + try { + return groupDao.querySimpleGroupProfile(groupId); + } catch (SQLException e) { + logger.error("get SimpleGroupBean error", e); + } + return null; + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/dao/UserProfileDao.java b/openzaly-business/src/main/java/com/akaxin/site/business/dao/UserProfileDao.java new file mode 100755 index 0000000..574b989 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/dao/UserProfileDao.java @@ -0,0 +1,234 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.dao; + +import java.sql.SQLException; +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.site.storage.api.IUserProfileDao; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.SimpleUserRelationBean; +import com.akaxin.site.storage.bean.UserFriendBean; +import com.akaxin.site.storage.bean.UserProfileBean; +import com.akaxin.site.storage.service.UserProfileDaoService; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-11-09 20:44:21 + */ +public class UserProfileDao { + private static final Logger logger = LoggerFactory.getLogger(UserProfileDao.class); + private static UserProfileDao instance = new UserProfileDao(); + private IUserProfileDao userProfileDao = new UserProfileDaoService(); + + public static UserProfileDao getInstance() { + return instance; + } + + public String getSiteUserIdByGlobalUserId(String globalUserId) { + try { + return userProfileDao.getSiteUserIdByGlobalUserId(globalUserId); + } catch (SQLException e) { + logger.error("get siteUserId by globalUserId error.", e); + } + return null; + } + + public String getSiteUserIdByPhone(String phoneId) { + try { + return userProfileDao.getSiteUserIdByPhone(phoneId); + } catch (SQLException e) { + logger.error("get siteUserId by phone error.", e); + } + return null; + } + + public String getSiteUserIdByLoginId(String lowercaseLoginId) { + try { + return userProfileDao.getSiteUserIdByLowercaseLoginId(lowercaseLoginId); + } catch (SQLException e) { + logger.error("get siteUserId by lowercase siteLoginId error.", e); + } + return null; + } + + public String getSiteLoginIdBySiteUserId(String siteUserId) { + try { + return userProfileDao.getSiteLoginIdBySiteUserId(siteUserId); + } catch (SQLException e) { + logger.error("get siteLoginId by siteUserId error.", e); + } + return null; + } + + public SimpleUserBean getSimpleProfileById(String siteUserId) { + return getSimpleProfileById(siteUserId, false); + } + + public SimpleUserBean getSimpleProfileById(String siteUserId, boolean isMaster) { + SimpleUserBean userBean = new SimpleUserBean(); + try { + userBean = userProfileDao.getSimpleProfileById(siteUserId, isMaster); + } catch (SQLException e) { + logger.error("get User Simple Profile by siteUserId error.", e); + } + return userBean; + } + + public SimpleUserBean getSimpleProfileByGlobalUserId(String globalUserId) { + return getSimpleProfileByGlobalUserId(globalUserId, false); + } + + public SimpleUserBean getSimpleProfileByGlobalUserId(String globalUserId, boolean isMaster) { + SimpleUserBean userBean = new SimpleUserBean(); + try { + userBean = userProfileDao.getSimpleProfileByGlobalUserId(globalUserId, isMaster); + } catch (SQLException e) { + logger.error("get User Simple Profile by globalUserId error.", e); + } + return userBean; + } + + public UserFriendBean getFriendProfileById(String siteUserId, String siteFriendId) { + UserFriendBean bean = null; + try { + bean = userProfileDao.getFriendProfileById(siteUserId, siteFriendId); + } catch (SQLException e) { + logger.error("get friend Profile error.", e); + } + return bean; + } + + public UserProfileBean getUserProfileById(String siteUserId) { + UserProfileBean userBean = null; + try { + userBean = userProfileDao.getUserProfileById(siteUserId); + } catch (SQLException e) { + logger.error("get user profile by userId error.", e); + } + return userBean; + } + + public UserProfileBean getUserProfileByGlobalUserId(String id) { + UserProfileBean userBean = null; + try { + userBean = userProfileDao.getUserProfileByGlobalUserId(id); + if (userBean != null) { + userBean.setGlobalUserId(id); + } + } catch (SQLException e) { + logger.error("get user profile by userId error.", e); + } + return userBean; + } + + public UserProfileBean getUserProfileByFullPhoneId(String fullPhoneId) { + UserProfileBean userBean = null; + try { + userBean = userProfileDao.getUserProfileByFullPhoneId(fullPhoneId); + } catch (SQLException e) { + logger.error("get user profile by full phone id error.", e); + } + return userBean; + } + + public boolean updateUserProfile(UserProfileBean userBean) { + int result = 0; + try { + result = userProfileDao.updateProfile(userBean); + } catch (SQLException e) { + logger.error("update user profile error.", e); + } + return result > 0; + } + + public boolean updateUserIdPubk(String siteUserId, String globalUserId, String userIdPubk) { + int result = 0; + try { + result = userProfileDao.updateUserIdPubk(siteUserId, globalUserId, userIdPubk); + } catch (SQLException e) { + logger.error("update globalUserId and userIdPubk error.", e); + } + return result > 0; + } + + /** + *

+	 * 更新用户状态,状态两种情况
+	 * 		1.status=0,站点正常用户状态,新用户默认状态
+	 *  		2.status=1,站点禁封状态,无法登陆站点
+	 * 
+ * + * @param siteUserId + * @param status + * @return + */ + public boolean updateUserStatus(String siteUserId, int status) { + int result = 0; + try { + result = userProfileDao.updateUserStatus(siteUserId, status); + } catch (SQLException e) { + logger.error("update user profile error.", e); + } + return result > 0; + } + + public List getUserRelationPageList(String siteUserId, int pageNum, int pageSize) { + List pageList = null; + try { + pageList = userProfileDao.getUserRelationPageList(siteUserId, pageNum, pageSize); + } catch (SQLException e) { + logger.error("get user page list.", e); + } + return pageList; + } + + public int getTotalUserNum() { + try { + return userProfileDao.getTotalUserNum(); + } catch (SQLException e) { + logger.error("get total user num error.", e); + } + return 0; + } + + public List getUserPageList(int pageNum, int pageSize) { + List pageList = null; + try { + pageList = userProfileDao.getUserPageList(pageNum, pageSize); + } catch (SQLException e) { + logger.error("get user page list.", e); + } + return pageList; + } + + public boolean getUserMute(String siteUserId) throws SQLException { + return userProfileDao.isMute(siteUserId); + } + + public boolean updateUserMute(String siteUserId, boolean mute) { + try { + return userProfileDao.updateMute(siteUserId, mute); + } catch (SQLException e) { + logger.error("update user mute error.", e); + } + return false; + } +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/dao/UserSessionDao.java b/openzaly-business/src/main/java/com/akaxin/site/business/dao/UserSessionDao.java new file mode 100755 index 0000000..b0f0835 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/dao/UserSessionDao.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.dao; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.site.storage.api.IUserSessionDao; +import com.akaxin.site.storage.service.UserSessionDaoService; + +public class UserSessionDao { + private static final Logger logger = LoggerFactory.getLogger(UserSessionDao.class); + private static UserSessionDao instance = new UserSessionDao(); + private IUserSessionDao userSessionDao = new UserSessionDaoService(); + + public static UserSessionDao getInstance() { + return instance; + } + + public List getSessionDevices(String siteUserId) { + List sessionDevices = new ArrayList(); + try { + sessionDevices = userSessionDao.getSessionDeivceIds(siteUserId); + } catch (SQLException e) { + logger.error("get devices from session error.siteUserId={}", siteUserId); + } + return sessionDevices; + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/AbstractRequest.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/AbstractRequest.java new file mode 100755 index 0000000..39a040a --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/AbstractRequest.java @@ -0,0 +1,93 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl; + +import java.lang.reflect.Method; +import java.sql.SQLException; + +import com.akaxin.site.business.dao.SiteUserDao; +import com.akaxin.site.business.dao.UserGroupDao; +import com.akaxin.site.business.dao.UserProfileDao; +import com.akaxin.site.message.dao.ImUserGroupDao; +import com.akaxin.site.message.dao.ImUserProfileDao; +import com.akaxin.site.storage.api.IUserProfileDao; +import com.akaxin.site.storage.bean.GroupProfileBean; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.UserProfileBean; +import com.akaxin.site.storage.service.UserProfileDaoService; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.logs.LogUtils; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:20:14 + */ +public abstract class AbstractRequest implements IRequestService { + private static final Logger logger = LoggerFactory.getLogger(AbstractRequest.class); + + public CommandResponse execute(Command command) { + return executeMethodByReflect(command); + } + + private CommandResponse executeMethodByReflect(Command command) { + CommandResponse response = null; + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + String methodName = command.getMethod(); + Method m = this.getClass().getDeclaredMethod(methodName, command.getClass()); + response = (CommandResponse) m.invoke(this, command); + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, e); + } + + if (response == null) { + response = new CommandResponse().setVersion(CommandConst.PROTOCOL_VERSION) + .setAction(CommandConst.ACTION_RES).setErrCode2(errCode); + } + return response; + } + + //检查请求的参数中的siteUserId是否是存在的 + public boolean checkUserIdLegal(String siteUserId) { + if (StringUtils.isNotEmpty(siteUserId)) { + SimpleUserBean userProfile = UserProfileDao.getInstance().getSimpleProfileById(siteUserId); + if (userProfile != null && StringUtils.isNotEmpty(userProfile.getSiteUserId())) { + return true; + } + } + return false; + } + + //检查请求的参数中的groupId是否是存在的 + public boolean checkGroupIdLegal(String groupId) { + if (StringUtils.isNotEmpty(groupId)) { + GroupProfileBean groupProfile = UserGroupDao.getInstance().getSimpleGroupBeanById(groupId); + if (groupProfile != null) { + return true; + } + } + return false; + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/IRequestService.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/IRequestService.java new file mode 100755 index 0000000..3caa4e5 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/IRequestService.java @@ -0,0 +1,8 @@ +package com.akaxin.site.business.impl; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; + +public interface IRequestService { + public CommandResponse execute(Command command); +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpFriendService.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpFriendService.java new file mode 100755 index 0000000..5340aaf --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpFriendService.java @@ -0,0 +1,210 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.hai; + +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.constant.IErrorCode; +import com.akaxin.common.exceptions.ZalyException2; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.UserProto; +import com.akaxin.proto.plugin.HaiFriendAddProto; +import com.akaxin.proto.plugin.HaiFriendApplyProto; +import com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest; +import com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse; +import com.akaxin.site.business.dao.UserFriendDao; +import com.akaxin.site.business.dao.UserProfileDao; +import com.akaxin.site.business.impl.AbstractRequest; +import com.akaxin.site.business.impl.notice.User2Notice; +import com.akaxin.site.business.push.PushNotification; +import com.akaxin.site.storage.bean.SimpleUserBean; + +/** + *
+ * 	好友相关的扩展功能实现
+ * 		hai/friend/add
+ * 		hai/friend/apply
+ * 		hai/friend/relations
+ * 
+ * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-10 18:59:10 + */ +public class HttpFriendService extends AbstractRequest { + private static final Logger logger = LoggerFactory.getLogger(HttpFriendService.class); + + /** + * 提供扩展服务中添加好友的功能 + * + * @param command + * @return + */ + public CommandResponse apply(Command command) { + CommandResponse commandResponse = new CommandResponse(); + IErrorCode errCode = ErrorCode2.ERROR; + try { + HaiFriendApplyProto.HaiFriendApplyRequest request = HaiFriendApplyProto.HaiFriendApplyRequest + .parseFrom(command.getParams()); + String siteUserId = request.getSiteUserId(); + String siteFriendId = request.getFriendSiteUserId(); + String applyReason = request.getApplyReason(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isEmpty(applyReason)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + if (!checkUserIdLegal(siteUserId) || !checkUserIdLegal(siteFriendId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + if (siteUserId.equals(siteFriendId)) { + throw new ZalyException2(ErrorCode2.ERROR2_FRIEND_APPLYSELF); + } + + // 先检测一次二者之间关系 + if (UserFriendDao.getInstance().isFriend(siteUserId, siteFriendId)) { + throw new ZalyException2(ErrorCode2.ERROR2_FRIEND_IS); + } + + int applyTimes = UserFriendDao.getInstance().getApplyCount(siteFriendId, siteUserId); + if (applyTimes >= 5) { + throw new ZalyException2(ErrorCode2.ERROR2_FRIEND_APPLYCOUNT); + } + + if (UserFriendDao.getInstance().saveFriendApply(siteUserId, siteFriendId, applyReason)) { + errCode = ErrorCode2.SUCCESS; + new User2Notice().applyFriendNotice(siteUserId, siteFriendId); + // 同时下发一条PUSH消息 + if (applyTimes < 2) { + PushNotification.sendAddFriend(siteUserId, siteFriendId); + } + } + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + * 执行添加好友功能 + * + * @param command + * @return + */ + public CommandResponse add(Command command) { + CommandResponse commandResponse = new CommandResponse(); + IErrorCode errCode = ErrorCode2.ERROR; + + try { + HaiFriendAddProto.HaiFriendAddRequest request = HaiFriendAddProto.HaiFriendAddRequest + .parseFrom(command.getParams()); + String siteUserId = request.getSiteUserId(); + String siteFriendId = request.getFriendSiteUserId(); + + if (!checkUserIdLegal(siteUserId) || !checkUserIdLegal(siteFriendId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + if (siteUserId.equals(siteFriendId)) { + throw new ZalyException2(ErrorCode2.ERROR2_FRIEND_APPLYSELF); + } + + // 同意添加好友 + if (UserFriendDao.getInstance().agreeApply(siteUserId, siteFriendId, true)) { + errCode = ErrorCode2.SUCCESS; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + + return commandResponse.setErrCode(errCode); + } + + /** + * 批量获取用户关系列表 + * + * @param command + * @return + */ + public CommandResponse relations(Command command) { + CommandResponse commandResponse = new CommandResponse(); + IErrorCode errCode = ErrorCode2.ERROR; + + try { + HaiFriendRelationsRequest request = HaiFriendRelationsRequest.parseFrom(command.getParams()); + String siteUserId = request.getSiteUserId(); + List userIdList = request.getTargetSiteUserIdList(); + + if (userIdList == null) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + if (!checkUserIdLegal(siteUserId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + for (String id : userIdList) { + if (!checkUserIdLegal(id)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + } + + HaiFriendRelationsResponse.Builder resBuilder = HaiFriendRelationsResponse.newBuilder(); + for (String siteFriendId : userIdList) { + SimpleUserBean userBean = UserProfileDao.getInstance().getSimpleProfileById(siteFriendId); + if (userBean != null && StringUtils.isNotEmpty(userBean.getUserId())) { + UserProto.SimpleUserProfile.Builder userProfileBuilder = UserProto.SimpleUserProfile.newBuilder(); + userProfileBuilder.setSiteUserId(userBean.getUserId()); + userProfileBuilder.setUserName(userBean.getUserName()); + userProfileBuilder.setUserPhoto(userBean.getUserPhoto()); + UserProto.UserRelation userRelation = UserFriendDao.getInstance().getUserRelation(siteUserId, + siteFriendId); + UserProto.UserRelationProfile relationProfile = UserProto.UserRelationProfile.newBuilder() + .setProfile(userProfileBuilder.build()).setRelation(userRelation).build(); + resBuilder.addUserProfile(relationProfile); + } + } + commandResponse.setParams(resBuilder.build().toByteArray()); + errCode = ErrorCode2.SUCCESS; + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + + return commandResponse.setErrCode(errCode); + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpGroupService.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpGroupService.java new file mode 100755 index 0000000..1171493 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpGroupService.java @@ -0,0 +1,462 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.hai; + +import java.util.List; + +import com.akaxin.site.business.impl.site.SiteConfig; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.constant.IErrorCode; +import com.akaxin.common.exceptions.ZalyException2; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.GroupProto; +import com.akaxin.proto.core.UserProto; +import com.akaxin.proto.plugin.HaiGroupAddMemberProto; +import com.akaxin.proto.plugin.HaiGroupCheckMemberProto; +import com.akaxin.proto.plugin.HaiGroupDeleteProto; +import com.akaxin.proto.plugin.HaiGroupListProto; +import com.akaxin.proto.plugin.HaiGroupMembersProto; +import com.akaxin.proto.plugin.HaiGroupNonmembersProto; +import com.akaxin.proto.plugin.HaiGroupProfileProto; +import com.akaxin.proto.plugin.HaiGroupRemoveMemberProto; +import com.akaxin.proto.plugin.HaiGroupUpdateProto; +import com.akaxin.site.business.constant.GroupConfig; +import com.akaxin.site.business.dao.UserGroupDao; +import com.akaxin.site.business.impl.AbstractRequest; +import com.akaxin.site.storage.bean.GroupMemberBean; +import com.akaxin.site.storage.bean.GroupProfileBean; +import com.akaxin.site.storage.bean.SimpleGroupBean; +import com.google.protobuf.ProtocolStringList; + +/** + *
+ * 	群组相关的扩展功能实现
+ * 		/ hai / group / profile 
+ * 		/ hai / group / list 
+ * 		/ hai / group / update 
+ * 		/ hai / group / delete 
+ * 		/ hai / group / addMember 
+ * 		/ hai / group / checkMember 	
+ * 		/ hai / group / removeMember 
+ * 		/ hai / group / members 
+ * 		/ hai / group / nonmembers
+ * 
+ */ +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-13 16:46:01 + */ +public class HttpGroupService extends AbstractRequest { + private static final Logger logger = LoggerFactory.getLogger(HttpGroupService.class); + + /** + * /hai/group/profile : 获取群组资料 + * + * @param command + * @return + */ + public CommandResponse profile(Command command) { + CommandResponse commandResponse = new CommandResponse(); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + HaiGroupProfileProto.HaiGroupProfileRequest request = HaiGroupProfileProto.HaiGroupProfileRequest + .parseFrom(command.getParams()); + String groupId = request.getGroupId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + GroupProfileBean groupBean = UserGroupDao.getInstance().getGroupProfile(groupId); + + if (groupBean != null && StringUtils.isNotBlank(groupBean.getGroupId())) { + GroupProto.GroupProfile groupProfile = GroupProto.GroupProfile.newBuilder() + .setId(groupBean.getGroupId()).setName(String.valueOf(groupBean.getGroupName())) + .setIcon(String.valueOf(groupBean.getGroupPhoto())).build(); + HaiGroupProfileProto.HaiGroupProfileResponse.Builder responseBuilder = HaiGroupProfileProto.HaiGroupProfileResponse + .newBuilder(); + responseBuilder.setProfile(groupProfile); + commandResponse.setParams(responseBuilder.build().toByteArray()); + errCode = ErrorCode2.SUCCESS; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + /** + * /hai/group/list + * + * @param command + * @return + */ + public CommandResponse list(Command command) { + CommandResponse commandResponse = new CommandResponse(); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + HaiGroupListProto.HaiGroupListRequest request = HaiGroupListProto.HaiGroupListRequest + .parseFrom(command.getParams()); + int pageNum = request.getPageNumber(); + int pageSize = request.getPageSize(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + int totalNum = UserGroupDao.getInstance().getTotalGroupNum(); + List groupList = UserGroupDao.getInstance().getGroupList(pageNum, pageSize); + + HaiGroupListProto.HaiGroupListResponse.Builder responseBuilder = HaiGroupListProto.HaiGroupListResponse + .newBuilder(); + responseBuilder.setPageTotalNum(totalNum); + if (groupList != null) { + for (SimpleGroupBean bean : groupList) { + responseBuilder.addGroupProfile(getSimpleGroupProfile(bean)); + } + } + commandResponse.setParams(responseBuilder.build().toByteArray()); + errCode = ErrorCode2.SUCCESS; + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + /** + * /hai/group/update : 更新群资料 + * + * @param command + * @return + */ + public CommandResponse update(Command command) { + CommandResponse commandResponse = new CommandResponse(); + IErrorCode errCode = ErrorCode2.ERROR; + try { + HaiGroupUpdateProto.HaiGroupUpdateRequest request = HaiGroupUpdateProto.HaiGroupUpdateRequest + .parseFrom(command.getParams()); + String groupId = request.getProfile().getId(); + String photoId = request.getProfile().getIcon(); + String groupName = request.getProfile().getName(); + String groupNotice = request.getProfile().getGroupNotice(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isEmpty(groupId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + GroupProfileBean gprofileBean = new GroupProfileBean(); + gprofileBean.setGroupId(groupId); + gprofileBean.setGroupName(groupName); + gprofileBean.setGroupPhoto(photoId); + gprofileBean.setGroupNotice(groupNotice); + if (UserGroupDao.getInstance().updateGroupProfile(gprofileBean)) { + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR_DATABASE_EXECUTE; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + * /hai/group/delete : 删除群组 + * + * @param command + * @return + */ + public CommandResponse delete(Command command) { + CommandResponse commandResponse = new CommandResponse(); + IErrorCode errCode = ErrorCode2.ERROR; + try { + HaiGroupDeleteProto.HaiGroupDeleteRequest request = HaiGroupDeleteProto.HaiGroupDeleteRequest + .parseFrom(command.getParams()); + String siteGroupId = request.getGroupId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isEmpty(siteGroupId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + if (UserGroupDao.getInstance().deleteGroup(siteGroupId)) { + errCode = ErrorCode2.SUCCESS; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + + return commandResponse.setErrCode(errCode); + } + + /** + * /hai/group/addMember : 添加群成员 + * + * @param command + * @return + */ + public CommandResponse addMember(Command command) { + CommandResponse commandResponse = new CommandResponse(); + IErrorCode errCode = ErrorCode2.ERROR; + try { + HaiGroupAddMemberProto.HaiGroupAddMemberRequest request = HaiGroupAddMemberProto.HaiGroupAddMemberRequest + .parseFrom(command.getParams()); + String siteGroupId = request.getGroupId(); + ProtocolStringList memberUserList = request.getMemberSiteUserIdList(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (memberUserList == null) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + if (!checkGroupIdLegal(siteGroupId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + for (String memberId : memberUserList) { + if (!checkUserIdLegal(memberId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + } + + if (UserGroupDao.getInstance().addGroupMember(null, siteGroupId, memberUserList)) { + errCode = ErrorCode2.SUCCESS; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + * /hai/group/removeMember : 删除群成员 + * + * @param command + * @return + */ + public CommandResponse removeMember(Command command) { + CommandResponse commandResponse = new CommandResponse(); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest request = HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest + .parseFrom(command.getParams()); + String groupId = request.getGroupId(); + if (!checkGroupIdLegal(groupId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + ProtocolStringList deleteMemberIds = request.getGroupMemberList(); + LogUtils.requestDebugLog(logger, command, request.toString()); + //无法删除群主 + String groupMaster = UserGroupDao.getInstance().getGroupMaster(groupId); + for (String deleteMemberId : deleteMemberIds) { + if (!checkUserIdLegal(deleteMemberId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + if (groupMaster.equals(deleteMemberId)) { + throw new ZalyException2(ErrorCode2.ERROR_NOPERMISSION); + } + } + if (UserGroupDao.getInstance().deleteGroupMember(groupId, deleteMemberIds)) { + errCode = ErrorCode2.SUCCESS; + } + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 zalyException2) { + errCode = (ErrorCode2) zalyException2.getErrCode(); + LogUtils.requestErrorLog(logger, command, zalyException2); + } + return commandResponse.setErrCode2(errCode); + } + + /** + * /hai/group/checkMember : 检测用户是否在群聊中 + * + * @param command + * @return + */ + public CommandResponse checkMember(Command command) { + CommandResponse commandResponse = new CommandResponse(); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest request = HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest + .parseFrom(command.getParams()); + String groupId = request.getGroupId(); + ProtocolStringList checkUserIds = request.getSiteUserIdList(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNotBlank(groupId) || checkUserIds == null) { + errCode = ErrorCode2.ERROR_PARAMETER; + } + + List checkedUserList = UserGroupDao.getInstance().checkGroupMember(groupId, checkUserIds); + if (checkedUserList != null) { + HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse response = HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse + .newBuilder().addAllMembersSiteUserId(checkedUserList).build(); + commandResponse.setParams(response.toByteArray()); + } + + errCode = ErrorCode2.SUCCESS; + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + /** + * 获取群成员列表 + * + * @param command + * @return + */ + public CommandResponse members(Command command) { + CommandResponse commandResponse = new CommandResponse(); + IErrorCode errCode = ErrorCode2.ERROR; + try { + HaiGroupMembersProto.HaiGroupMembersRequest request = HaiGroupMembersProto.HaiGroupMembersRequest + .parseFrom(command.getParams()); + String groupId = request.getGroupId(); + int pageNum = request.getPageNumber(); + int pageSize = request.getPageSize(); + if (pageNum == 0 && pageSize == 0) { + pageNum = 1; + pageSize = GroupConfig.GROUP_MAX_MEMBER_COUNT; + } + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (!checkGroupIdLegal(groupId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + int memberSize = UserGroupDao.getInstance().getGroupMemberCount(groupId); + List memberList = UserGroupDao.getInstance().getGroupMemberList(groupId, pageNum, + pageSize); + + HaiGroupMembersProto.HaiGroupMembersResponse.Builder responseBuilder = HaiGroupMembersProto.HaiGroupMembersResponse + .newBuilder(); + responseBuilder.setPageTotalNum(memberSize); + if (memberList != null) { + for (GroupMemberBean member : memberList) { + GroupProto.GroupMemberRole memberRole = GroupProto.GroupMemberRole.forNumber(member.getUserRole()); + UserProto.UserProfile memberProfile = UserProto.UserProfile.newBuilder() + .setSiteUserId(member.getUserId()).setUserName(String.valueOf(member.getUserName())) + .setUserPhoto(String.valueOf(member.getUserPhoto())).build(); + GroupProto.GroupMemberProfile groupMember = GroupProto.GroupMemberProfile.newBuilder() + .setRole(memberRole).setProfile(memberProfile).build(); + responseBuilder.addGroupMember(groupMember); + } + } + commandResponse.setParams(responseBuilder.build().toByteArray()); + errCode = ErrorCode2.SUCCESS; + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + * /hai/group/nonmembers + * + * @param command + * @return + */ + public CommandResponse nonmembers(Command command) { + CommandResponse commandResponse = new CommandResponse(); + IErrorCode errCode = ErrorCode2.ERROR; + try { + HaiGroupNonmembersProto.HaiGroupNonmembersRequest request = HaiGroupNonmembersProto.HaiGroupNonmembersRequest + .parseFrom(command.getParams()); + String siteUserId = request.getSiteUserId(); + String groupId = request.getGroupId(); + int pageNum = request.getPageNumber(); + int pageSize = request.getPageSize(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (!checkUserIdLegal(siteUserId) || !checkGroupIdLegal(groupId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + int totalNonMembersSize = UserGroupDao.getInstance().getUserFriendNonGroupMemberNum(siteUserId, groupId); + List memberList = UserGroupDao.getInstance().getNonGroupMemberList(groupId, pageNum, + pageSize); + HaiGroupNonmembersProto.HaiGroupNonmembersResponse.Builder responseBuilder = HaiGroupNonmembersProto.HaiGroupNonmembersResponse + .newBuilder(); + responseBuilder.setPageTotalNum(totalNonMembersSize); + if (memberList != null) { + for (GroupMemberBean member : memberList) { + GroupProto.GroupMemberRole memberRole = GroupProto.GroupMemberRole.NONMEMBER; + UserProto.UserProfile memberProfile = UserProto.UserProfile.newBuilder() + .setSiteUserId(member.getUserId()).setUserName(String.valueOf(member.getUserName())) + .setUserPhoto(String.valueOf(member.getUserPhoto())).build(); + GroupProto.GroupMemberProfile groupMember = GroupProto.GroupMemberProfile.newBuilder() + .setRole(memberRole).setProfile(memberProfile).build(); + responseBuilder.addGroupMember(groupMember); + } + } + commandResponse.setParams(responseBuilder.build().toByteArray()); + errCode = ErrorCode2.SUCCESS; + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + private GroupProto.SimpleGroupProfile getSimpleGroupProfile(SimpleGroupBean bean) { + GroupProto.SimpleGroupProfile.Builder sgpBuilder = GroupProto.SimpleGroupProfile.newBuilder(); + + if (StringUtils.isNotBlank(bean.getGroupId())) { + sgpBuilder.setGroupId(bean.getGroupId()); + } + + if (StringUtils.isNotBlank(bean.getGroupName())) { + sgpBuilder.setGroupName(bean.getGroupName()); + } + + if (StringUtils.isNotBlank(bean.getGroupPhoto())) { + sgpBuilder.setGroupIcon(bean.getGroupPhoto()); + } + + return sgpBuilder.build(); + } + +} \ No newline at end of file diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpMessageService.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpMessageService.java new file mode 100755 index 0000000..86f4fb2 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpMessageService.java @@ -0,0 +1,79 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.hai; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.constant.RequestAction; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.plugin.HaiMessageProxyProto; +import com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest; +import com.akaxin.site.business.impl.AbstractRequest; +import com.akaxin.site.message.api.IMessageService; +import com.akaxin.site.message.service.ImMessageService; + +/** + * 扩展使用的消息服务 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-14 12:03:49 + */ +// @Service("message") +public class HttpMessageService extends AbstractRequest { + private static final Logger logger = LoggerFactory.getLogger(HttpMessageService.class); + + private IMessageService imService = new ImMessageService(); + + /** + * + * @param command + * @return + */ + // @method("proxy") + public CommandResponse proxy(Command command) { + CommandResponse commandResponse = new CommandResponse(); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + HaiMessageProxyProto.HaiMessageProxyRequest request = HaiMessageProxyProto.HaiMessageProxyRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + ImCtsMessageRequest proxyMessage = request.getProxyMsg(); + + Command proxyCommand = new Command(); + proxyCommand.setSiteUserId(siteUserId); + proxyCommand.setAction(RequestAction.IM_CTS_MESSAGE.getName()); + proxyCommand.setParams(proxyMessage.toByteArray()); + proxyCommand.setProxy(true);// 设置为代理请求 + + boolean result = imService.execute(proxyCommand); + if (result) { + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR2_MESSAGE_SEND_FAIL; + } + + LogUtils.requestInfoLog(logger, proxyCommand, "result={} request={}", result, request.toBuilder()); + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpPushService.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpPushService.java new file mode 100755 index 0000000..a8815b1 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpPushService.java @@ -0,0 +1,83 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.hai; + +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest; +import com.akaxin.site.business.dao.SiteUserDao; +import com.akaxin.site.business.impl.AbstractRequest; +import com.akaxin.site.business.push.PushNotification; + +/** + * 扩展使用的PUSH服务 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-14 12:03:55 + */ +public class HttpPushService extends AbstractRequest { + private static final Logger logger = LoggerFactory.getLogger(HttpPushService.class); + + /** + * 向站点所有人推送PUSH通知消息 + * + * @param command + * @return + */ + public CommandResponse notices(Command command) { + CommandResponse commandResponse = new CommandResponse(); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + HaiPushNoticesRequest request = HaiPushNoticesRequest.parseFrom(command.getParams()); + String pushGoto = request.getPushGoto(); + String pushTitle = request.getSubtitle(); + String pushContent = request.getContent(); + String siteUserId = command.getSiteUserId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + int pageNum = 1; + int pageSize = 200; + + while (true) { + List userList = SiteUserDao.getInstance().getSiteUsersByPage(pageNum++, pageSize); + + if (userList != null) { + for (String userId : userList) { + PushNotification.send(siteUserId, userId, pushTitle, pushContent, pushGoto); + } + } + + if (userList == null || userList.size() < pageSize) { + break; + } + } + + errCode = ErrorCode2.SUCCESS; + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpSessionService.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpSessionService.java new file mode 100755 index 0000000..77d94aa --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpSessionService.java @@ -0,0 +1,107 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.hai; + +import java.util.Base64; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CharsetCoding; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.constant.IErrorCode; +import com.akaxin.common.crypto.AESCrypto; +import com.akaxin.common.exceptions.ZalyException2; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.UserProto; +import com.akaxin.proto.plugin.HaiSessionProfileProto; +import com.akaxin.site.business.dao.UserProfileDao; +import com.akaxin.site.business.impl.AbstractRequest; +import com.akaxin.site.storage.api.IUserSessionDao; +import com.akaxin.site.storage.bean.SimpleAuthBean; +import com.akaxin.site.storage.bean.UserProfileBean; +import com.akaxin.site.storage.service.UserSessionDaoService; + +/** + *
+ * 	个人Session相关的扩展功能实现
+ * 		hai/session/profile
+ * 
+ * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-01 12:07:32 + */ +public class HttpSessionService extends AbstractRequest { + private static final Logger logger = LoggerFactory.getLogger(HttpSessionService.class); + + // session查询个人profile + public CommandResponse profile(Command command) { + CommandResponse commandResponse = new CommandResponse(); + IErrorCode errCode = ErrorCode2.ERROR; + try { + HaiSessionProfileProto.HaiSessionProfileRequest request = HaiSessionProfileProto.HaiSessionProfileRequest + .parseFrom(command.getParams()); + String base64SessionId = request.getBase64SafeUrlSessionId(); + String authKey = command.getPluginAuthKey(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isAnyEmpty(base64SessionId, authKey)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + byte[] aesSessionId = Base64.getUrlDecoder().decode(base64SessionId); + // 解密sessionId + byte[] tsk = authKey.getBytes(CharsetCoding.ISO_8859_1); + byte[] sessionIdBytes = AESCrypto.decrypt(tsk, aesSessionId); + String sessionId = new String(sessionIdBytes, CharsetCoding.ISO_8859_1); + + // sessionid 查询 sessionID + IUserSessionDao sessionDao = new UserSessionDaoService(); + SimpleAuthBean authBean = sessionDao.getUserSession(sessionId); + + if (authBean == null || StringUtils.isAnyEmpty(authBean.getSiteUserId(), authBean.getDeviceId())) { + throw new ZalyException2(ErrorCode2.ERROR_SESSION); + } + + String siteUserId = authBean.getSiteUserId(); + // 查询个人资料 + UserProfileBean bean = UserProfileDao.getInstance().getUserProfileById(siteUserId); + if (bean == null || StringUtils.isEmpty(bean.getSiteUserId())) { + throw new ZalyException2(ErrorCode2.ERROR2_USER_NOUSER); + } + + UserProto.UserProfile profile = UserProto.UserProfile.newBuilder().setSiteUserId(bean.getSiteUserId()) + .setUserName(bean.getUserName()).setUserPhoto(String.valueOf(bean.getUserPhoto())) + .setUserStatusValue(bean.getUserStatus()).build(); + HaiSessionProfileProto.HaiSessionProfileResponse response = HaiSessionProfileProto.HaiSessionProfileResponse + .newBuilder().setUserProfile(profile).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpSiteService.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpSiteService.java new file mode 100755 index 0000000..77304e2 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpSiteService.java @@ -0,0 +1,69 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.hai; + +import java.util.Map; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.ConfigProto; +import com.akaxin.proto.plugin.HaiSiteGetConfigProto; +import com.akaxin.site.business.impl.AbstractRequest; +import com.akaxin.site.business.impl.site.SiteConfig; + +/** + * hai接口,提供对站点配置相关操作 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-08 14:22:52 + */ +public class HttpSiteService extends AbstractRequest { + private static final Logger logger = LoggerFactory.getLogger(HttpSiteService.class); + + /** + * 获取站点配置信息 + * + * @param command + * @return + */ + public CommandResponse getConfig(Command command) { + CommandResponse commandResponse = new CommandResponse(); + ErrorCode2 errorCode = ErrorCode2.ERROR; + try { + Map configMap = SiteConfig.getConfigMap(); + LogUtils.requestDebugLog(logger, command, ""); + logger.info("get config map = {}", configMap); + + ConfigProto.SiteBackConfig config = ConfigProto.SiteBackConfig.newBuilder().putAllSiteConfig(configMap) + .build(); + HaiSiteGetConfigProto.HaiSiteGetConfigResponse response = HaiSiteGetConfigProto.HaiSiteGetConfigResponse + .newBuilder().setSiteConfig(config).build(); + logger.info("get config service response={}", response.toString()); + commandResponse.setParams(response.toByteArray()); + errorCode = ErrorCode2.SUCCESS; + } catch (Exception e) { + errorCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errorCode); + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpUserService.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpUserService.java new file mode 100755 index 0000000..0820f35 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/hai/HttpUserService.java @@ -0,0 +1,391 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.hai; + +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.constant.IErrorCode; +import com.akaxin.common.exceptions.ZalyException2; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.GroupProto; +import com.akaxin.proto.core.UserProto; +import com.akaxin.proto.plugin.HaiUserAvatarProto; +import com.akaxin.proto.plugin.HaiUserFriendsProto; +import com.akaxin.proto.plugin.HaiUserGroupsProto; +import com.akaxin.proto.plugin.HaiUserListProto; +import com.akaxin.proto.plugin.HaiUserPhoneProto; +import com.akaxin.proto.plugin.HaiUserProfileProto; +import com.akaxin.proto.plugin.HaiUserUpdateProto; +import com.akaxin.site.business.dao.UserFriendDao; +import com.akaxin.site.business.dao.UserGroupDao; +import com.akaxin.site.business.dao.UserProfileDao; +import com.akaxin.site.business.impl.AbstractRequest; +import com.akaxin.site.business.utils.FilePathUtils; +import com.akaxin.site.business.utils.FileServerUtils; +import com.akaxin.site.storage.bean.SimpleGroupBean; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.UserProfileBean; +import com.google.protobuf.ByteString; + +/** + *
+ * 	个人相关的扩展功能实现
+ * 		hai/user/list
+ * 		hai/user/profile
+ * 		hai/user/update
+ * 		hai/user/phone
+ * 		hai/user/friends
+ * 		hai/user/groups
+ * 
+ * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.11.28 17:28:31 + */ +public class HttpUserService extends AbstractRequest { + private static final Logger logger = LoggerFactory.getLogger(HttpUserService.class); + + /** + * 获取站点上的所有用户列表 + * + * @param command + * @return + */ + public CommandResponse list(Command command) { + CommandResponse commandResponse = new CommandResponse(); + IErrorCode errCode = ErrorCode2.ERROR; + try { + HaiUserListProto.HaiUserListRequest request = HaiUserListProto.HaiUserListRequest + .parseFrom(command.getParams()); + int pageNum = request.getPageNumber(); + int pageSize = request.getPageSize(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (pageNum == 0 && pageSize == 0) { + pageNum = 1; + pageSize = 100; + } + + int totalUserNum = UserProfileDao.getInstance().getTotalUserNum(); + List userPageList = UserProfileDao.getInstance().getUserPageList(pageNum, pageSize); + + HaiUserListProto.HaiUserListResponse.Builder responseBuilder = HaiUserListProto.HaiUserListResponse + .newBuilder(); + responseBuilder.setPageTotalNum(totalUserNum); + if (userPageList != null) { + for (SimpleUserBean bean : userPageList) { + UserProto.SimpleUserProfile.Builder userProfileBuilder = UserProto.SimpleUserProfile.newBuilder(); + userProfileBuilder.setSiteUserId(bean.getUserId()); + if (StringUtils.isNotBlank(bean.getUserName())) { + userProfileBuilder.setUserName(bean.getUserName()); + } + if (StringUtils.isNotBlank(bean.getUserPhoto())) { + userProfileBuilder.setUserPhoto(bean.getUserPhoto()); + } + userProfileBuilder.setUserStatusValue(bean.getUserStatus()); + responseBuilder.addUserProfile(userProfileBuilder.build()); + } + } + responseBuilder.setPageTotalNum(totalUserNum); + commandResponse.setParams(responseBuilder.build().toByteArray()); + errCode = ErrorCode2.SUCCESS; + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + + return commandResponse.setErrCode(errCode); + } + + // 个人profile + public CommandResponse profile(Command command) { + CommandResponse commandResponse = new CommandResponse(); + IErrorCode errCode = ErrorCode2.ERROR; + try { + HaiUserProfileProto.HaiUserProfileRequest request = HaiUserProfileProto.HaiUserProfileRequest + .parseFrom(command.getParams()); + String siteUserId = request.getSiteUserId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isEmpty(siteUserId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + UserProfileBean bean = UserProfileDao.getInstance().getUserProfileById(siteUserId); + if (bean == null || StringUtils.isEmpty(bean.getSiteUserId())) { + throw new ZalyException2(ErrorCode2.ERROR2_USER_NOUSER); + } + + UserProto.UserProfile profile = UserProto.UserProfile.newBuilder().setSiteUserId(bean.getSiteUserId()) + .setUserName(String.valueOf(bean.getUserName())).setUserPhoto(String.valueOf(bean.getUserPhoto())) + .setUserStatusValue(bean.getUserStatus()).build(); + HaiUserProfileProto.HaiUserProfileResponse response = HaiUserProfileProto.HaiUserProfileResponse + .newBuilder().setUserProfile(profile).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + // 获取用户头像 + public CommandResponse avatar(Command command) { + CommandResponse commandResponse = new CommandResponse(); + IErrorCode errCode = ErrorCode2.ERROR; + try { + HaiUserAvatarProto.HaiUserAvatarRequest request = HaiUserAvatarProto.HaiUserAvatarRequest + .parseFrom(command.getParams()); + String siteUserId = request.getSiteUserId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isEmpty(siteUserId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + SimpleUserBean bean = UserProfileDao.getInstance().getSimpleProfileById(siteUserId); + + if (bean == null || StringUtils.isEmpty(bean.getUserPhoto())) { + throw new ZalyException2(ErrorCode2.ERROR2_USER_AVATAR); + } + + String photoId = bean.getUserPhoto(); + + byte[] photoContents = FileServerUtils.fileToBinary(FilePathUtils.getPicPath(), photoId); + + if (photoContents != null && photoContents.length > 0) { + HaiUserAvatarProto.HaiUserAvatarResponse response = HaiUserAvatarProto.HaiUserAvatarResponse + .newBuilder().setPhotoId(photoId).setPhotoContent(ByteString.copyFrom(photoContents)).build(); + + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + // 更新个人信息 + public CommandResponse update(Command command) { + CommandResponse commandResponse = new CommandResponse(); + IErrorCode errCode = ErrorCode2.ERROR; + try { + HaiUserUpdateProto.HaiUserUpdateRequest request = HaiUserUpdateProto.HaiUserUpdateRequest + .parseFrom(command.getParams()); + String siteUserId = request.getUserProfile().getSiteUserId(); + String userName = request.getUserProfile().getUserName(); + String userPhoto = request.getUserProfile().getUserPhoto(); + String userIntro = request.getUserProfile().getSelfIntroduce(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + // 过滤参数 + if (StringUtils.isEmpty(siteUserId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + UserProfileBean bean = new UserProfileBean(); + bean.setSiteUserId(siteUserId); + bean.setUserName(userName); + bean.setUserPhoto(userPhoto); + bean.setSelfIntroduce(userIntro); + if (UserProfileDao.getInstance().updateUserProfile(bean)) { + errCode = ErrorCode2.SUCCESS; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + + return commandResponse.setErrCode(errCode); + } + + // * 获取用户手机号码 + public CommandResponse phone(Command command) { + CommandResponse commandResponse = new CommandResponse(); + IErrorCode errCode = ErrorCode2.ERROR; + try { + HaiUserPhoneProto.HaiUserPhoneRequest request = HaiUserPhoneProto.HaiUserPhoneRequest + .parseFrom(command.getParams()); + String siteUserId = request.getSiteUserId(); + + if (StringUtils.isAnyEmpty(siteUserId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + UserProfileBean userBean = UserProfileDao.getInstance().getUserProfileById(siteUserId); + if (userBean == null || StringUtils.isEmpty(userBean.getPhoneId())) { + throw new ZalyException2(ErrorCode2.ERROR2_PHONE_HAVE_NO); + } + + String phoneIdWithCountryCode = userBean.getPhoneId(); + String[] phondIds = phoneIdWithCountryCode.split("_"); + + String phoneId = phoneIdWithCountryCode; + String countryCode = "+86"; + if (phondIds.length == 2) { + countryCode = phondIds[0]; + phoneId = phondIds[1]; + } + + HaiUserPhoneProto.HaiUserPhoneResponse response = HaiUserPhoneProto.HaiUserPhoneResponse.newBuilder() + .setPhoneId(phoneId).setCountryCode(countryCode).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + + return commandResponse.setErrCode(errCode); + } + + // friends of user + public CommandResponse friends(Command command) { + CommandResponse commandResponse = new CommandResponse(); + IErrorCode errCode = ErrorCode2.ERROR; + try { + HaiUserFriendsProto.HaiUserFriendsRequest request = HaiUserFriendsProto.HaiUserFriendsRequest + .parseFrom(command.getParams()); + String siteUserId = request.getSiteUserId(); + + if (!checkUserIdLegal(siteUserId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + int pageNum = request.getPageNumber(); + int pageSize = request.getPageSize(); + + if (pageNum == 0 && pageSize == 0) { + pageNum = 1; + pageSize = 100; + } + + // 从第一页开始,才给pageNum + int totalNum = UserFriendDao.getInstance().getUserFriendNum(siteUserId); + List friendList = UserFriendDao.getInstance().getUserFriendsByPage(siteUserId, pageNum, + pageSize); + + HaiUserFriendsProto.HaiUserFriendsResponse.Builder resBuilder = HaiUserFriendsProto.HaiUserFriendsResponse + .newBuilder(); + resBuilder.setPageTotalNum(totalNum); + if (friendList != null) { + for (SimpleUserBean bean : friendList) { + UserProto.SimpleUserProfile.Builder supBuilder = UserProto.SimpleUserProfile.newBuilder(); + supBuilder.setSiteUserId(bean.getSiteUserId()); + if (StringUtils.isNotEmpty(bean.getAliasName())) { + supBuilder.setUserName(bean.getAliasName()); + } else { + supBuilder.setUserName(bean.getUserName()); + } + supBuilder.setNickName(bean.getUserName()); + supBuilder.setUserPhoto(bean.getUserPhoto()); + resBuilder.addProfile(supBuilder.build()); + } + } + commandResponse.setParams(resBuilder.build().toByteArray()); + errCode = ErrorCode2.SUCCESS; + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + + return commandResponse.setErrCode(errCode); + } + + // groups of user + public CommandResponse groups(Command command) { + CommandResponse commandResponse = new CommandResponse(); + IErrorCode errCode = ErrorCode2.ERROR; + try { + HaiUserGroupsProto.HaiUserGroupsRequest request = HaiUserGroupsProto.HaiUserGroupsRequest + .parseFrom(command.getParams()); + String siteUserId = request.getSiteUserId(); + + if (!checkUserIdLegal(siteUserId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + int pageNum = request.getPageNumber(); + int pageSize = request.getPageSize(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (pageNum == 0 && pageSize == 0) { + pageNum = 1; + pageSize = 100; + } + + // + int pageTotal = UserGroupDao.getInstance().getUserGroupCount(siteUserId); + List groupList = UserGroupDao.getInstance().getUserGroupList(siteUserId, pageNum, + pageSize); + + HaiUserGroupsProto.HaiUserGroupsResponse.Builder resBuilder = HaiUserGroupsProto.HaiUserGroupsResponse + .newBuilder(); + resBuilder.setPageTotalNum(pageTotal); + if (groupList != null) { + for (SimpleGroupBean bean : groupList) { + GroupProto.GroupProfile.Builder sgpBuilder = GroupProto.GroupProfile.newBuilder(); + sgpBuilder.setId(bean.getGroupId()); + if (StringUtils.isNotEmpty(bean.getGroupName())) { + sgpBuilder.setName(bean.getGroupName()); + } + if (StringUtils.isNotEmpty(bean.getGroupPhoto())) { + sgpBuilder.setIcon(bean.getGroupPhoto()); + } + resBuilder.addProfile(sgpBuilder.build()); + } + } + commandResponse.setParams(resBuilder.build().toByteArray()); + errCode = ErrorCode2.SUCCESS; + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + + return commandResponse.setErrCode(errCode); + } +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/notice/GroupNotice.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/notice/GroupNotice.java new file mode 100755 index 0000000..4662b3e --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/notice/GroupNotice.java @@ -0,0 +1,159 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.notice; + +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.constant.RequestAction; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.business.constant.NoticeText; +import com.akaxin.site.business.dao.UserProfileDao; +import com.akaxin.site.message.api.IMessageService; +import com.akaxin.site.message.service.ImMessageService; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.google.protobuf.ByteString; + +/** + *
+ * 主要发送群主相关的消息通知 
+ * 	1.新用户加入了群聊消息提醒
+ * 	2.消息通知,以及系统通知
+ * 
+ * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-02 10:23:00 + */ +public class GroupNotice { + private static final Logger logger = LoggerFactory.getLogger(GroupNotice.class); + + private IMessageService imService = new ImMessageService(); + + /** + * 新用户加入了群聊
+ * eg:群聊天界面中,<张三 加入了群聊天> + */ + public void addGroupMemberNotice(String siteUserId, String groupId, List userIdList) { + logger.info("add group member notice siteUserId={} groupId={} userList={}", siteUserId, groupId, userIdList); + + if (StringUtils.isEmpty(groupId) || userIdList == null || userIdList.size() == 0) { + return; + } + + StringBuilder noticeText = new StringBuilder(); + try { + if (StringUtils.isNotEmpty(siteUserId)) { + // 移除群主,群创建者 + userIdList.remove(siteUserId); + // 查询群主信息 + SimpleUserBean bean = UserProfileDao.getInstance().getSimpleProfileById(siteUserId); + if (bean != null && StringUtils.isNotEmpty(bean.getUserName())) { + noticeText.append(bean.getUserName()); + noticeText.append(" 邀请了 "); + } + } + + int num = 0; + for (String userId : userIdList) { + if (StringUtils.isEmpty(siteUserId)) { + siteUserId = userId; + } + SimpleUserBean memberBean = UserProfileDao.getInstance().getSimpleProfileById(userId); + if (memberBean != null && StringUtils.isNotEmpty(memberBean.getUserName())) { + noticeText.append(memberBean.getUserName()); + if (num++ < (userIdList.size() - 1)) { + noticeText.append(","); + } + } + } + + noticeText.append(NoticeText.USER_ADD_GROUP); + this.groupMsgNotice(siteUserId, groupId, noticeText.toString()); + } catch (Exception e) { + logger.error("new group member notice error. notice=" + noticeText.toString(), e); + } + } + + // 新用户登陆站点,添加至默认群组中的消息通知 + public void addDefaultGroupMemberNotice(String groupId, String siteUserId) { + SimpleUserBean userBean = UserProfileDao.getInstance().getSimpleProfileById(siteUserId, true); + + if (userBean == null || StringUtils.isEmpty(userBean.getUserName())) { + logger.error("add defaultgroup member error, user={}", userBean); + return; + } + + StringBuilder noticeText = new StringBuilder(); + noticeText.append(userBean.getUserName()); + noticeText.append(NoticeText.USER_ADD_GROUP); + this.groupMsgNotice(siteUserId, groupId, noticeText.toString()); + } + + // 扫描二维码加群,需要发送 XXX 通过群组二维码加入群聊 + public void addGroupMemberByTokenNotice(String groupId, String siteUserId) { + SimpleUserBean userBean = UserProfileDao.getInstance().getSimpleProfileById(siteUserId, true); + + if (userBean == null || StringUtils.isEmpty(userBean.getUserName())) { + logger.error("add group member by token notice error, user={}", userBean); + return; + } + + StringBuilder noticeText = new StringBuilder(); + noticeText.append(userBean.getUserName()); + noticeText.append(NoticeText.USER_ADD_GROUP_QR_CODE); + this.groupMsgNotice(siteUserId, groupId, noticeText.toString()); + } + + /** + * 往群组中发送通知消息 + * + * @param groupId + * 发送通知的群 + * @param siteUserId + * 备用字段,兼容官方号推送通知消息,发送方ID + * + */ + private void groupMsgNotice(String siteUserId, String siteGroupId, String noticeText) { + CoreProto.GroupMsgNotice groupMsgNotice = CoreProto.GroupMsgNotice.newBuilder() + .setMsgId(buildGroupMsgId(siteUserId)).setSiteUserId(siteUserId).setSiteGroupId(siteGroupId) + .setText(ByteString.copyFromUtf8(noticeText)).setTime(System.currentTimeMillis()).build(); + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest.newBuilder() + .setType(CoreProto.MsgType.GROUP_NOTICE).setGroupMsgNotice(groupMsgNotice).build(); + Command command = new Command(); + command.setAction(RequestAction.IM_CTS_MESSAGE.getName()); + command.setSiteUserId(siteUserId); + command.setSiteGroupId(siteGroupId); + command.setParams(request.toByteArray()); + logger.debug("group msg notice command={}", command.toString()); + imService.execute(command); + } + + private String buildGroupMsgId(String siteUserid) { + StringBuilder sb = new StringBuilder("GROUP-"); + if (StringUtils.isNotEmpty(siteUserid)) { + int len = siteUserid.length(); + sb.append(siteUserid.substring(0, len >= 8 ? 8 : len)); + sb.append("-"); + } + sb.append(System.currentTimeMillis()); + return sb.toString(); + } +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/notice/User2Notice.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/notice/User2Notice.java new file mode 100755 index 0000000..d766915 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/notice/User2Notice.java @@ -0,0 +1,140 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.notice; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.constant.RequestAction; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.client.ImStcNoticeProto; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.CoreProto.MsgType; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.business.constant.NoticeText; +import com.akaxin.site.message.api.IMessageService; +import com.akaxin.site.message.service.ImMessageService; +import com.akaxin.site.storage.bean.ApplyFriendBean; +import com.google.protobuf.ByteString; + +public class User2Notice { + private static final Logger logger = LoggerFactory.getLogger(User2Notice.class); + private IMessageService imService = new ImMessageService(); + + /** + * A用户添加用户B为好友,发送B有好友添加的申请
+ * + * 客户端接收到此通知,会在通讯录的好友申请提示 + * + * @param siteUserId + * 用户B的用户ID + */ + public void applyFriendNotice(String siteUserId, String siteFriendId) { + try { + Command command = new Command(); + command.setSiteUserId(siteUserId); + command.setSiteFriendId(siteFriendId); + command.setAction(RequestAction.IM_STC_NOTICE.getName()); + ImStcNoticeProto.ImStcNoticeRequest noticeRequest = ImStcNoticeProto.ImStcNoticeRequest.newBuilder() + .setType(ImStcNoticeProto.NoticeType.APPLY_FRIEND).build(); + command.setParams(noticeRequest.toByteArray()); + // 发送im.stc.notice消息 + boolean result = imService.execute(command); + logger.debug("siteUserId={} apply friend notice friendId={} result={}", siteUserId, siteFriendId, result); + } catch (Exception e) { + logger.error("send apply friend notice error", e); + } + } + + /** + *
+	 * 代发一条U2本文消息 
+	 * AB成为好友,同时发送A/B一条消息
+	 * 
+ * + * @param siteUserId + * 接受请求方 + * @param siteFriendId + * 发送请求方,注意二者的关系 + */ + public void addFriendTextMessage(ApplyFriendBean bean) { + try { + // 给“发送请求方”下发的文本消息 + CoreProto.MsgText textMsg = CoreProto.MsgText.newBuilder().setMsgId(buildU2MsgId(bean.getSiteUserId())) + .setSiteUserId(bean.getSiteUserId()).setSiteFriendId(bean.getSiteFriendId()) + .setText(ByteString.copyFromUtf8(NoticeText.USER_ADD_FRIEND)).setTime(System.currentTimeMillis()) + .build(); + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest.newBuilder() + .setType(MsgType.TEXT).setText(textMsg).build(); + + Command command = new Command(); + command.setAction(RequestAction.IM_CTS_MESSAGE.getName()); + command.setSiteUserId(bean.getSiteUserId()); + command.setSiteFriendId(bean.getSiteFriendId()); + command.setParams(request.toByteArray()); + command.setMasterDB(true);// 检测过程使用主库 + + boolean result = imService.execute(command); + logger.debug("add friend Text message siteUserId={} siteFriendId={} result={}", bean.getSiteUserId(), + bean.getSiteFriendId(), result); + } catch (Exception e) { + logger.error(StringHelper.format("send add friend text message error. bean={}", bean), e); + } + + try { + // 给“接受请求方”下发消息,文案使用“发送请求方”方添加好友时候使用的文案eg:“我是章三,添加你为好友” + String applyText = "我添加了你为好友";// 默认文案 + long applyTime = System.currentTimeMillis(); + if (StringUtils.isNotEmpty(bean.getApplyInfo())) { + applyText = bean.getApplyInfo(); + } + if (bean.getApplyTime() > 0) { + applyTime = bean.getApplyTime(); + } + CoreProto.MsgText textMsg = CoreProto.MsgText.newBuilder().setMsgId(buildU2MsgId(bean.getSiteFriendId())) + .setSiteUserId(bean.getSiteFriendId()).setSiteFriendId(bean.getSiteUserId()) + .setText(ByteString.copyFromUtf8(applyText)).setTime(applyTime).build(); + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest.newBuilder() + .setType(MsgType.TEXT).setText(textMsg).build(); + + Command command = new Command(); + command.setAction(RequestAction.IM_CTS_MESSAGE.getName()); + command.setSiteUserId(bean.getSiteFriendId()); + command.setSiteFriendId(bean.getSiteUserId()); + command.setParams(request.toByteArray()); + command.setMasterDB(true);// 检测过程使用主库 + + boolean result = imService.execute(command); + logger.debug("add friend Text message siteUserId={} siteFriendId={} result={}", bean.getSiteFriendId(), + bean.getSiteUserId(), result); + } catch (Exception e) { + logger.error(StringHelper.format("send add friend text message error. bean={}", bean), e); + } + } + + private String buildU2MsgId(String siteUserid) { + StringBuilder sb = new StringBuilder("U2-"); + if (StringUtils.isNotEmpty(siteUserid)) { + int len = siteUserid.length(); + sb.append(siteUserid.substring(0, len >= 8 ? 8 : len)); + sb.append("-"); + } + sb.append(System.currentTimeMillis()); + return sb.toString(); + } +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/site/PlatformUserPhone.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/site/PlatformUserPhone.java new file mode 100755 index 0000000..eb5b325 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/site/PlatformUserPhone.java @@ -0,0 +1,74 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.site; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.constant.CommandConst; +import com.akaxin.proto.platform.ApiPhoneConfirmTokenProto; +import com.akaxin.site.business.bean.PlatformPhoneBean; +import com.akaxin.site.message.platform.PlatformClient; + +/** + * 当注册方式为:实名用户,此时需要向平台验证手机号码是否正确 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-14 22:30:25 + */ +public class PlatformUserPhone { + private static final Logger logger = LoggerFactory.getLogger(PlatformUserPhone.class); + + private PlatformUserPhone() { + + } + + static class SingletonHolder { + private static PlatformUserPhone instance = new PlatformUserPhone(); + } + + public static PlatformUserPhone getInstance() { + return SingletonHolder.instance; + } + + public PlatformPhoneBean getPhoneIdFromPlatform(String phoneToken) { + try { + String siteAddress = SiteConfig.getSiteAddress(); + PlatformPhoneBean bean = null; + ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest request = ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest + .newBuilder().setPhoneToken(phoneToken).setSiteAddress(siteAddress).build(); + logger.debug("realname get phone from platform : phoneToken={} {}", phoneToken, request.getPhoneToken()); + + byte[] responseBytes = PlatformClient.syncWrite(CommandConst.API_PHONE_CONFIRETOKEN, request.toByteArray()); + + if (responseBytes != null) { + bean = new PlatformPhoneBean(); + ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse resposne = ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse + .parseFrom(responseBytes); + bean.setPhoneId(resposne.getPhoneId()); + bean.setCountryCode(resposne.getCountryCode()); + bean.setUserIdPubk(resposne.getUserIdPubk()); + logger.debug("get user phoneBean={} from platform", bean); + return bean; + } + } catch (Exception e) { + logger.error("get phoneid from platform error.", e); + } + + return null; + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/site/SiteConfig.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/site/SiteConfig.java new file mode 100755 index 0000000..e99c5f1 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/site/SiteConfig.java @@ -0,0 +1,331 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.site; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.math.NumberUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.proto.core.ConfigProto; +import com.akaxin.site.business.constant.GroupConfig; +import com.akaxin.site.business.dao.SiteConfigDao; +import com.akaxin.site.message.utils.SiteConfigHelper; + +/** + * 管理站点配置相关信息 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-14 21:18:49 + */ +public class SiteConfig { + private static final Logger logger = LoggerFactory.getLogger(SiteConfig.class); + + private static volatile Map configMap; + + private static volatile Set siteManagerSet; + private static volatile Set userDefaultFriendSet; + private static volatile Set userDefaultGroupSet; + + private SiteConfig() { + } + + public static Map getConfigMap() { + if (configMap == null) { + configMap = updateConfig(); + } + return configMap; + } + + public static Map updateConfig() { + try { + configMap = SiteConfigDao.getInstance().getSiteConfig(); + if (configMap != null) { + updateCacheSiteManagerSet(); + updateCacheUserDefaultFriendSet(); + updateCacheUserDefaultGroupSet(); + } + SiteConfigHelper.updateConfig(); + } catch (Exception e) { + logger.error("update site config error.", e); + } + return configMap; + } + + private static void updateCacheSiteManagerSet() { + String siteManageUsers = getConfigMap().get(ConfigProto.ConfigKey.SITE_MANAGER_VALUE); + if (StringUtils.isNotEmpty(siteManageUsers)) { + String[] adminUsers = siteManageUsers.split(","); + List managerList = Arrays.asList(adminUsers); + siteManagerSet = new HashSet(managerList); + logger.info("update new site managers={}", siteManagerSet); + } + } + + private static void updateCacheUserDefaultFriendSet() { + String userFriends = getConfigMap().get(ConfigProto.ConfigKey.DEFAULT_USER_FRIENDS_VALUE); + if (StringUtils.isNotEmpty(userFriends)) { + String[] friends = userFriends.split(","); + List friendList = Arrays.asList(friends); + userDefaultFriendSet = new HashSet(friendList); + logger.info("update user default friends={}", userDefaultFriendSet); + } + } + + private static void updateCacheUserDefaultGroupSet() { + String userGroups = getConfigMap().get(ConfigProto.ConfigKey.DEFAULT_USER_GROUPS_VALUE); + if (StringUtils.isNotEmpty(userGroups)) { + String[] groups = userGroups.split(","); + List groupList = Arrays.asList(groups); + userDefaultGroupSet = new HashSet(groupList); + logger.info("update user default groups={}", userDefaultGroupSet); + } + } + + public static String getConfig(int key) { + try { + return getConfigMap().get(key); + } catch (Exception e) { + logger.error("get config value error", e); + } + return null; + } + + /** + *
+	 * 站点是否关闭,关闭的站点,用户不能注册以及登陆功能
+	 * 		1.siteStatus=0,站点关闭
+	 * 		2.siteStatus=1,站点开启
+	 * 
+ * + * @return true/false + */ + public static boolean isOpen() { + if (getConfigMap() != null) { + String value = getConfigMap().get(ConfigProto.ConfigKey.SITE_STATUS_VALUE); + + if (StringUtils.isNumeric(value)) { + return ConfigProto.SiteStatusConfig.OPEN_VALUE == Integer.valueOf(value); + } + } + return false; + } + + /** + * 判断站点是否关闭状态 + * + * @return + */ + public static boolean isClose() { + return !isOpen(); + } + + // 获取是否需要实名配置 + public static ConfigProto.RealNameConfig getRealNameConfig() { + ConfigProto.RealNameConfig realNameConfig = null; + if (getConfigMap() != null) { + String value = getConfigMap().get(ConfigProto.ConfigKey.REALNAME_STATUS_VALUE); + if (StringUtils.isNumeric(value)) { + realNameConfig = ConfigProto.RealNameConfig.forNumber(Integer.valueOf(value)); + } + } + return realNameConfig == null ? ConfigProto.RealNameConfig.REALNAME_NO : realNameConfig; + } + + // 获取邀请码配置 + public static ConfigProto.InviteCodeConfig getUICConfig() { + ConfigProto.InviteCodeConfig uicConfig = null; + if (getConfigMap() != null) { + String value = getConfigMap().get(ConfigProto.ConfigKey.INVITE_CODE_STATUS_VALUE); + if (StringUtils.isNumeric(value)) { + uicConfig = ConfigProto.InviteCodeConfig.forNumber(Integer.valueOf(value)); + } + } + return uicConfig == null ? ConfigProto.InviteCodeConfig.UIC_NO : uicConfig; + } + + public static String getSiteAddress() { + if (getConfigMap() != null) { + String siteHost = getConfigMap().get(ConfigProto.ConfigKey.SITE_ADDRESS_VALUE); + String sitePort = getConfigMap().get(ConfigProto.ConfigKey.SITE_PORT_VALUE); + return siteHost + ":" + sitePort; + } + return null; + } + + /** + * 获取超级管理员 + * + * @return + */ + public static String getSiteSuperAdmin() { + if (getConfigMap() != null) { + String siteAdmin = getConfigMap().get(ConfigProto.ConfigKey.SITE_ADMIN_VALUE); + return siteAdmin; + } + return null; + } + + /** + * 判断是否为超级管理员 + * + * @param siteUserId + * @return + */ + public static boolean isSiteSuperAdmin(String siteUserId) { + if (StringUtils.isNotEmpty(siteUserId)) { + return siteUserId.equals(getSiteSuperAdmin()); + } + return false; + } + + /** + * 判断是否为普通管理员 + * + * @param siteUserId + * @return + */ + public static boolean isSiteManager(String siteUserId) { + if (isSiteSuperAdmin(siteUserId)) { + return true; + } + if (siteManagerSet != null && StringUtils.isNotEmpty(siteUserId)) { + return siteManagerSet.contains(siteUserId); + } + return false; + } + + /** + * 判断是否存在超级管理员 + * + * @return + */ + public static boolean hasNoAdminUser() { + return !hasAdminUser(); + } + + public static boolean hasAdminUser() { + if (StringUtils.isNotEmpty(getSiteSuperAdmin())) { + return true; + } + return false; + } + + public static int getMaxGroupMemberSize() { + try { + Map map = getConfigMap(); + if (map != null) { + String memberCount = map.get(ConfigProto.ConfigKey.GROUP_MEMBERS_COUNT_VALUE); + if (StringUtils.isNumeric(memberCount)) { + return Integer.valueOf(memberCount); + } + } + } catch (Exception e) { + logger.error("get max group member size error.", e); + } + return GroupConfig.GROUP_MAX_MEMBER_COUNT; + } + + public static ConfigProto.U2EncryptionConfig getU2EncryStatusConfig() { + try { + Map map = getConfigMap(); + if (map != null) { + String statusNum = map.get(ConfigProto.ConfigKey.U2_ENCRYPTION_STATUS_VALUE); + if (StringUtils.isNumeric(statusNum)) { + return ConfigProto.U2EncryptionConfig.forNumber(Integer.valueOf(statusNum)); + } + } + } catch (Exception e) { + logger.error("get u2 encry status error", e); + } + return ConfigProto.U2EncryptionConfig.U2_CLOSE; + } + + public static boolean allowAddFriends(String siteUserId) { + if (isSiteManager(siteUserId)) { + return true; + } + Map map = getConfigMap(); + if (map != null) { + String value = map.get(ConfigProto.ConfigKey.CONFIG_FRIEND_REQUEST_VALUE); + return !String.valueOf(ConfigProto.ConfigFriendRequest.ConfigFriendRequest_NO_VALUE).equals(value); + } + return true; + } + + public static boolean allowCreateGroups(String siteUserId) { + if (isSiteManager(siteUserId)) { + return true; + } + + Map map = getConfigMap(); + if (map != null) { + String value = map.get(ConfigProto.ConfigKey.CONFIG_CREATE_GROUP_VALUE); + return !String.valueOf(ConfigProto.ConfigCreateGroup.ConfigCreateGroup_NO_VALUE).equals(value); + } + return true; + } + + /** + *
+	 * 1天
+	 * 7天
+	 * 14天
+	 * 
+ * + * @return + */ + public static int getGroupQRExpireDay() { + int expireDay = 14; + Map map = getConfigMap(); + if (map != null) { + String value = map.get(ConfigProto.ConfigKey.GROUP_QR_EXPIRE_TIME_VALUE); + if (NumberUtils.isDigits(value)) { + int day = Integer.valueOf(value); + if (day == 1 || day == 7 || day == 14) { + return day; + } + } + } + return expireDay; + } + + public static String getSiteLogo() { + try { + Map map = getConfigMap(); + if (map != null) { + return map.get(ConfigProto.ConfigKey.SITE_LOGO_VALUE); + } + } catch (Exception e) { + logger.error("get site logo error", e); + } + return null; + } + + public static Set getUserDefaultFriends() { + return userDefaultFriendSet; + } + + public static Set getUserDefaultGroups() { + return userDefaultGroupSet; + } +} \ No newline at end of file diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/site/UserUic.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/site/UserUic.java new file mode 100755 index 0000000..1a9527a --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/site/UserUic.java @@ -0,0 +1,77 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.site; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.proto.core.UicProto; +import com.akaxin.site.business.dao.SiteUicDao; +import com.akaxin.site.storage.bean.UicBean; + +/** + * 用户邀请码管理实现 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-14 22:09:36 + */ +public class UserUic { + private static Logger logger = LoggerFactory.getLogger(UserUic.class); + + private UserUic() { + } + + static class SingletonHolder { + private static UserUic instance = new UserUic(); + } + + public static UserUic getInstance() { + return SingletonHolder.instance; + } + + public boolean updateUicUsed(String uic, String siteUserId) { + UicBean bean = new UicBean(); + bean.setUic(uic); + bean.setSiteUserId(siteUserId); + bean.setStatus(UicProto.UicStatus.USED_VALUE); + bean.setUseTime(System.currentTimeMillis()); + return SiteUicDao.getInstance().updateUic(bean); + } + + /** + *
+	 * 判断uic是否可用判断条件:
+	 * 		1.查询的uic不为空
+	 * 		2.uic未被用户使用
+	 * 		3.uic的状态为UNUSED状态
+	 * 
+	 * 
+ * + * @param uic + * 用户邀请码 + * @return + */ + public boolean checkUic(String uic, String siteUserId) { + UicBean bean = SiteUicDao.getInstance().getUicInfo(uic); + if (bean != null && StringUtils.isNotBlank(bean.getUic()) && StringUtils.isEmpty(bean.getSiteUserId())) { + if (UicProto.UicStatus.UNUSED_VALUE == bean.getStatus()) { + return updateUicUsed(uic, siteUserId); + } + } + return false; + } +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiDeviceService.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiDeviceService.java new file mode 100755 index 0000000..2b07777 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiDeviceService.java @@ -0,0 +1,150 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.tai; + +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.DeviceProto; +import com.akaxin.proto.site.ApiDeviceBoundListProto; +import com.akaxin.proto.site.ApiDeviceListProto; +import com.akaxin.proto.site.ApiDeviceProfileProto; +import com.akaxin.site.business.dao.UserDeviceDao; +import com.akaxin.site.business.impl.AbstractRequest; +import com.akaxin.site.storage.bean.UserDeviceBean; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.10.20 + * + */ +public class ApiDeviceService extends AbstractRequest { + private static final Logger logger = LoggerFactory.getLogger(ApiDeviceService.class); + + public CommandResponse profile(Command command) { + CommandResponse commandResponse = new CommandResponse(); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + ApiDeviceProfileProto.ApiDeviceProfileRequest request = ApiDeviceProfileProto.ApiDeviceProfileRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String deviceId = request.getDeviceId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNotBlank(siteUserId) && StringUtils.isNotBlank(deviceId)) { + UserDeviceBean deviceBean = UserDeviceDao.getInstance().getDeviceDetails(siteUserId, deviceId); + DeviceProto.SimpleDeviceProfile deviceProfile = DeviceProto.SimpleDeviceProfile.newBuilder() + .setDeviceId(String.valueOf(deviceBean.getDeviceId())) + .setDeviceName(String.valueOf(deviceBean.getDeviceName())) + .setLastLoginTime(deviceBean.getLoginTime()).build(); + ApiDeviceProfileProto.ApiDeviceProfileResponse response = ApiDeviceProfileProto.ApiDeviceProfileResponse + .newBuilder().setDeviceProfile(deviceProfile) + .setLoginIp(String.valueOf(deviceBean.getDeviceIp())) + .setLastActiveTime(deviceBean.getActiveTime()).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + public CommandResponse list(Command command) { + CommandResponse commandResponse = new CommandResponse(); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + ApiDeviceListProto.DeviceListInfoRequest request = ApiDeviceListProto.DeviceListInfoRequest + .parseFrom(command.getParams()); + String siteFriendId = request.getSiteUserId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNotBlank(siteFriendId)) { + ApiDeviceListProto.DeviceListInfoResponse.Builder responseBuilder = ApiDeviceListProto.DeviceListInfoResponse + .newBuilder(); + List deviceList = UserDeviceDao.getInstance().getActiveDeviceList(siteFriendId); + for (UserDeviceBean device : deviceList) { + DeviceProto.SimpleDeviceProfile deviceProfile = DeviceProto.SimpleDeviceProfile.newBuilder() + .setDeviceId(String.valueOf(device.getDeviceId())) + .setDeviceName(String.valueOf(device.getDeviceName())) + .setUserDevicePubk(String.valueOf(device.getUserDevicePubk())) + // 这里使用活跃时间,上次活跃时间 + .setLastLoginTime(device.getActiveTime()).build(); + responseBuilder.addList(deviceProfile); + } + commandResponse.setParams(responseBuilder.build().toByteArray()); + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + /** + * 获取用户在该站点所有关联设备号 + * + * @param command + * @return + */ + public CommandResponse boundList(Command command) { + CommandResponse commandResponse = new CommandResponse(); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + ApiDeviceBoundListProto.ApiDeviceBoundListRequest request = ApiDeviceBoundListProto.ApiDeviceBoundListRequest + .parseFrom(command.getParams()); + String currentUserId = command.getSiteUserId(); + String siteUserId = request.getSiteUserId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNotBlank(currentUserId) && currentUserId.equals(siteUserId)) { + ApiDeviceBoundListProto.ApiDeviceBoundListResponse.Builder responseBuilder = ApiDeviceBoundListProto.ApiDeviceBoundListResponse + .newBuilder(); + List deviceList = UserDeviceDao.getInstance().getBoundDevices(siteUserId); + for (UserDeviceBean device : deviceList) { + DeviceProto.SimpleDeviceProfile deviceProfile = DeviceProto.SimpleDeviceProfile.newBuilder() + .setDeviceId(String.valueOf(device.getDeviceId())) + .setDeviceName(String.valueOf(device.getDeviceName())) + .setLastLoginTime(device.getActiveTime()).build(); + responseBuilder.addList(deviceProfile); + } + commandResponse.setParams(responseBuilder.build().toByteArray()); + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiFileService.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiFileService.java new file mode 100755 index 0000000..19e8219 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiFileService.java @@ -0,0 +1,108 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.tai; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.FileProto; +import com.akaxin.proto.site.ApiFileDownloadProto; +import com.akaxin.proto.site.ApiFileUploadProto; +import com.akaxin.site.business.impl.AbstractRequest; +import com.akaxin.site.business.utils.FilePathUtils; +import com.akaxin.site.business.utils.FileServerUtils; +import com.google.protobuf.ByteString; + +/** + * 文件(图片,语音)上传下载 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-25 17:52:08 + */ +public class ApiFileService extends AbstractRequest { + private static Logger logger = LoggerFactory.getLogger(ApiFileService.class); + + public CommandResponse upload(Command command) { + CommandResponse commandResponse = new CommandResponse(); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + ApiFileUploadProto.ApiFileUploadRequest request = ApiFileUploadProto.ApiFileUploadRequest + .parseFrom(command.getParams()); + FileProto.File file = request.getFile(); + FileProto.FileDesc fileDesc = request.getFileDesc(); + FileProto.FileType fileType = file.getFileType(); + byte[] content = file.getFileContent().toByteArray(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + String fileId = FileServerUtils.saveFile(content, FilePathUtils.getPicPath(), fileType, fileDesc); + ApiFileUploadProto.ApiFileUploadResponse response = ApiFileUploadProto.ApiFileUploadResponse.newBuilder() + .setFileId(fileId).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + public CommandResponse download(Command command) { + CommandResponse commandResponse = new CommandResponse(); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + ApiFileDownloadProto.ApiFileDownloadRequest request = ApiFileDownloadProto.ApiFileDownloadRequest + .parseFrom(command.getParams()); + // String fileId = request.getFileId(); + String reqFileId = request.getFileId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNotBlank(reqFileId) && !"null".equals(reqFileId)) { + String fileId = reqFileId; + if (fileId.startsWith("AKX-") || fileId.startsWith("akx-")) { + fileId = fileId.substring(4, fileId.length()); + } + + byte[] imageBytes = FileServerUtils.fileToBinary(FilePathUtils.getPicPath(), fileId); + + if (imageBytes != null && imageBytes.length > 0) { + FileProto.File file = FileProto.File.newBuilder().setFileId(reqFileId) + .setFileContent(ByteString.copyFrom(imageBytes)).build(); + + ApiFileDownloadProto.ApiFileDownloadResponse response = ApiFileDownloadProto.ApiFileDownloadResponse + .newBuilder().setFile(file).build(); + + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } else { + // 获取文件资源失败,文件可能不存在,此时需要抛出异常 + errCode = ErrorCode2.ERROR2_FILE_DOWNLOAD; + } + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiFriendService.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiFriendService.java new file mode 100755 index 0000000..7fe88e4 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiFriendService.java @@ -0,0 +1,580 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.tai; + +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.constant.IErrorCode; +import com.akaxin.common.exceptions.ZalyException2; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.core.UserProto; +import com.akaxin.proto.site.ApiFriendApplyCountProto; +import com.akaxin.proto.site.ApiFriendApplyListProto; +import com.akaxin.proto.site.ApiFriendApplyProto; +import com.akaxin.proto.site.ApiFriendApplyResultProto; +import com.akaxin.proto.site.ApiFriendDeleteProto; +import com.akaxin.proto.site.ApiFriendListProto; +import com.akaxin.proto.site.ApiFriendMuteProto; +import com.akaxin.proto.site.ApiFriendProfileProto; +import com.akaxin.proto.site.ApiFriendRemarkProto; +import com.akaxin.proto.site.ApiFriendSettingProto; +import com.akaxin.proto.site.ApiFriendUpdateMuteProto; +import com.akaxin.proto.site.ApiFriendUpdateSettingProto; +import com.akaxin.site.business.dao.UserFriendDao; +import com.akaxin.site.business.dao.UserProfileDao; +import com.akaxin.site.business.impl.AbstractRequest; +import com.akaxin.site.business.impl.notice.User2Notice; +import com.akaxin.site.business.impl.site.SiteConfig; +import com.akaxin.site.business.push.PushNotification; +import com.akaxin.site.storage.bean.ApplyFriendBean; +import com.akaxin.site.storage.bean.ApplyUserBean; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.UserFriendBean; + +/** + *
+ * 	用户好友相关功能处理
+ * 		1.好友profile资料
+ * 		2.好友列表
+ * 		3.申请好友
+ * 		4.好友申请列表
+ * 		5.好友申请总数
+ * 		6.好友申请结果	(是否同意)
+ * 		7.删除好友
+ * 		8.好友静音状态	
+ * 		9.更新好友静音
+ * 
+ * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.11.24 18:36:59 + */ +public class ApiFriendService extends AbstractRequest { + private static final Logger logger = LoggerFactory.getLogger(ApiFriendService.class); + + /** + * 查询好友的资料信息,点击好友头像查看使用 + * + * @param command + * @return + */ + public CommandResponse profile(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + ApiFriendProfileProto.ApiFriendProfileRequest request = ApiFriendProfileProto.ApiFriendProfileRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String globalOrSiteFriendId = request.getSiteUserId();// 等待查询的站点用户ID || globalUserId + String userIdPubk = request.getUserIdPubk(); // 等待查询的用户公钥,优先级高 + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isAllEmpty(userIdPubk, globalOrSiteFriendId)) { + errCode = ErrorCode2.ERROR_PARAMETER; + return commandResponse.setErrCode2(errCode); + } + + // 1.如果是siteUserId + UserFriendBean userBean = UserProfileDao.getInstance().getFriendProfileById(siteUserId, + globalOrSiteFriendId); + // 2.如果不是则认为是globalUserId + if (null == userBean || StringUtils.isNotEmpty(userBean.getSiteUserId())) { + String siteFriendId = UserProfileDao.getInstance().getSiteUserIdByGlobalUserId(globalOrSiteFriendId); + if (StringUtils.isNotEmpty(siteFriendId)) { + userBean = UserProfileDao.getInstance().getFriendProfileById(siteUserId, siteFriendId); + } + } + + if (userBean != null && StringUtils.isNotBlank(userBean.getSiteUserId())) { + UserProto.UserProfile.Builder friendProfileBuilder = UserProto.UserProfile.newBuilder(); + friendProfileBuilder.setSiteUserId(userBean.getSiteUserId()); + friendProfileBuilder.setUserIdPubk(userBean.getUserIdPubk()); + if (StringUtils.isNotEmpty(userBean.getAliasName())) { + friendProfileBuilder.setUserName(userBean.getAliasName()); + if (StringUtils.isNotEmpty(userBean.getUserName())) { + friendProfileBuilder.setNickName(userBean.getUserName()); + } + } else { + if (StringUtils.isNotEmpty(userBean.getUserName())) { + friendProfileBuilder.setUserName(userBean.getUserName()); + friendProfileBuilder.setNickName(userBean.getUserName()); + } + } + + if (StringUtils.isNotEmpty(userBean.getSiteLoginId())) { + friendProfileBuilder.setSiteLoginId(userBean.getSiteLoginId()); + } + if (StringUtils.isNotEmpty(userBean.getUserPhoto())) { + friendProfileBuilder.setUserPhoto(userBean.getUserPhoto()); + } + friendProfileBuilder.setUserStatusValue(userBean.getUserStatus()); + UserProto.UserProfile friendProfile = friendProfileBuilder.build(); + + // 查关系 + UserProto.UserRelation userRelation = UserFriendDao.getInstance().getUserRelation(siteUserId, + userBean.getSiteUserId()); + ApiFriendProfileProto.ApiFriendProfileResponse response = ApiFriendProfileProto.ApiFriendProfileResponse + .newBuilder().setProfile(friendProfile).setRelation(userRelation) + .setUserIdPubk(userBean.getUserIdPubk()).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + /** + * 获取个人的好友列表,通讯录中使用 + * + * @param command + * @return + */ + public CommandResponse list(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + ApiFriendListProto.ApiFriendListRequest request = ApiFriendListProto.ApiFriendListRequest + .parseFrom(command.getParams()); + String currentUserId = command.getSiteUserId(); + String siteUserId = request.getSiteUserId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNotBlank(siteUserId) && siteUserId.equals(currentUserId)) { + List friendBeanList = UserFriendDao.getInstance().getUserFriends(siteUserId); + + ApiFriendListProto.ApiFriendListResponse.Builder responseBuilder = ApiFriendListProto.ApiFriendListResponse + .newBuilder(); + for (SimpleUserBean friendBean : friendBeanList) { + UserProto.SimpleUserProfile.Builder friendBuilder = UserProto.SimpleUserProfile.newBuilder(); + friendBuilder.setSiteUserId(friendBean.getUserId()); + if (StringUtils.isNotEmpty(friendBean.getAliasName())) { + friendBuilder.setUserName(friendBean.getAliasName()); + if (StringUtils.isNotEmpty(friendBean.getAliasNameInLatin())) { + friendBuilder.setUsernameInLatin(friendBean.getAliasNameInLatin()); + } + } else { + if (StringUtils.isNotEmpty(friendBean.getUserName())) { + friendBuilder.setUserName(friendBean.getUserName()); + } + if (StringUtils.isNotEmpty(friendBean.getUserNameInLatin())) { + friendBuilder.setUsernameInLatin(friendBean.getUserNameInLatin()); + } + } + if (StringUtils.isNotEmpty(friendBean.getUserPhoto())) { + friendBuilder.setUserPhoto(friendBean.getUserPhoto()); + } + responseBuilder.addList(friendBuilder.build()); + } + commandResponse.setParams(responseBuilder.build().toByteArray()); + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + /** + * 用户好友添加申请 + * + * @param command + * @return + */ + public CommandResponse apply(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiFriendApplyProto.ApiFriendApplyRequest request = ApiFriendApplyProto.ApiFriendApplyRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String siteFriendId = request.getSiteFriendId(); + String applyReason = request.getApplyReason(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isAnyEmpty(siteUserId, siteFriendId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + if (!SiteConfig.allowAddFriends(siteUserId)) { + throw new ZalyException2(ErrorCode2.ERROR2_FRIEND_NOTALLOW); + } + + if (siteUserId.equals(siteFriendId)) { + throw new ZalyException2(ErrorCode2.ERROR2_FRIEND_APPLYSELF); + } + + if (UserFriendDao.getInstance().isFriend(siteUserId, siteFriendId)) { + throw new ZalyException2(ErrorCode2.ERROR2_FRIEND_IS); + } + + int applyTimes = UserFriendDao.getInstance().getApplyCount(siteFriendId, siteUserId); + if (applyTimes >= 5) { + errCode = ErrorCode2.ERROR2_FRIEND_APPLYCOUNT; + } else { + if (UserFriendDao.getInstance().saveFriendApply(siteUserId, siteFriendId, applyReason)) { + errCode = ErrorCode2.SUCCESS; + } + } + + if (ErrorCode2.SUCCESS.equals(errCode)) { + new User2Notice().applyFriendNotice(siteUserId, siteFriendId); + // 同时下发一条PUSH消息 + if (applyTimes < 2) { + PushNotification.sendAddFriend(siteUserId, siteFriendId); + } + } + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + * 获取用户的好友申请列表 + * + * @param command + * @return + */ + public CommandResponse applyList(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + String siteUserId = command.getSiteUserId(); + LogUtils.requestDebugLog(logger, command, ""); + + if (StringUtils.isNotBlank(siteUserId)) { + List applyUserList = UserFriendDao.getInstance().getApplyUserList(siteUserId); + ApiFriendApplyListProto.ApiFriendApplyListResponse.Builder responseBuilder = ApiFriendApplyListProto.ApiFriendApplyListResponse + .newBuilder(); + for (ApplyUserBean applyUser : applyUserList) { + if (StringUtils.isNotEmpty(applyUser.getUserId())) { + UserProto.UserProfile.Builder userProfileBuilder = UserProto.UserProfile.newBuilder(); + userProfileBuilder.setSiteUserId(applyUser.getUserId()); + userProfileBuilder.setUserName(String.valueOf(applyUser.getUserName())); + userProfileBuilder.setUserPhoto(String.valueOf(applyUser.getUserPhoto())); + UserProto.ApplyUserProfile applyUserProfile = UserProto.ApplyUserProfile.newBuilder() + .setApplyUser(userProfileBuilder.build()) + .setApplyReason(String.valueOf(applyUser.getApplyReason())).build(); + responseBuilder.addList(applyUserProfile); + } + } + commandResponse.setParams(responseBuilder.build().toByteArray()); + errCode = ErrorCode2.SUCCESS; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + /** + * 获取申请用户为好友的申请人数 + * + * @param command + * @return + */ + public CommandResponse applyCount(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + String siteUserId = command.getSiteUserId(); + LogUtils.requestDebugLog(logger, command, ""); + + if (StringUtils.isNotBlank(siteUserId)) { + int applyCount = UserFriendDao.getInstance().getApplyCount(siteUserId); + ApiFriendApplyCountProto.ApiFriendApplyCountResponse response = ApiFriendApplyCountProto.ApiFriendApplyCountResponse + .newBuilder().setApplyCount(applyCount).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + /** + * 是否同意用户的好友申请处理 + * + * @param command + * @return + */ + public CommandResponse applyResult(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + ApiFriendApplyResultProto.ApiFriendApplyResultRequest request = ApiFriendApplyResultProto.ApiFriendApplyResultRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String siteFriendId = request.getSiteFriendId(); + boolean result = request.getApplyResult(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNotBlank(siteUserId) && StringUtils.isNotBlank(siteFriendId) + && !siteUserId.equals(siteFriendId)) { + if (UserFriendDao.getInstance().agreeApply(siteUserId, siteFriendId, result)) { + errCode = ErrorCode2.SUCCESS; + } + + if (ErrorCode2.SUCCESS.equals(errCode) && result) { + ApplyFriendBean applyBean = UserFriendDao.getInstance().agreeApplyWithClear(siteUserId, + siteFriendId, false); + // xxx 同意了你的好友申请 ,发送push + PushNotification.agreeAddFriend(siteUserId, siteFriendId); + + // 发送文本消息 + if (applyBean != null && StringUtils.isNotEmpty(applyBean.getSiteUserId())) { + new User2Notice().addFriendTextMessage(applyBean); + } + logger.debug("client={} siteUserId={} add friend notice to siteUserId={}", command.getClientIp(), + siteFriendId); + } + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + /** + * 删除好友 + * + * @param command + * @return + */ + public CommandResponse delete(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + ApiFriendDeleteProto.ApiFriendDeleteRequest request = ApiFriendDeleteProto.ApiFriendDeleteRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String siteFriendId = request.getSiteFriendId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNotBlank(siteUserId) && StringUtils.isNotBlank(siteFriendId) + && !siteUserId.equals(siteFriendId)) { + if (UserFriendDao.getInstance().deleteFriend(siteUserId, siteFriendId)) { + errCode = ErrorCode2.SUCCESS; + } + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + /** + * 获取好友的设置信息 + * + * @param command + * @return + */ + public CommandResponse setting(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + ApiFriendSettingProto.ApiFriendSettingRequest request = ApiFriendSettingProto.ApiFriendSettingRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String siteFriendId = request.getSiteFriendId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNoneEmpty(siteUserId, siteFriendId)) { + UserFriendBean bean = UserFriendDao.getInstance().getFriendSetting(siteUserId, siteFriendId); + if (bean != null) { + ApiFriendSettingProto.ApiFriendSettingResponse response = ApiFriendSettingProto.ApiFriendSettingResponse + .newBuilder().setMessageMute(bean.isMute()).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR_DATABASE_EXECUTE;// 数据库执行错误 + } + + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + /** + * 对用户设置消息免打扰功能 + * + * @param command + * @return + */ + public CommandResponse updateSetting(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest request = ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String siteFriendId = request.getSiteFriendId(); + boolean messageMute = request.getMessageMute(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNoneBlank(siteUserId, siteFriendId)) { + UserFriendBean friendBean = new UserFriendBean(); + friendBean.setSiteUserId(siteFriendId); + friendBean.setMute(messageMute); + if (UserFriendDao.getInstance().updateFriendSetting(siteUserId, friendBean)) { + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR_DATABASE_EXECUTE; + } + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + /** + * 获取用户对好友的静音(消息免打扰)状态 + * + * @param command + * @return + */ + public CommandResponse mute(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + ApiFriendMuteProto.ApiFriendMuteRequest request = ApiFriendMuteProto.ApiFriendMuteRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String siteFriendId = request.getSiteFriendId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNoneEmpty(siteUserId, siteFriendId)) { + boolean mute = UserFriendDao.getInstance().getFriendMute(siteUserId, siteFriendId); + ApiFriendSettingProto.ApiFriendSettingResponse response = ApiFriendSettingProto.ApiFriendSettingResponse + .newBuilder().setMessageMute(mute).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + /** + * 对好友设置静音(消息免打扰)状态 + * + * @param command + * @return + */ + public CommandResponse updateMute(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest request = ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String siteFriendId = request.getSiteFriendId(); + boolean messageMute = request.getMute(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNoneBlank(siteUserId, siteFriendId)) { + if (UserFriendDao.getInstance().updateFriendMute(siteUserId, siteFriendId, messageMute)) { + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR_DATABASE_EXECUTE; + } + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + public CommandResponse remark(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiFriendRemarkProto.ApiFriendRemarkRequest request = ApiFriendRemarkProto.ApiFriendRemarkRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String siteFriendId = request.getSiteFriendId(); + String aliasName = request.getAliasName(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isAnyEmpty(siteUserId, siteFriendId, aliasName)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + String aliasInLatin = StringHelper.toLatinPinYin(aliasName); + if (UserFriendDao.getInstance().remarkFriend(siteUserId, siteFriendId, aliasName, aliasInLatin)) { + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR_DATABASE_EXECUTE; + } + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + +} \ No newline at end of file diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiGroupService.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiGroupService.java new file mode 100755 index 0000000..ffcfa73 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiGroupService.java @@ -0,0 +1,952 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.tai; + +import java.util.List; +import java.util.UUID; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.constant.IErrorCode; +import com.akaxin.common.exceptions.ZalyException; +import com.akaxin.common.exceptions.ZalyException2; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.GroupProto; +import com.akaxin.proto.core.TokenProto; +import com.akaxin.proto.core.UserProto; +import com.akaxin.proto.site.ApiGroupAddMemberProto; +import com.akaxin.proto.site.ApiGroupApplyTokenProto; +import com.akaxin.proto.site.ApiGroupCreateProto; +import com.akaxin.proto.site.ApiGroupDeleteProto; +import com.akaxin.proto.site.ApiGroupJoinByTokenProto; +import com.akaxin.proto.site.ApiGroupListProto; +import com.akaxin.proto.site.ApiGroupMembersProto; +import com.akaxin.proto.site.ApiGroupMuteProto; +import com.akaxin.proto.site.ApiGroupNonMembersProto; +import com.akaxin.proto.site.ApiGroupProfileProto; +import com.akaxin.proto.site.ApiGroupQuitProto; +import com.akaxin.proto.site.ApiGroupRemoveMemberProto; +import com.akaxin.proto.site.ApiGroupSettingProto; +import com.akaxin.proto.site.ApiGroupUpdateProfileProto; +import com.akaxin.proto.site.ApiGroupUpdateSettingProto; +import com.akaxin.site.business.constant.GroupConfig; +import com.akaxin.site.business.dao.ExpireTokenDao; +import com.akaxin.site.business.dao.UserGroupDao; +import com.akaxin.site.business.dao.UserProfileDao; +import com.akaxin.site.business.impl.AbstractRequest; +import com.akaxin.site.business.impl.site.SiteConfig; +import com.akaxin.site.storage.bean.ExpireToken; +import com.akaxin.site.storage.bean.GroupMemberBean; +import com.akaxin.site.storage.bean.GroupProfileBean; +import com.akaxin.site.storage.bean.SimpleGroupBean; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.UserGroupBean; +import com.google.common.collect.Lists; +import com.google.protobuf.ProtocolStringList; + +/** + * 扩展服务器与站点之间通过hai接口,管理群组功能 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-13 21:48:35 + */ +public class ApiGroupService extends AbstractRequest { + private static final Logger logger = LoggerFactory.getLogger(ApiGroupService.class); + + /** + * 获取用户群列表
+ * 无权限限制 + * + * @param command + * @return + */ + public CommandResponse list(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiGroupListProto.ApiGroupListRequest request = ApiGroupListProto.ApiGroupListRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNotBlank(siteUserId) && siteUserId.equals(siteUserId)) { + List groupBeanList = UserGroupDao.getInstance().getUserGroupList(siteUserId); + ApiGroupListProto.ApiGroupListResponse.Builder responseBuilder = ApiGroupListProto.ApiGroupListResponse + .newBuilder(); + for (SimpleGroupBean groupBean : groupBeanList) { + GroupProto.SimpleGroupProfile.Builder groupProfileBuilder = GroupProto.SimpleGroupProfile + .newBuilder(); + groupProfileBuilder.setGroupId(groupBean.getGroupId()); + if (StringUtils.isNotEmpty(groupBean.getGroupName())) { + groupProfileBuilder.setGroupName(groupBean.getGroupName()); + } + if (StringUtils.isNotEmpty(groupBean.getGroupPhoto())) { + groupProfileBuilder.setGroupIcon(groupBean.getGroupPhoto()); + } + responseBuilder.addList(groupProfileBuilder.build()); + } + ApiGroupListProto.ApiGroupListResponse response = responseBuilder.build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + * 用户创建群,并添加初始群成员
+ * 无权限限制 + * + * @param command + * @return + */ + public CommandResponse create(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiGroupCreateProto.ApiGroupCreateRequest request = ApiGroupCreateProto.ApiGroupCreateRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId();// group owner + String groupName = request.getGroupName(); + ProtocolStringList groupMembers = request.getSiteUserIdsList(); + List groupMemberIds = Lists.newArrayList(groupMembers);// copy a new list + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isAnyEmpty(siteUserId, groupName) || groupMemberIds == null) { + throw new ZalyException(ErrorCode2.ERROR_PARAMETER); + } + + if (!SiteConfig.allowCreateGroups(siteUserId)) { + throw new ZalyException(ErrorCode2.ERROR2_GROUP_NOTALLOW); + } + // 检查用户是否被封禁,或者不存在 + for (String groupMemberId : groupMemberIds) { + SimpleUserBean bean = UserProfileDao.getInstance().getSimpleProfileById(groupMemberId); + if (bean == null || bean.getUserStatus() == 1) { + groupMemberIds.remove(groupMemberId); + } + } + + if (!groupMemberIds.contains(siteUserId)) { + groupMemberIds.add(siteUserId); + } + + if (groupMemberIds.size() < 3) { + throw new ZalyException(ErrorCode2.ERROR_GROUP_MEMBERLESS3); + } + + GroupProfileBean groupBean = UserGroupDao.getInstance().createGroup(siteUserId, groupName, groupMemberIds); + if (groupBean != null && StringUtils.isNotEmpty(groupBean.getGroupId())) { + GroupProto.GroupProfile.Builder groupProfileBuilder = GroupProto.GroupProfile.newBuilder(); + groupProfileBuilder.setId(groupBean.getGroupId()); + if (StringUtils.isNotEmpty(groupBean.getGroupName())) { + groupProfileBuilder.setName(groupBean.getGroupName()); + } + if (StringUtils.isNotEmpty(groupBean.getGroupPhoto())) { + groupProfileBuilder.setIcon(String.valueOf(groupBean.getGroupPhoto())); + } + + ApiGroupCreateProto.ApiGroupCreateResponse response = ApiGroupCreateProto.ApiGroupCreateResponse + .newBuilder().setProfile(groupProfileBuilder.build()).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR_GROUP_WHEN_CREATE; + } + + } catch (Exception e) { + if (e instanceof ZalyException) { + errCode = ((ZalyException) e).getErrCode(); + } else { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + } + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + *
+	 * 用户删除群,此时需要验证用户是否具有权限 
+ * 目前:具有权限的仅为群的创建者 (群主) + *
+ * + * @param command + * @return + */ + public CommandResponse delete(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiGroupDeleteProto.ApiGroupDeleteRequest request = ApiGroupDeleteProto.ApiGroupDeleteRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String groupId = request.getGroupId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNoneEmpty(siteUserId, groupId)) { + + if (!checkGroupStatus(groupId)) { + throw new ZalyException(ErrorCode2.ERROR_GROUP_DELETED); + } + + String groupMasterId = UserGroupDao.getInstance().getGroupMaster(groupId); + if (siteUserId.equals(groupMasterId)) { + if (UserGroupDao.getInstance().deleteGroup(groupId)) { + errCode = ErrorCode2.SUCCESS; + } + } else { + errCode = ErrorCode2.ERROR_NOPERMISSION; + } + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + } catch (Exception e) { + if (e instanceof ZalyException) { + errCode = ((ZalyException) e).getErrCode(); + } else { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + } + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + * 获取群资料信息,一般由以下几部分组成
+ * 1.群资料GroupProfile
+ * 2.群主基本资料GroupMaster,群主通过GroupProfile获取
+ * 3.群成员人数以及排在最前列的四位用户
+ * 4.无权限限制 + * + * @param command + * @return + */ + public CommandResponse profile(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiGroupProfileProto.ApiGroupProfileRequest request = ApiGroupProfileProto.ApiGroupProfileRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String groupId = request.getGroupId(); + int pageNum = 1; + int pageSize = GroupConfig.GROUP_MIN_MEMBER_COUNT; + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isAnyEmpty(siteUserId, groupId)) { + throw new ZalyException(ErrorCode2.ERROR_PARAMETER); + } + + if (!checkGroupStatus(groupId)) { + throw new ZalyException(ErrorCode2.ERROR_GROUP_DELETED); + } + + GroupProfileBean groupBean = UserGroupDao.getInstance().getGroupProfile(groupId); + if (groupBean == null || StringUtils.isEmpty(groupBean.getGroupId())) { + throw new ZalyException(ErrorCode2.ERROR_GROUP_QUERY_PROFILE); + } + + SimpleUserBean ownerProfileBean = UserProfileDao.getInstance() + .getSimpleProfileById(groupBean.getCreateUserId()); + logger.debug("get groupId={},groupOwner={}", groupId, ownerProfileBean.toString()); + + int groupMembersCount = UserGroupDao.getInstance().getGroupMemberCount(groupId); + logger.debug("get groupId={},groupMembers={}", groupId, groupMembersCount); + + List groupMemberList = UserGroupDao.getInstance().getGroupMemberList(groupId, pageNum, + pageSize); + + UserProto.UserProfile ownerProfile = UserProto.UserProfile.newBuilder() + .setSiteUserId(String.valueOf(ownerProfileBean.getUserId())) + .setUserPhoto(String.valueOf(ownerProfileBean.getUserPhoto())) + .setUserName(String.valueOf(ownerProfileBean.getUserName())).build(); + GroupProto.GroupProfile groupProfile = GroupProto.GroupProfile.newBuilder().setId(groupBean.getGroupId()) + .setName(String.valueOf(groupBean.getGroupName())) + .setIcon(String.valueOf(groupBean.getGroupPhoto())).build(); + + ApiGroupProfileProto.ApiGroupProfileResponse.Builder responseBuilder = ApiGroupProfileProto.ApiGroupProfileResponse + .newBuilder(); + responseBuilder.setOwner(ownerProfile); + responseBuilder.setProfile(groupProfile); + responseBuilder.setGroupMemberCount(groupMembersCount); + + for (GroupMemberBean memberBean : groupMemberList) { + UserProto.UserProfile memberProfile = UserProto.UserProfile.newBuilder() + .setSiteUserId(String.valueOf(memberBean.getUserId())) + .setUserPhoto(String.valueOf(memberBean.getUserPhoto())) + .setUserName(String.valueOf(memberBean.getUserName())).build(); + GroupProto.GroupMemberProfile groupMemberProfile = GroupProto.GroupMemberProfile.newBuilder() + .setProfile(memberProfile).build(); + responseBuilder.addGroupLastestMember(groupMemberProfile); + } + // 是否可以邀请群聊(除了群主以外) + responseBuilder.setCloseInviteGroupChat(groupBean.isCloseInviteGroupChat()); + ApiGroupProfileProto.ApiGroupProfileResponse response = responseBuilder.build(); + + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } catch (Exception e) { + if (e instanceof ZalyException) { + errCode = ((ZalyException) e).getErrCode(); + } else { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + } + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + * 用户更新群资料
+ * 群主/管理员权限限制 + * + * @param command + * @return + */ + public CommandResponse updateProfile(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest request = ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String groupId = request.getProfile().getId(); + String photoId = request.getProfile().getIcon(); + String groupName = request.getProfile().getName(); + String groupNotice = request.getProfile().getGroupNotice(); + // 新的群群主 + String newGroupOwner = request.getNewGroupOwner(); + // 是否可以邀请群聊(除了群主以外的其他群成员) + boolean closeInviteGroupChat = request.getCloseInviteGroupChat(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isAnyEmpty(siteUserId, groupId)) { + throw new ZalyException(ErrorCode2.ERROR_PARAMETER); + } + + if (!checkGroupStatus(groupId)) { + throw new ZalyException(ErrorCode2.ERROR_GROUP_DELETED); + } + + // 判断是否具有权限,群主拥有权限 + String groupMasterId = UserGroupDao.getInstance().getGroupMaster(groupId); + if (siteUserId.equals(groupMasterId)) { + GroupProfileBean gprofileBean = new GroupProfileBean(); + gprofileBean.setGroupId(groupId); + gprofileBean.setGroupName(groupName); + gprofileBean.setGroupPhoto(photoId); + gprofileBean.setGroupNotice(groupNotice); + gprofileBean.setCreateUserId(newGroupOwner); + gprofileBean.setCloseInviteGroupChat(closeInviteGroupChat); + + if (StringUtils.isNotEmpty(groupName)) { + if (UserGroupDao.getInstance().updateGroupProfile(gprofileBean)) { + errCode = ErrorCode2.SUCCESS; + } + } else { + if (UserGroupDao.getInstance().updateGroupIGC(gprofileBean)) { + errCode = ErrorCode2.SUCCESS; + } + } + } else { + errCode = ErrorCode2.ERROR_NOPERMISSION; + } + + } catch (Exception e) { + if (e instanceof ZalyException) { + errCode = ((ZalyException) e).getErrCode(); + } else { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + } + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + * 添加群成员,支持群成员拉取好友进群,因此无群主权限限制
+ * 无管理员权限限制 -> 添加群资料中是否允许添加成员 + * + * @param command + * @return + */ + public CommandResponse addMember(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiGroupAddMemberProto.ApiGroupAddMemberRequest request = ApiGroupAddMemberProto.ApiGroupAddMemberRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String groupId = request.getGroupId(); + ProtocolStringList memberList = request.getUserListList(); + List addMemberList = Lists.newArrayList(memberList);// copy a new list + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isAnyEmpty(siteUserId, groupId) || addMemberList == null) { + throw new ZalyException(ErrorCode2.ERROR_PARAMETER); + } + // 群是否存在 + if (!checkGroupStatus(groupId)) { + throw new ZalyException(ErrorCode2.ERROR_GROUP_DELETED); + } + + // 校验用户,删除禁封的用户 + for (String groupMemberId : addMemberList) { + SimpleUserBean bean = UserProfileDao.getInstance().getSimpleProfileById(groupMemberId); + if (bean == null || bean.getUserStatus() == 1) { + addMemberList.remove(groupMemberId); + } + } + + GroupProfileBean bean = UserGroupDao.getInstance().getGroupProfile(groupId); + // 校验权限 + if (checkAddMemberPermission(siteUserId, bean)) { + int currentSize = UserGroupDao.getInstance().getGroupMemberCount(groupId); + int maxSize = SiteConfig.getMaxGroupMemberSize(); + if (currentSize + addMemberList.size() <= maxSize) { + if (UserGroupDao.getInstance().addGroupMember(siteUserId, groupId, addMemberList)) { + errCode = ErrorCode2.SUCCESS; + } + } else { + errCode = ErrorCode2.ERROR_GROUP_MAXMEMBERCOUNT; + } + } else { + errCode = ErrorCode2.ERROR_GROUP_INVITE_CHAT_CLOSE; + } + + } catch (Exception e) { + if (e instanceof ZalyException) { + errCode = ((ZalyException) e).getErrCode(); + } else { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + } + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + *
+	 * 添加群成员权限:
+	 * 		1.关闭的开关是打开的
+	 * 		2.是管理员操作
+	 * 
+ * + * @param siteUserId + * @param bean + * @return + */ + private boolean checkAddMemberPermission(String siteUserId, GroupProfileBean bean) { + if (bean != null) { + if (!bean.isCloseInviteGroupChat() || siteUserId.equals(bean.getCreateUserId())) { + return true; + } + } + return false; + } + + public CommandResponse removeMember(Command command) { + return deleteMember(command); + } + + /** + * 群主以及管理员删除群成员
+ * 群主/管理员权限限制 + * + * @param command + * @return + */ + public CommandResponse deleteMember(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest request = ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String groupId = request.getGroupId(); + ProtocolStringList deleteMemberIds = request.getSiteUserIdList(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isAnyBlank(siteUserId, groupId) || deleteMemberIds == null) { + throw new ZalyException(ErrorCode2.ERROR_PARAMETER); + } + + if (!checkGroupStatus(groupId)) { + throw new ZalyException(ErrorCode2.ERROR_GROUP_DELETED); + } + + String groupMasterId = UserGroupDao.getInstance().getGroupMaster(groupId); + if (siteUserId.equals(groupMasterId)) { + if (UserGroupDao.getInstance().deleteGroupMember(groupId, deleteMemberIds)) { + errCode = ErrorCode2.SUCCESS; + } + } else { + errCode = ErrorCode2.ERROR_NOPERMISSION; + } + + } catch (Exception e) { + if (e instanceof ZalyException) { + errCode = ((ZalyException) e).getErrCode(); + } else { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + } + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + * 用户退群
+ * 无权限限制 + * + * @param command + * @return + */ + public CommandResponse quit(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiGroupQuitProto.ApiGroupQuitRequest request = ApiGroupQuitProto.ApiGroupQuitRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String groupId = request.getGroupId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNoneEmpty(siteUserId, groupId)) { + if (UserGroupDao.getInstance().quitGroup(groupId, siteUserId)) { + errCode = ErrorCode2.SUCCESS; + } + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + * 获取群成员
+ * 无权限控制 + * + * @param command + * @return + */ + public CommandResponse members(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiGroupMembersProto.ApiGroupMembersRequest request = ApiGroupMembersProto.ApiGroupMembersRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String siteGroupId = request.getGroupId(); + int pageNum = 1; + int pageSize = GroupConfig.GROUP_MAX_MEMBER_COUNT; + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isAnyEmpty(siteUserId, siteGroupId)) { + throw new ZalyException(ErrorCode2.ERROR_PARAMETER); + } + + if (!checkGroupStatus(siteGroupId)) { + throw new ZalyException(ErrorCode2.ERROR_GROUP_DELETED); + } + + List memberList = UserGroupDao.getInstance().getGroupMemberList(siteGroupId, pageNum, + pageSize); + ApiGroupMembersProto.ApiGroupMembersResponse.Builder responseBuilder = ApiGroupMembersProto.ApiGroupMembersResponse + .newBuilder(); + for (GroupMemberBean member : memberList) { + GroupProto.GroupMemberRole memberRole = GroupProto.GroupMemberRole.forNumber(member.getUserRole()); + UserProto.UserProfile memberProfile = UserProto.UserProfile.newBuilder() + .setSiteUserId(member.getUserId()).setUserName(String.valueOf(member.getUserName())) + .setUserPhoto(String.valueOf(member.getUserPhoto())).build(); + GroupProto.GroupMemberProfile groupMember = GroupProto.GroupMemberProfile.newBuilder() + .setRole(memberRole).setProfile(memberProfile).build(); + responseBuilder.addList(groupMember); + } + commandResponse.setParams(responseBuilder.build().toByteArray()); + errCode = ErrorCode2.SUCCESS; + + } catch (Exception e) { + if (e instanceof ZalyException) { + errCode = ((ZalyException) e).getErrCode(); + } else { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + } + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + * 获取用户群组中,不存在的好友用户 + * + * @param command + * @return + */ + public CommandResponse nonMembers(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiGroupNonMembersProto.ApiGroupNonMembersRequest request = ApiGroupNonMembersProto.ApiGroupNonMembersRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String groupId = request.getGroupId(); + int pageNum = request.getPageNumber(); + int pageSize = request.getPageSize(); + if (pageNum == 0 && pageSize == 0) { + pageNum = 1; + pageSize = 100; + } + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isAnyEmpty(siteUserId, groupId)) { + throw new ZalyException(ErrorCode2.ERROR_PARAMETER); + } + + if (!checkGroupStatus(groupId)) { + throw new ZalyException(ErrorCode2.ERROR_GROUP_DELETED); + } + + List userFriendList = UserGroupDao.getInstance().getUserFriendNonGroupMemberList(siteUserId, + groupId, pageNum, pageSize); + ApiGroupNonMembersProto.ApiGroupNonMembersResponse.Builder responseBuilder = ApiGroupNonMembersProto.ApiGroupNonMembersResponse + .newBuilder(); + for (SimpleUserBean friendBean : userFriendList) { + UserProto.SimpleUserProfile friendProfile = UserProto.SimpleUserProfile.newBuilder() + .setSiteUserId(friendBean.getUserId()).setUserName(String.valueOf(friendBean.getUserName())) + .setUserPhoto(String.valueOf(friendBean.getUserPhoto())).build(); + responseBuilder.addProfile(friendProfile); + } + commandResponse.setParams(responseBuilder.build().toByteArray()); + errCode = ErrorCode2.SUCCESS; + + } catch (Exception e) { + if (e instanceof ZalyException) { + errCode = ((ZalyException) e).getErrCode(); + } else { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + } + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + * 获取个人对群的设置 + * + * @param command + * @return + */ + @Deprecated + public CommandResponse setting(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiGroupSettingProto.ApiGroupSettingRequest request = ApiGroupSettingProto.ApiGroupSettingRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String groupId = request.getGroupId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNoneEmpty(siteUserId, groupId)) { + UserGroupBean bean = UserGroupDao.getInstance().getUserGroupSetting(siteUserId, groupId); + if (bean != null) { + ApiGroupSettingProto.ApiGroupSettingResponse response = ApiGroupSettingProto.ApiGroupSettingResponse + .newBuilder().setMessageMute(bean.isMute()).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR_DATABASE_EXECUTE; + } + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + * 个人更新群设置信息 + * + * @param command + * @return + */ + @Deprecated + public CommandResponse updateSetting(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest request = ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String groupId = request.getGroupId(); + boolean isMute = request.getMessageMute(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNoneEmpty(siteUserId, groupId)) { + UserGroupBean bean = new UserGroupBean(); + bean.setSiteGroupId(groupId); + bean.setMute(isMute); + if (UserGroupDao.getInstance().updateUserGroupSetting(siteUserId, bean)) { + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR_DATABASE_EXECUTE; + } + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + public CommandResponse mute(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiGroupMuteProto.ApiGroupMuteRequest request = ApiGroupMuteProto.ApiGroupMuteRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String siteGroupId = request.getSiteGroupId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isAnyEmpty(siteUserId, siteGroupId)) { + throw new ZalyException(ErrorCode2.ERROR_PARAMETER); + } + + if (!checkGroupStatus(siteGroupId)) { + throw new ZalyException(ErrorCode2.ERROR_GROUP_DELETED); + } + + UserGroupBean bean = UserGroupDao.getInstance().getUserGroupSetting(siteUserId, siteGroupId); + if (bean != null) { + ApiGroupSettingProto.ApiGroupSettingResponse response = ApiGroupSettingProto.ApiGroupSettingResponse + .newBuilder().setMessageMute(bean.isMute()).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR_DATABASE_EXECUTE; + } + + } catch (Exception e) { + if (e instanceof ZalyException) { + errCode = ((ZalyException) e).getErrCode(); + } else { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + } + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + * 个人更新群设置信息 + * + * @param command + * @return + */ + public CommandResponse updateMute(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest request = ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String groupId = request.getGroupId(); + boolean isMute = request.getMessageMute(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isAnyEmpty(siteUserId, groupId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + if (!checkGroupStatus(groupId)) { + throw new ZalyException2(ErrorCode2.ERROR_GROUP_DELETED); + } + + UserGroupBean bean = new UserGroupBean(); + bean.setSiteGroupId(groupId); + bean.setMute(isMute); + if (UserGroupDao.getInstance().updateUserGroupSetting(siteUserId, bean)) { + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR_DATABASE_EXECUTE; + } + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + // 检测群主是否存在 + private boolean checkGroupStatus(String groupId) { + int status = UserGroupDao.getInstance().getGroupStatus(groupId); + return status == 1; + } + + /** + * api.group.qrcode 获取群的二维码 + * + * @param command + * @return + */ + public CommandResponse applyToken(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest request = ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String siteGroupId = request.getSiteGroupId(); + + if (StringUtils.isAnyEmpty(siteUserId, siteGroupId)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + String groupToken = null; + long expireTime = 0; + + // 查找一天之内的是否存在token + long time = System.currentTimeMillis() - 24 * 60 * 60 * 1000l; + ExpireToken existsToken = ExpireTokenDao.getInstance().getExpireTokenByBid(siteGroupId, time); + + if (existsToken != null && StringUtils.isNotEmpty(existsToken.getToken())) { + int status = existsToken.getStatus(); + expireTime = existsToken.getExpireTime(); + } else { + int day = SiteConfig.getGroupQRExpireDay(); + + ExpireToken tokenBean = new ExpireToken(); + tokenBean.setBid(siteGroupId); + tokenBean.setBtype(TokenProto.TokenType.GROUP_TOKEN_VALUE); + tokenBean.setStatus(TokenProto.GroupTokenStatus.GROUP_TOKEN_AVAILABLE_VALUE); + String nToken = TokenProto.TokenType.GROUP_TOKEN_VALUE + UUID.randomUUID().toString().replace("-", ""); + tokenBean.setToken(nToken); + long nowTime = System.currentTimeMillis(); + tokenBean.setCreateTime(nowTime); + tokenBean.setExpireTime(nowTime + day * 24 * 60 * 60 * 1000l); + if (ExpireTokenDao.getInstance().addToken(tokenBean)) { + groupToken = tokenBean.getToken(); + expireTime = tokenBean.getExpireTime(); + } + } + + if (StringUtils.isNotEmpty(groupToken) && expireTime > 0) { + ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse response = ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse + .newBuilder().setExpireTime(expireTime).setToken(groupToken).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + + return commandResponse.setErrCode(errCode); + } + + public CommandResponse joinByToken(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest request = ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String siteGroupId = request.getSiteGroupId(); + String token = request.getToken(); + + if (StringUtils.isAnyEmpty(siteGroupId, token)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + // 群是否存在 + if (!checkGroupStatus(siteGroupId)) { + throw new ZalyException(ErrorCode2.ERROR_GROUP_DELETED); + } + + ExpireToken expireToken = ExpireTokenDao.getInstance().getExpireToken(token); + + if (expireToken == null || StringUtils.isEmpty(expireToken.getToken())) { + throw new ZalyException2(ErrorCode2.ERROR2_GROUP_TOKEN_INVALID); + } + + if (System.currentTimeMillis() > expireToken.getExpireTime()) { + throw new ZalyException2(ErrorCode2.ERROR2_GROUP_TOKEN_EXPIRED); + } + + GroupProfileBean bean = UserGroupDao.getInstance().getGroupProfile(siteGroupId); + + // 校验权限 + if (!checkAddMemberPermission(siteUserId, bean)) { + throw new ZalyException2(ErrorCode2.ERROR_GROUP_INVITE_CHAT_CLOSE); + } + + if (UserGroupDao.getInstance().isGroupMember(siteUserId, siteGroupId)) { + throw new ZalyException2(ErrorCode2.ERROR2_GROUP_ISMEMBER); + } + + // 加人入群 + int currentSize = UserGroupDao.getInstance().getGroupMemberCount(siteGroupId); + int maxSize = SiteConfig.getMaxGroupMemberSize(); + if (currentSize < maxSize) { + if (UserGroupDao.getInstance().addGroupMemberByToken(siteGroupId, siteUserId)) { + errCode = ErrorCode2.SUCCESS; + } + } else { + errCode = ErrorCode2.ERROR_GROUP_MAXMEMBERCOUNT; + } + + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + + return commandResponse.setErrCode(errCode); + } +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiPluginService.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiPluginService.java new file mode 100755 index 0000000..c3aa1b3 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiPluginService.java @@ -0,0 +1,328 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.tai; + +import java.util.Base64; +import java.util.List; +import java.util.Map; + +//import org.apache.commons.codec.binary.Base64; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CharsetCoding; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.constant.IErrorCode; +import com.akaxin.common.crypto.AESCrypto; +import com.akaxin.common.exceptions.ZalyException2; +import com.akaxin.common.http.ZalyHttpClient; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.PluginProto; +import com.akaxin.proto.site.ApiPluginListProto; +import com.akaxin.proto.site.ApiPluginPageProto; +import com.akaxin.proto.site.ApiPluginProxyProto; +import com.akaxin.site.business.dao.SitePluginDao; +import com.akaxin.site.business.impl.AbstractRequest; +import com.akaxin.site.business.impl.site.SiteConfig; +import com.akaxin.site.storage.bean.PluginBean; +import com.google.protobuf.ByteString; + +/** + * 处理客户端与服务点扩展之间功能 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-12-11 14:46:28 + */ +public class ApiPluginService extends AbstractRequest { + private static Logger logger = LoggerFactory.getLogger(ApiPluginService.class); + private static final String HTTP_PREFFIX = "http://"; + private static final String HTTPS_PREFFIX = "https://"; + + /** + * 分页获取扩展列表 + * + * @param command + * @return + */ + public CommandResponse list(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiPluginListProto.ApiPluginListRequest request = ApiPluginListProto.ApiPluginListRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String sessionId = command.getHeader().get(CoreProto.HeaderKey.CLIENT_SOCKET_SITE_SESSION_ID_VALUE); + int pageNumber = request.getPageNumber(); + int pageSize = request.getPageSize(); + PluginProto.PluginPosition position = request.getPosition(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + pageNumber = Math.max(pageNumber, 1);// 从第一页开始 + + // 支持首页以及消息聊天界面扩展 + if (PluginProto.PluginPosition.HOME_PAGE != position && PluginProto.PluginPosition.MSG_PAGE != position) { + throw new ZalyException2(ErrorCode2.ERROR2_PLUGIN_STATUS); + } + + List pluginList = null; + if (StringUtils.isNotBlank(siteUserId) && SiteConfig.isSiteManager(siteUserId)) { + pluginList = SitePluginDao.getInstance().getAdminPluginPageList(pageNumber, pageSize, + position.getNumber()); + } else { + pluginList = SitePluginDao.getInstance().getOrdinaryPluginPageList(pageNumber, pageSize, + position.getNumber()); + } + + if (pluginList != null) { + ApiPluginListProto.ApiPluginListResponse.Builder responseBuilder = ApiPluginListProto.ApiPluginListResponse + .newBuilder(); + for (PluginBean bean : pluginList) { + PluginProto.Plugin.Builder pluginBuilder = getPluginProtoBuilder(bean); + + String authKey = bean.getAuthKey(); + if (StringUtils.isNotEmpty(authKey)) { + byte[] tsk = bean.getAuthKey().getBytes(CharsetCoding.ISO_8859_1); + byte[] encryptedSessionId = AESCrypto.encrypt(tsk, + sessionId.getBytes(CharsetCoding.ISO_8859_1)); + String base64UrlSafeSessionId = Base64.getUrlEncoder().encodeToString(encryptedSessionId); + pluginBuilder.setEncryptedSessionIdBase64(base64UrlSafeSessionId); + } + responseBuilder.addPlugin(pluginBuilder.build()); + } + commandResponse.setParams(responseBuilder.build().toByteArray()); + errCode = ErrorCode2.SUCCESS; + } + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + *
+	 * 获取插件扩展的展示页面,支持两种方式
+	 * 	1.非加密方式,此时扩展authkey不存在
+	 *  2.加密方式,此时扩展authkey存在
+	 * 
+ * + * @param command + * @return + */ + public CommandResponse page(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + ApiPluginPageProto.ApiPluginPageRequest request = ApiPluginPageProto.ApiPluginPageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String pluginId = request.getPluginId(); + String requestPage = request.getPage();// /index || index.php || index.html + String requestParams = request.getParams(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + Map header = command.getHeader(); + String siteSessionId = header.get(CoreProto.HeaderKey.CLIENT_SOCKET_SITE_SESSION_ID_VALUE); + String pluginRefere = header.get(CoreProto.HeaderKey.PLUGIN_CLIENT_REFERER_VALUE); + if (StringUtils.isNoneEmpty(siteUserId, pluginId)) { + PluginBean bean = SitePluginDao.getInstance().getPluginProfile(Integer.valueOf(pluginId)); + if (bean != null && bean.getApiUrl() != null) { + String pageUrl = buildUrl(bean.getApiUrl(), requestPage, bean.getUrlPage()); + logger.debug("http request uri={}", pageUrl); + + PluginProto.ProxyPluginPackage.Builder packageBuilder = PluginProto.ProxyPluginPackage.newBuilder(); + packageBuilder.putPluginHeader(PluginProto.PluginHeaderKey.CLIENT_SITE_USER_ID_VALUE, siteUserId); + packageBuilder.putPluginHeader(PluginProto.PluginHeaderKey.CLIENT_SITE_SESSION_ID_VALUE, + siteSessionId); + packageBuilder.putPluginHeader(PluginProto.PluginHeaderKey.PLUGIN_ID_VALUE, pluginId); + packageBuilder.putPluginHeader(PluginProto.PluginHeaderKey.PLUGIN_TIMESTAMP_VALUE, + String.valueOf(System.currentTimeMillis())); + if (StringUtils.isNotEmpty(pluginRefere)) { + packageBuilder.putPluginHeader(PluginProto.PluginHeaderKey.PLUGIN_REFERER_VALUE, pluginRefere); + } + if (StringUtils.isNotEmpty(requestParams)) { + packageBuilder.setData(requestParams); + } + + byte[] httpContent = packageBuilder.build().toByteArray(); + String authKey = bean.getAuthKey(); + if (StringUtils.isNotEmpty(authKey)) { + // AES 加密整个proto,通过http传输给plugin + byte[] tsk = bean.getAuthKey().getBytes(CharsetCoding.ISO_8859_1); + byte[] enPostContent = AESCrypto.encrypt(tsk, httpContent); + httpContent = enPostContent; + } + + byte[] httpResponse = ZalyHttpClient.getInstance().postBytes(pageUrl, httpContent); + if (httpResponse != null) { + ApiPluginProxyProto.ApiPluginProxyResponse response = ApiPluginProxyProto.ApiPluginProxyResponse + .newBuilder().setData(ByteString.copyFrom(httpResponse)).build(); + + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } else { + logger.error("http request uri={} response={}", pageUrl, httpResponse); + } + } + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + /** + *
+	 * 	代理前台客户端中扩展的请求
+	 * 		1.界面请求后台一般使用http请求
+	 * 		2.使用tcp代理,代替http请求
+	 * 
+ * + * @param command + * @return + */ + public CommandResponse proxy(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + ApiPluginProxyProto.ApiPluginProxyRequest request = ApiPluginProxyProto.ApiPluginProxyRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String pluginId = request.getPluginId(); + String requestApi = request.getApi(); + String requestParams = request.getParams(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + Map header = command.getHeader(); + String siteSessionId = header.get(CoreProto.HeaderKey.CLIENT_SOCKET_SITE_SESSION_ID_VALUE); + String pluginRefere = header.get(CoreProto.HeaderKey.PLUGIN_CLIENT_REFERER_VALUE); + + if (!StringUtils.isAnyBlank(siteUserId, pluginId, requestApi)) { + PluginBean bean = SitePluginDao.getInstance().getPluginProfile(Integer.valueOf(pluginId)); + if (bean != null && bean.getApiUrl() != null) { + String pluginUrl = this.buildUrl(bean.getApiUrl(), requestApi, null); + logger.debug("action={} pluginId={} api={} url={} params={}", command.getAction(), pluginId, + requestApi, pluginUrl, requestParams); + + PluginProto.ProxyPluginPackage.Builder packageBuilder = PluginProto.ProxyPluginPackage.newBuilder(); + packageBuilder.putPluginHeader(PluginProto.PluginHeaderKey.CLIENT_SITE_USER_ID_VALUE, siteUserId); + packageBuilder.putPluginHeader(PluginProto.PluginHeaderKey.CLIENT_SITE_SESSION_ID_VALUE, + siteSessionId); + packageBuilder.putPluginHeader(PluginProto.PluginHeaderKey.PLUGIN_ID_VALUE, pluginId); + packageBuilder.putPluginHeader(PluginProto.PluginHeaderKey.PLUGIN_TIMESTAMP_VALUE, + String.valueOf(System.currentTimeMillis())); + if (StringUtils.isNotEmpty(pluginRefere)) { + packageBuilder.putPluginHeader(PluginProto.PluginHeaderKey.PLUGIN_REFERER_VALUE, pluginRefere); + } + if (StringUtils.isNotEmpty(requestParams)) { + packageBuilder.setData(requestParams); + } + + byte[] httpContent = packageBuilder.build().toByteArray(); + String authKey = bean.getAuthKey(); + if (StringUtils.isNotEmpty(authKey)) { + // AES 加密整个proto,通过http传输给plugin + // byte[] tsk = AESCrypto.generateTSKey(bean.getAuthKey()); + byte[] tsk = bean.getAuthKey().getBytes(CharsetCoding.ISO_8859_1); + byte[] enPostContent = AESCrypto.encrypt(tsk, httpContent); + httpContent = enPostContent; + } + + byte[] httpResponse = ZalyHttpClient.getInstance().postBytes(pluginUrl, httpContent); + if (httpResponse != null) { + ApiPluginProxyProto.ApiPluginProxyResponse response = ApiPluginProxyProto.ApiPluginProxyResponse + .newBuilder().setData(ByteString.copyFrom(httpResponse)).build(); + commandResponse.setParams(response.toByteArray());// httpResposne,callback方法的回调方法参数 + } + errCode = ErrorCode2.SUCCESS; + } + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + private PluginProto.Plugin.Builder getPluginProtoBuilder(PluginBean bean) { + PluginProto.Plugin.Builder pluginBuilder = PluginProto.Plugin.newBuilder(); + pluginBuilder.setId(String.valueOf(bean.getId())); + if (StringUtils.isNotBlank(bean.getName())) { + pluginBuilder.setName(bean.getName()); + } + if (StringUtils.isNotBlank(bean.getIcon())) { + pluginBuilder.setIcon(bean.getIcon()); + } + if (StringUtils.isNotBlank(bean.getUrlPage())) { + pluginBuilder.setUrlPage(bean.getUrlPage()); + } + if (StringUtils.isNotBlank(bean.getApiUrl())) { + pluginBuilder.setApiUrl(bean.getApiUrl()); + } + if (StringUtils.isNotBlank(bean.getAuthKey())) { + pluginBuilder.setAuthKey(bean.getAuthKey()); + } + if (StringUtils.isNotBlank(bean.getAllowedIp())) { + pluginBuilder.setAllowedIp(bean.getAllowedIp()); + } + pluginBuilder.setOrder(bean.getSort()); + pluginBuilder.setPositionValue(bean.getPosition()); + pluginBuilder.setPermissionStatusValue(bean.getPermissionStatus()); + pluginBuilder.setDisplayModeValue(bean.getDisplayMode()); + // pluginBuilder.setEncryptedSessionIdBase64(value) + return pluginBuilder; + } + + private String buildUrl(String apiUrl, String apiName, String defaultPage) { + String pageUrl = HTTP_PREFFIX; + if (apiUrl.startsWith(HTTP_PREFFIX) || apiUrl.startsWith(HTTPS_PREFFIX)) { + pageUrl = apiUrl; + } else { + pageUrl += apiUrl; + } + if (StringUtils.isNotEmpty(apiName)) { + if (apiName.startsWith("/")) { + pageUrl += apiName; + } else { + pageUrl += "/" + apiName; + } + } else { + if (StringUtils.isNotEmpty(defaultPage)) { + if (defaultPage.startsWith("/")) { + pageUrl += defaultPage; + } else { + pageUrl += "/" + defaultPage; + } + } + } + return pageUrl; + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiSecretChatService.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiSecretChatService.java new file mode 100755 index 0000000..e081b8c --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiSecretChatService.java @@ -0,0 +1,93 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.tai; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.ConfigProto; +import com.akaxin.proto.core.DeviceProto; +import com.akaxin.proto.site.ApiSecretChatApplyU2Proto; +import com.akaxin.site.business.impl.AbstractRequest; +import com.akaxin.site.business.impl.site.SiteConfig; +import com.akaxin.site.storage.api.IUserDeviceDao; +import com.akaxin.site.storage.bean.UserDeviceBean; +import com.akaxin.site.storage.service.DeviceDaoService; + +/** + * 用户开启二人/群聊 绝密聊天 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.10.20 + */ +public class ApiSecretChatService extends AbstractRequest { + private static final Logger logger = LoggerFactory.getLogger(ApiSecretChatService.class); + private IUserDeviceDao userDeviceDao = new DeviceDaoService(); + + /** + * 申请二人密聊 + * + * @param command + * @return + */ + public CommandResponse applyU2(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request request = ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String siteFriendId = request.getSiteFriendId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNoneBlank(siteUserId, siteFriendId) && !siteUserId.equals(siteFriendId)) { + ConfigProto.U2EncryptionConfig status = SiteConfig.getU2EncryStatusConfig(); + logger.debug("siteUserId={} apply encryption chat to siteFriendId={} status={}", siteUserId, + siteFriendId, status); + if (ConfigProto.U2EncryptionConfig.U2_OPEN == status) { + UserDeviceBean deviceBean = userDeviceDao.getLatestDevice(siteFriendId); + logger.debug("get siteUserId:{} deviceInfo:{}", siteFriendId, deviceBean.toString()); + + DeviceProto.SimpleDeviceProfile deviceProfile = DeviceProto.SimpleDeviceProfile.newBuilder() + .setDeviceId(deviceBean.getDeviceId()) + .setDeviceName(String.valueOf(deviceBean.getDeviceName())) + .setUserDevicePubk(deviceBean.getUserDevicePubk()) + .setLastLoginTime(deviceBean.getActiveTime()).build(); + + ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response response = ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response + .newBuilder().setDeviceProfile(deviceProfile).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR2_SECRETCHAT_CLOSE; + } + } else { + errCode = ErrorCode2.ERROR_PARAMETER; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiSiteService.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiSiteService.java new file mode 100755 index 0000000..c8937b2 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiSiteService.java @@ -0,0 +1,482 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.tai; + +import java.security.PublicKey; +import java.security.Signature; +import java.util.Base64; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.constant.IErrorCode; +import com.akaxin.common.crypto.HashCrypto; +import com.akaxin.common.crypto.RSACrypto; +import com.akaxin.common.exceptions.ZalyException2; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.common.utils.UserIdUtils; +import com.akaxin.proto.core.ConfigProto; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.UserProto; +import com.akaxin.proto.site.ApiSiteConfigProto; +import com.akaxin.proto.site.ApiSiteLoginProto; +import com.akaxin.proto.site.ApiSiteRegisterProto; +import com.akaxin.site.business.bean.PlatformPhoneBean; +import com.akaxin.site.business.dao.SiteConfigDao; +import com.akaxin.site.business.dao.SiteLoginDao; +import com.akaxin.site.business.dao.UserFriendDao; +import com.akaxin.site.business.dao.UserGroupDao; +import com.akaxin.site.business.dao.UserProfileDao; +import com.akaxin.site.business.impl.AbstractRequest; +import com.akaxin.site.business.impl.notice.User2Notice; +import com.akaxin.site.business.impl.site.PlatformUserPhone; +import com.akaxin.site.business.impl.site.SiteConfig; +import com.akaxin.site.business.impl.site.UserUic; +import com.akaxin.site.storage.api.IUserDeviceDao; +import com.akaxin.site.storage.bean.ApplyFriendBean; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.UserDeviceBean; +import com.akaxin.site.storage.bean.UserProfileBean; +import com.akaxin.site.storage.bean.UserSessionBean; +import com.akaxin.site.storage.service.DeviceDaoService; + +/** + * 获取站点信息
+ * 执行注册&&登陆 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-10-17 18:14:10 + */ +public class ApiSiteService extends AbstractRequest { + + private static final Logger logger = LoggerFactory.getLogger(ApiSiteService.class); + private static final int DEFAULT_PORT = 2021; + private IUserDeviceDao userDeviceDao = new DeviceDaoService(); + + /** + *

+	 * 		api.site.config
+	 * 		获取站点配置信息
+	 * 
+ * + * @param command + * @return + */ + public CommandResponse config(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + Map configMap = SiteConfig.getConfigMap(); + LogUtils.requestDebugLog(logger, command, ""); + + if (configMap != null) { + ConfigProto.SiteConfig.Builder configBuilder = ConfigProto.SiteConfig.newBuilder(); + if (StringUtils.isNotBlank(configMap.get(ConfigProto.ConfigKey.SITE_ADDRESS_VALUE))) { + configBuilder.setSiteAddress(configMap.get(ConfigProto.ConfigKey.SITE_ADDRESS_VALUE)); + } + if (StringUtils.isNumeric(configMap.get(ConfigProto.ConfigKey.SITE_PORT_VALUE))) { + configBuilder.setSitePort(Integer.valueOf(configMap.get(ConfigProto.ConfigKey.SITE_PORT_VALUE))); + } + if (StringUtils.isNotBlank(configMap.get(ConfigProto.ConfigKey.SITE_NAME_VALUE))) { + configBuilder.setSiteName(configMap.get(ConfigProto.ConfigKey.SITE_NAME_VALUE)); + } + if (StringUtils.isNotBlank(configMap.get(ConfigProto.ConfigKey.SITE_LOGO_VALUE))) { + configBuilder.setSiteLogo(configMap.get(ConfigProto.ConfigKey.SITE_LOGO_VALUE)); + } + if (StringUtils.isNotBlank(configMap.get(ConfigProto.ConfigKey.SITE_VERSION_VALUE))) { + configBuilder.setSiteVersion(configMap.get(ConfigProto.ConfigKey.SITE_VERSION_VALUE)); + } + if (StringUtils.isNotBlank(configMap.get(ConfigProto.ConfigKey.SITE_INTRODUCTION_VALUE))) { + configBuilder.setSiteIntroduction(configMap.get(ConfigProto.ConfigKey.SITE_INTRODUCTION_VALUE)); + } + if (StringUtils.isNotBlank(configMap.get(ConfigProto.ConfigKey.PIC_SIZE_VALUE))) { + configBuilder.setPicSize(configMap.get(ConfigProto.ConfigKey.PIC_SIZE_VALUE)); + } + if (StringUtils.isNumeric(configMap.get(ConfigProto.ConfigKey.REALNAME_STATUS_VALUE))) { + configBuilder.setRealNameConfigValue( + Integer.valueOf(configMap.get(ConfigProto.ConfigKey.REALNAME_STATUS_VALUE))); + } + if (StringUtils.isNumeric(configMap.get(ConfigProto.ConfigKey.INVITE_CODE_STATUS_VALUE))) { + configBuilder.setInviteCodeConfigValue( + Integer.valueOf(configMap.get(ConfigProto.ConfigKey.INVITE_CODE_STATUS_VALUE))); + } + ApiSiteConfigProto.ApiSiteConfigResponse response = ApiSiteConfigProto.ApiSiteConfigResponse + .newBuilder().setSiteConfig(configBuilder.build()).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + public CommandResponse register(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiSiteRegisterProto.ApiSiteRegisterRequest request = ApiSiteRegisterProto.ApiSiteRegisterRequest + .parseFrom(command.getParams()); + String userIdPubk = request.getUserIdPubk(); + String userName = request.getUserName(); + String userPhoto = request.getUserPhoto(); + String userUic = request.getUserUic(); + String applyInfo = request.getApplyInfo(); + String phoneToken = request.getPhoneToken(); + String fullPhoneId = null;// 通过phoneToken 查询的 counrtyCode:phoneId + String siteUserId = UUID.randomUUID().toString();// siteUserId保证各站不同 + String siteLoginId = request.getSiteLoginId();// 站点账号 + + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isAnyEmpty(userIdPubk, userName)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + if (userName.length() > 16) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER_NICKNAME); + } + + // 是否开启实名 + ConfigProto.RealNameConfig realNameConfig = SiteConfig.getRealNameConfig(); + switch (realNameConfig) { + case REALNAME_YES: + if (StringUtils.isNotBlank(phoneToken)) { + PlatformPhoneBean bean = PlatformUserPhone.getInstance().getPhoneIdFromPlatform(phoneToken); + fullPhoneId = bean.getFullPhoneId(); + logger.debug("user realname register,get phoneid from platform:{}", fullPhoneId); + + if (StringUtils.isEmpty(fullPhoneId)) { + throw new ZalyException2(ErrorCode2.ERROR_REGISTER_PHONEID); + } + } else { + throw new ZalyException2(ErrorCode2.ERROR_REGISTER_PHONETOKEN); + } + break; + default: + break; + } + + // 是否开启邀请码 + ConfigProto.InviteCodeConfig uicConfig = SiteConfig.getUICConfig(); + switch (uicConfig) { + case UIC_YES: + logger.debug("注册方式:邀请码注册"); + if (!UserUic.getInstance().checkUic(userUic, siteUserId)) { + throw new ZalyException2(ErrorCode2.ERROR_REGISTER_UIC); + } + break; + default: + break; + } + + UserProfileBean regBean = new UserProfileBean(); + regBean.setSiteUserId(siteUserId); + regBean.setUserIdPubk(userIdPubk); + regBean.setUserName(userName); + regBean.setUserNameInLatin(StringHelper.toLatinPinYin(userName)); + regBean.setApplyInfo(applyInfo); + regBean.setUserPhoto(userPhoto); + regBean.setPhoneId(fullPhoneId); + regBean.setUserStatus(UserProto.UserStatus.NORMAL_VALUE); + regBean.setRegisterTime(System.currentTimeMillis()); + + if (SiteLoginDao.getInstance().registerUser(regBean)) { + ApiSiteRegisterProto.ApiSiteRegisterResponse response = ApiSiteRegisterProto.ApiSiteRegisterResponse + .newBuilder().setSiteUserId(siteUserId).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR_REGISTER_USERID_UNIQUE; + } + + if (ErrorCode2.SUCCESS == errCode) { + addUserDefaultFriendsAndGroups(siteUserId); + // 注册成功,需要做一个管理员身份验证 + justForAdminUser(siteUserId, command.getHeader()); + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + // 增加默认好友以及群组 + private void addUserDefaultFriendsAndGroups(String siteUserId) { + try { + Set defaultFriends = SiteConfig.getUserDefaultFriends(); + if (defaultFriends != null && defaultFriends.size() > 0) { + for (String siteFriendId : defaultFriends) { + UserFriendDao.getInstance().saveFriendApply(siteFriendId, siteUserId, "我已成为你的好友,给我发消息试试吧"); + UserFriendDao.getInstance().agreeApply(siteUserId, siteFriendId, true); + ApplyFriendBean applyBean = UserFriendDao.getInstance().agreeApplyWithClear(siteUserId, + siteFriendId, true); + new User2Notice().addFriendTextMessage(applyBean); + } + } + logger.debug("{} add default friends={}", siteUserId, defaultFriends); + } catch (Exception e) { + logger.error("add default friends error", e); + } + + try { + Set defaultGroups = SiteConfig.getUserDefaultGroups(); + if (defaultGroups != null && defaultGroups.size() > 0) { + for (String groupId : defaultGroups) { + UserGroupDao.getInstance().addDefaultGroupMember(groupId, siteUserId); + } + } + logger.debug("{} add default groups={}", siteUserId, defaultGroups); + } catch (Exception e) { + logger.error("add user default groups error", e); + } + + } + + private void justForAdminUser(String siteUserId, Map header) { + try { + // 如果站点没有管理员 + if (SiteConfig.hasNoAdminUser()) { + logger.debug("user first time to register site server ,set it as admin:{} map:{}", siteUserId, header); + SiteConfigDao.getInstance().updateSiteConfig(ConfigProto.ConfigKey.SITE_ADMIN_VALUE, siteUserId); + if (header != null) { + String host = header.get(CoreProto.HeaderKey.CLIENT_REQUEST_SERVER_HOST_VALUE); + if (StringUtils.isNotEmpty(host)) { + SiteConfigDao.getInstance().updateSiteConfig(ConfigProto.ConfigKey.SITE_ADDRESS_VALUE, host); + SiteConfigDao.getInstance().updateSiteConfig(ConfigProto.ConfigKey.SITE_NAME_VALUE, host); + } + String port = header.get(CoreProto.HeaderKey.CLIENT_REQUEST_SERVER_HOST_VALUE); + if (StringUtils.isNotBlank(port)) { + port = "" + DEFAULT_PORT; + SiteConfigDao.getInstance().updateSiteConfig(ConfigProto.ConfigKey.SITE_PORT_VALUE, port); + } + // 修改邀请码注册方式 + SiteConfigDao.getInstance().updateSiteConfig(ConfigProto.ConfigKey.INVITE_CODE_STATUS_VALUE, + ConfigProto.InviteCodeConfig.UIC_NO_VALUE + ""); + } + SiteConfig.updateConfig(); + } + } catch (Exception e) { + logger.error("set site admin error", e); + } + } + + /** + * 执行用户登陆站点行为 + * + * @param command + * @return + */ + public CommandResponse login(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiSiteLoginProto.ApiSiteLoginRequest loginRequest = ApiSiteLoginProto.ApiSiteLoginRequest + .parseFrom(command.getParams()); + String userIdPubk = loginRequest.getUserIdPubk(); + String userIdSignBase64 = loginRequest.getUserIdSignBase64(); + String userDeviceIdPubk = loginRequest.getUserDeviceIdPubk(); + String userDeviceIdSignBase64 = loginRequest.getUserDeviceIdSignBase64(); + String userDeviceName = loginRequest.getUserDeviceName(); + String userToken = loginRequest.getUserToken(); + String phoneToken = loginRequest.getPhoneToken(); + LogUtils.requestDebugLog(logger, command, loginRequest.toString()); + + if (StringUtils.isAnyEmpty(userIdPubk, userIdSignBase64)) { + throw new ZalyException2(ErrorCode2.ERROR2_LOGGIN_USERID_EMPTY); + } + + if (StringUtils.isAnyEmpty(userDeviceIdPubk, userDeviceIdSignBase64)) { + throw new ZalyException2(ErrorCode2.ERROR2_LOGGIN_DEVICEID_EMPTY); + } + + // if (StringUtils.isEmpty(userToken)) { + // throw new ZalyException2(ErrorCode2.ERROR2_LOGGIN_USERTOKEN_EMPTY); + // } + + PublicKey userPubKey = RSACrypto.getRSAPubKeyFromPem(userIdPubk);// 个人身份公钥,解密Sign签名,解密Key + Signature userSign = Signature.getInstance("SHA512withRSA"); + userSign.initVerify(userPubKey); + userSign.update(userIdPubk.getBytes());// 原文 + boolean userSignResult = userSign.verify(Base64.getDecoder().decode(userIdSignBase64)); + logger.debug("userSignResult={}", userSignResult); + + if (userSignResult) { + Signature userDeviceSign = Signature.getInstance("SHA512withRSA"); + userDeviceSign.initVerify(userPubKey); + userDeviceSign.update(userDeviceIdPubk.getBytes());// 原文 + userSignResult = userDeviceSign.verify(Base64.getDecoder().decode(userDeviceIdSignBase64)); + } + logger.debug("deviceSignResult={}", userSignResult); + + // 用户身份校验成功,方可执行登陆操作 + if (!userSignResult) { + throw new ZalyException2(ErrorCode2.ERROR2_LOGGIN_ERRORSIGN); + } + + // 登陆去平台实名机制校验 + String globalUserId = verifyPlatformPhoneAndGetGlobalUserId(userIdPubk, phoneToken); + + // 判断用户,是否已经注册,从主库中查找 + SimpleUserBean subean = UserProfileDao.getInstance().getSimpleProfileByGlobalUserId(globalUserId, true); + if (subean == null || StringUtils.isEmpty(subean.getUserId())) { + logger.info("login site: new user need to register before login site"); + errCode = ErrorCode2.ERROR2_LOGGIN_NOREGISTER;// 未注册,告知用户执行注册行为 + return commandResponse.setErrCode(errCode); + } + + if (subean.getUserStatus() == UserProto.UserStatus.SEALUP_VALUE) { + logger.info("login site: user no permision as sealed up"); + errCode = ErrorCode2.ERROR2_LOGGIN_SEALUPUSER;// 禁封用户禁止登陆 + return commandResponse.setErrCode(errCode); + } + + String siteUserId = subean.getUserId(); + String deviceId = HashCrypto.MD5(userDeviceIdPubk); + + // 保存设备信息 + UserDeviceBean deviceBean = new UserDeviceBean(); + deviceBean.setDeviceId(deviceId); + deviceBean.setDeviceName(userDeviceName); + deviceBean.setSiteUserId(siteUserId); + deviceBean.setUserDevicePubk(userDeviceIdPubk); + deviceBean.setUserToken(userToken); + deviceBean.setActiveTime(System.currentTimeMillis()); + deviceBean.setAddTime(System.currentTimeMillis()); + + boolean loginResult = SiteLoginDao.getInstance().updateUserDevice(deviceBean); + + if (!loginResult) {// 更新失败,则重新保存数据 + loginResult = SiteLoginDao.getInstance().saveUserDevice(deviceBean); + // 在新增设备情况下,控制设备数量 + limitUserDevice(siteUserId); + } + + logger.debug("login site: save device result={} deviceBean={}", loginResult, deviceBean.toString()); + + if (!loginResult) { + // 身份校验失败 + throw new ZalyException2(ErrorCode2.ERROR2_LOGGIN_UPDATE_DEVICE); + } + + // 生成session + String sessionId = UUID.randomUUID().toString(); + + UserSessionBean sessionBean = new UserSessionBean(); + sessionBean.setLoginTime(System.currentTimeMillis()); + sessionBean.setSiteUserId(siteUserId); + sessionBean.setOnline(true); + sessionBean.setSessionId(sessionId); + sessionBean.setDeviceId(deviceId); + sessionBean.setLoginTime(System.currentTimeMillis());// 上次登陆(auth)时间 + + loginResult = loginResult && SiteLoginDao.getInstance().saveUserSession(sessionBean); + + if (loginResult) { + ApiSiteLoginProto.ApiSiteLoginResponse response = ApiSiteLoginProto.ApiSiteLoginResponse.newBuilder() + .setSiteUserId(siteUserId).setUserSessionId(sessionId).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR2_LOGGIN_UPDATE_SESSION; + } + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + private String verifyPlatformPhoneAndGetGlobalUserId(String userIdPubk, String phoneToken) throws ZalyException2 { + phoneToken = null; + if (StringUtils.isEmpty(phoneToken)) { + logger.debug("api.site.login with phoneToken={}", phoneToken); + return UserIdUtils.getV1GlobalUserId(userIdPubk); + } + + // 登陆去平台校验实名机制 + ConfigProto.RealNameConfig realNameConfig = SiteConfig.getRealNameConfig(); + + if (ConfigProto.RealNameConfig.REALNAME_YES == realNameConfig) { + PlatformPhoneBean bean = PlatformUserPhone.getInstance().getPhoneIdFromPlatform(phoneToken); + String fullPhoneId = bean.getFullPhoneId(); + String platformUserIdPubk = bean.getUserIdPubk(); + logger.debug("get platform realname phone info bean={}", bean); + + if (StringUtils.isEmpty(fullPhoneId)) { + return UserIdUtils.getV1GlobalUserId(userIdPubk); + } + + if (!userIdPubk.equals(platformUserIdPubk)) { + logger.error("api.site.login equals={} userIdPubk={} platformUserIdPubk={}", false, userIdPubk, + platformUserIdPubk); + return UserIdUtils.getV1GlobalUserId(userIdPubk); + } + + // 手机号查询用户身份 + UserProfileBean profile = UserProfileDao.getInstance().getUserProfileByFullPhoneId(fullPhoneId); + + if (profile != null && StringUtils.isNoneEmpty(platformUserIdPubk, profile.getUserIdPubk())) { + + if (platformUserIdPubk.equals(profile.getUserIdPubk())) { + logger.debug("new site realname login verifyPlatformPhone success"); + return UserIdUtils.getV1GlobalUserId(platformUserIdPubk); + } else { + // 更新数据 + String globalUserId = UserIdUtils.getV1GlobalUserId(platformUserIdPubk); + boolean updateRes = UserProfileDao.getInstance().updateUserIdPubk(profile.getSiteUserId(), + globalUserId, userIdPubk); + + if (!updateRes) { + throw new ZalyException2(ErrorCode2.ERROR2_LOGGIN_UPDATENEWPUBK); + } + } + + } + + } + + return UserIdUtils.getV1GlobalUserId(userIdPubk); + } + + // 控制用户的设备数量 + private void limitUserDevice(String siteUserId) { + try { + int limitNumber = 4; + userDeviceDao.limitDeviceNum(siteUserId, limitNumber); + } catch (Exception e) { + logger.error(StringHelper.format("limit siteUserId={} device num error", siteUserId), e); + } + } +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiUserService.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiUserService.java new file mode 100755 index 0000000..0e531bc --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiUserService.java @@ -0,0 +1,313 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.tai; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.constant.IErrorCode; +import com.akaxin.common.exceptions.ZalyException2; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.common.utils.UserIdUtils; +import com.akaxin.common.utils.ValidatorPattern; +import com.akaxin.proto.core.UserProto; +import com.akaxin.proto.site.ApiUserMuteProto; +import com.akaxin.proto.site.ApiUserProfileProto; +import com.akaxin.proto.site.ApiUserSearchProto; +import com.akaxin.proto.site.ApiUserUpdateMuteProto; +import com.akaxin.proto.site.ApiUserUpdateProfileProto; +import com.akaxin.site.business.dao.UserFriendDao; +import com.akaxin.site.business.dao.UserProfileDao; +import com.akaxin.site.business.impl.AbstractRequest; +import com.akaxin.site.storage.bean.UserFriendBean; +import com.akaxin.site.storage.bean.UserProfileBean; + +/** + * 用户个人自身资料相关功能 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.11.25 15:10:36 + */ +public class ApiUserService extends AbstractRequest { + private static final Logger logger = LoggerFactory.getLogger(ApiUserService.class); + + /** + * 用户输入siteLoginId | phoneId | userIdPubk 查找用户 + * + * @param command + * @return + */ + public CommandResponse search(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiUserSearchProto.ApiUserSearchRequest request = ApiUserSearchProto.ApiUserSearchRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String id = StringUtils.trimToNull(request.getId()); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isEmpty(id)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + String siteFriendId = null; + if (id.length() > 100) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + // String globalUserId = UserIdUtils.getV1GlobalUserId(id); + // logger.info("api.user.search globalUserId={} pubk={}", globalUserId, id); + // siteFriendId = + // UserProfileDao.getInstance().getSiteUserIdByGlobalUserId(globalUserId); + } else if (ValidatorPattern.isPhoneId(id)) { + String phoneId = "+86_" + id; + siteFriendId = UserProfileDao.getInstance().getSiteUserIdByPhone(phoneId); + if (StringUtils.isEmpty(siteFriendId)) { + phoneId = "+86:" + id; + siteFriendId = UserProfileDao.getInstance().getSiteUserIdByPhone(phoneId); + } + } else { + // siteLoginId + String lowercaseLoginId = id.trim().toLowerCase(); + siteFriendId = UserProfileDao.getInstance().getSiteUserIdByLoginId(lowercaseLoginId); + } + + if (StringUtils.isEmpty(siteFriendId)) { + throw new ZalyException2(ErrorCode2.ERROR2_USER_NOUSER); + } + + UserFriendBean userBean = UserProfileDao.getInstance().getFriendProfileById(siteUserId, siteFriendId); + + if (userBean != null && StringUtils.isNotBlank(userBean.getSiteUserId())) { + UserProto.UserProfile.Builder friendProfileBuilder = UserProto.UserProfile.newBuilder(); + friendProfileBuilder.setSiteUserId(userBean.getSiteUserId()); + friendProfileBuilder.setUserIdPubk(userBean.getUserIdPubk()); + if (StringUtils.isNotEmpty(userBean.getAliasName())) { + friendProfileBuilder.setUserName(userBean.getAliasName()); + if (StringUtils.isNotEmpty(userBean.getUserName())) { + friendProfileBuilder.setNickName(userBean.getUserName()); + } + } else { + if (StringUtils.isNotEmpty(userBean.getUserName())) { + friendProfileBuilder.setUserName(userBean.getUserName()); + friendProfileBuilder.setNickName(userBean.getUserName()); + } + } + + if (StringUtils.isNotEmpty(userBean.getSiteLoginId())) { + friendProfileBuilder.setSiteLoginId(userBean.getSiteLoginId()); + } + if (StringUtils.isNotEmpty(userBean.getUserPhoto())) { + friendProfileBuilder.setUserPhoto(userBean.getUserPhoto()); + } + friendProfileBuilder.setUserStatusValue(userBean.getUserStatus()); + UserProto.UserProfile friendProfile = friendProfileBuilder.build(); + + // 查关系 + UserProto.UserRelation userRelation = UserFriendDao.getInstance().getUserRelation(siteUserId, + userBean.getSiteUserId()); + ApiUserSearchProto.ApiUserSearchResponse response = ApiUserSearchProto.ApiUserSearchResponse + .newBuilder().setProfile(friendProfile).setRelation(userRelation).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + /** + * 获取用户个人资料信息,支持使用globalUserid与siteUserId + * + * @param command + * @return + */ + public CommandResponse profile(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + ErrorCode2 errorCode = ErrorCode2.ERROR; + try { + ApiUserProfileProto.ApiUserProfileRequest request = ApiUserProfileProto.ApiUserProfileRequest + .parseFrom(command.getParams()); + String currentUserId = command.getSiteUserId(); + String siteUserId = request.getSiteUserId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (StringUtils.isNotBlank(siteUserId) && siteUserId.equals(currentUserId)) { + UserProfileBean userBean = UserProfileDao.getInstance().getUserProfileById(siteUserId); + if (null == userBean) { + // 理论不会执行到这一步 + userBean = UserProfileDao.getInstance().getUserProfileByGlobalUserId(siteUserId); + } + + if (userBean != null && StringUtils.isNotBlank(userBean.getSiteUserId())) { + + UserProto.UserProfile.Builder userProfileBuilder = UserProto.UserProfile.newBuilder(); + userProfileBuilder.setSiteUserId(userBean.getSiteUserId()); + if (StringUtils.isNotEmpty(userBean.getUserName())) { + userProfileBuilder.setUserName(userBean.getUserName()); + } + if (StringUtils.isNotEmpty(userBean.getSiteLoginId())) { + userProfileBuilder.setSiteLoginId(userBean.getSiteLoginId()); + } + if (StringUtils.isNotEmpty(userBean.getUserPhoto())) { + userProfileBuilder.setUserPhoto(userBean.getUserPhoto()); + } + if (StringUtils.isNotEmpty(userBean.getSelfIntroduce())) { + userProfileBuilder.setSelfIntroduce(userBean.getSelfIntroduce()); + } + userProfileBuilder.setUserStatusValue(userBean.getUserStatus()); + + ApiUserProfileProto.ApiUserProfileResponse response = ApiUserProfileProto.ApiUserProfileResponse + .newBuilder().setUserProfile(userProfileBuilder.build()).build(); + commandResponse.setParams(response.toByteArray()); + errorCode = ErrorCode2.SUCCESS; + } + } else { + errorCode = ErrorCode2.ERROR_PARAMETER; + } + } catch (Exception e) { + errorCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errorCode); + } + + /** + * 更新用户个人信息 + * + * @param command + * @return + */ + public CommandResponse updateProfile(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest request = ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String siteLoginId = request.getUserProfile().getSiteLoginId(); + String userName = request.getUserProfile().getUserName(); + String userPhoto = request.getUserProfile().getUserPhoto(); + String introduce = request.getUserProfile().getSelfIntroduce(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + // 校验参数 + if (StringUtils.isEmpty(siteUserId) || StringUtils.isAllEmpty(siteLoginId, userName, userPhoto)) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER); + } + + // 用户名长度 1-16 + if (StringUtils.isNotEmpty(userName) && userName.length() > 16) { + throw new ZalyException2(ErrorCode2.ERROR_PARAMETER_NICKNAME); + } + + // 站点账号 3-16 + if (StringUtils.isNotEmpty(siteLoginId)) { + Matcher match = Pattern.compile("^[A-Za-z][A-Za-z0-9]{2,15}$").matcher(siteLoginId); + if (!match.matches()) { + throw new ZalyException2(ErrorCode2.ERROR_LOGINID_LENGTH); + } + + String loginId = UserProfileDao.getInstance().getSiteLoginIdBySiteUserId(siteUserId); + if (loginId != null && !loginId.equalsIgnoreCase(siteLoginId)) { + throw new ZalyException2(ErrorCode2.ERROR_LOGINID_EXIST); + } else if (siteLoginId.equalsIgnoreCase(loginId)) { + // equal, ignore + siteLoginId = null; + } + } + + UserProfileBean userBean = new UserProfileBean(); + userBean.setSiteUserId(siteUserId); + userBean.setSiteLoginId(siteLoginId); + if (StringUtils.isNotEmpty(userName)) { + userBean.setUserName(userName); + userBean.setUserNameInLatin(StringHelper.toLatinPinYin(userName)); + } + userBean.setUserPhoto(userPhoto); + userBean.setSelfIntroduce(introduce); + + if (UserProfileDao.getInstance().updateUserProfile(userBean)) { + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR2_USER_UPDATE_PROFILE; + } + + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } catch (ZalyException2 e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode(errCode); + } + + public CommandResponse mute(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + String siteUserId = command.getSiteUserId(); + boolean mute = UserProfileDao.getInstance().getUserMute(siteUserId); + LogUtils.requestDebugLog(logger, command, ""); + + ApiUserMuteProto.ApiUserMuteResponse response = ApiUserMuteProto.ApiUserMuteResponse.newBuilder() + .setMute(mute).build(); + commandResponse.setParams(response.toByteArray()); + errCode = ErrorCode2.SUCCESS; + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + + public CommandResponse updateMute(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + ErrorCode2 errCode = ErrorCode2.ERROR; + try { + ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest request = ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + boolean mute = request.getMute(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (UserProfileDao.getInstance().updateUserMute(siteUserId, mute)) { + errCode = ErrorCode2.SUCCESS; + } else { + errCode = ErrorCode2.ERROR_DATABASE_EXECUTE; + } + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + return commandResponse.setErrCode2(errCode); + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiWebService.java b/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiWebService.java new file mode 100755 index 0000000..8257094 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/impl/tai/ApiWebService.java @@ -0,0 +1,68 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.impl.tai; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.constant.IErrorCode; +import com.akaxin.common.exceptions.ZalyException; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.site.ApiWebAuthProto; +import com.akaxin.site.business.cache.WebSessionCache; +import com.akaxin.site.business.impl.AbstractRequest; + +/** + * webim服务 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.11.25 15:10:36 + */ +public class ApiWebService extends AbstractRequest { + private static final Logger logger = LoggerFactory.getLogger(ApiWebService.class); + + public CommandResponse auth(Command command) { + CommandResponse commandResponse = new CommandResponse().setAction(CommandConst.ACTION_RES); + IErrorCode errCode = ErrorCode2.ERROR; + try { + ApiWebAuthProto.ApiWebAuthRequest request = ApiWebAuthProto.ApiWebAuthRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String webSessionId = request.getSessionId(); + + if (StringUtils.isAnyEmpty(webSessionId, siteUserId)) { + throw new ZalyException(ErrorCode2.ERROR_PARAMETER); + } + + WebSessionCache.putWebAuthSession(webSessionId, siteUserId); + errCode = ErrorCode2.SUCCESS; + } catch (ZalyException e) { + errCode = e.getErrCode(); + LogUtils.requestErrorLog(logger, command, e); + } catch (Exception e) { + errCode = ErrorCode2.ERROR_SYSTEMERROR; + LogUtils.requestErrorLog(logger, command, e); + } + + return commandResponse.setErrCode(errCode); + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/push/PushNotification.java b/openzaly-business/src/main/java/com/akaxin/site/business/push/PushNotification.java new file mode 100755 index 0000000..c47a5a0 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/push/PushNotification.java @@ -0,0 +1,96 @@ +package com.akaxin.site.business.push; + +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.core.ConfigProto; +import com.akaxin.proto.core.PushProto; +import com.akaxin.proto.platform.ApiPushNotificationProto; +import com.akaxin.site.message.dao.ImUserProfileDao; +import com.akaxin.site.message.push.PushClient; +import com.akaxin.site.message.threads.MultiPushThreadExecutor; +import com.akaxin.site.message.utils.SiteConfigHelper; + +public class PushNotification { + private static final Logger logger = LoggerFactory.getLogger(PushNotification.class); + + public static void sendAddFriend(String siteUserId, String siteFriendId) { + try { + String pushContent = PushText.applyFriendText(siteUserId); + String pushGoto = PushText.applyFriendGoto(siteFriendId); + send(siteUserId, siteFriendId, null, pushContent, pushGoto); + } catch (Exception e) { + logger.error("add friend push error", e); + } + } + + /** + * siteUserId 同意了 siteFriendId 的好友添加请求 + * + * @param siteUserId + * @param siteFriendId + */ + public static void agreeAddFriend(String siteUserId, String siteFriendId) { + try { + String pushContent = PushText.agreeFriendText(siteUserId); + // 接受到别人同意添加你为好友,点击goto跳转到消息对话框 + String pushGoto = PushText.messageGoto(siteUserId); + send(siteUserId, siteFriendId, null, pushContent, pushGoto); + } catch (Exception e) { + logger.error("agree add friend push error", e); + } + } + + public static void send(String siteUserId, String siteFriendId, String subTitle, String pushContent, + String pushGoto) { + MultiPushThreadExecutor.getExecutor().execute(new Runnable() { + + @Override + public void run() { + try { + String globalUserId = ImUserProfileDao.getInstance().getGlobalUserId(siteFriendId); + + // 一、用户对站点是否消息免打扰 + if (ImUserProfileDao.getInstance().isMute(siteFriendId)) { + return; + } + + ApiPushNotificationProto.ApiPushNotificationRequest.Builder requestBuilder = ApiPushNotificationProto.ApiPushNotificationRequest + .newBuilder(); + PushProto.Notification.Builder notification = PushProto.Notification.newBuilder(); + notification.setUserId(globalUserId); + notification.setPushBadge(1); + String siteName = SiteConfigHelper.getConfig(ConfigProto.ConfigKey.SITE_NAME); + if (StringUtils.isNotBlank(siteName)) { + notification.setPushTitle(siteName); + } + String address = SiteConfigHelper.getConfig(ConfigProto.ConfigKey.SITE_ADDRESS); + String port = SiteConfigHelper.getConfig(ConfigProto.ConfigKey.SITE_PORT); + notification.setSiteServer(address + ":" + port); + notification.setPushFromId(siteUserId); + if (StringUtils.isNotEmpty(subTitle)) { + notification.setPushFromName(subTitle); + } + notification.setPushAlert(pushContent); + notification.setPushGoto(pushGoto); + + List userTokens = ImUserProfileDao.getInstance().getUserToken(siteFriendId); + if (userTokens != null && userTokens.size() > 0) { + notification.addAllUserTokens(userTokens); + requestBuilder.setNotification(notification.build()); + requestBuilder.setPushType(PushProto.PushType.PUSH_NOTICE); + PushClient.asyncWrite(CommandConst.API_PUSH_NOTIFICATION, requestBuilder.build().toByteArray()); + } + } catch (Exception e) { + logger.error(StringHelper.format("siteUserId={} siteFriendId={} subtitle={} content={}", siteUserId, + siteFriendId, subTitle, pushContent), e); + } + } + }); + } +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/push/PushText.java b/openzaly-business/src/main/java/com/akaxin/site/business/push/PushText.java new file mode 100755 index 0000000..abd1f88 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/push/PushText.java @@ -0,0 +1,47 @@ +package com.akaxin.site.business.push; + +import org.apache.commons.lang3.StringUtils; + +import com.akaxin.common.utils.StringHelper; +import com.akaxin.site.business.dao.UserProfileDao; +import com.akaxin.site.business.impl.site.SiteConfig; +import com.akaxin.site.storage.bean.SimpleUserBean; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-25 17:41:20 + */ +public class PushText { + private static String ADD_FRIEND_TEXT = "{} 申请添加你为好友"; + private static String AGGREE_FRIEND_TEXT = "{} 同意了你的好友申请"; + private static String DEFAULT_ADD_FRIEND_TEXT = "你收到一条好友申请"; + + public static String applyFriendText(String siteUserId) { + SimpleUserBean bean = UserProfileDao.getInstance().getSimpleProfileById(siteUserId); + if (bean != null && StringUtils.isNotEmpty(bean.getUserName())) { + return StringHelper.format(ADD_FRIEND_TEXT, bean.getUserName()); + } + return DEFAULT_ADD_FRIEND_TEXT; + } + + public static String applyFriendGoto(String siteUserId) { + String siteAddress = SiteConfig.getSiteAddress(); + return StringHelper.format("zaly://{}/goto?page=friend_apply", siteAddress); + } + + // 同意好友添加push文案 + public static String agreeFriendText(String siteUserId) { + SimpleUserBean bean = UserProfileDao.getInstance().getSimpleProfileById(siteUserId); + if (bean != null && StringUtils.isNotEmpty(bean.getUserName())) { + return StringHelper.format(AGGREE_FRIEND_TEXT, bean.getUserName()); + } + return DEFAULT_ADD_FRIEND_TEXT; + } + + public static String messageGoto(String siteUserId) { + String siteAddress = SiteConfig.getSiteAddress(); + return StringHelper.format("zaly://{}/goto?page=u2_msg&site_user_id={}", siteAddress, siteUserId); + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/service/ApiRequestService.java b/openzaly-business/src/main/java/com/akaxin/site/business/service/ApiRequestService.java new file mode 100755 index 0000000..ddf64c6 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/service/ApiRequestService.java @@ -0,0 +1,48 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.service; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.site.business.api.IRequest; + +/** + * API处理业务逻辑 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.10.16 + * + */ +public class ApiRequestService implements IRequest { + private static final Logger logger = LoggerFactory.getLogger(ApiRequestService.class); + + public CommandResponse process(Command command) { + try { + return ApiServiceFactory.getService(command.getService()).execute(command); + } catch (Exception e) { + logger.error(StringHelper.format("api request service error.command={}", command), e); + } + return new CommandResponse().setVersion(CommandConst.PROTOCOL_VERSION).setAction(CommandConst.ACTION_RES) + .setErrCode2(ErrorCode2.ERROR); + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/service/ApiServiceFactory.java b/openzaly-business/src/main/java/com/akaxin/site/business/service/ApiServiceFactory.java new file mode 100755 index 0000000..04afbe3 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/service/ApiServiceFactory.java @@ -0,0 +1,67 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.service; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.constant.RequestAction; +import com.akaxin.site.business.impl.IRequestService; +import com.akaxin.site.business.impl.tai.ApiDeviceService; +import com.akaxin.site.business.impl.tai.ApiFileService; +import com.akaxin.site.business.impl.tai.ApiFriendService; +import com.akaxin.site.business.impl.tai.ApiGroupService; +import com.akaxin.site.business.impl.tai.ApiPluginService; +import com.akaxin.site.business.impl.tai.ApiSecretChatService; +import com.akaxin.site.business.impl.tai.ApiSiteService; +import com.akaxin.site.business.impl.tai.ApiUserService; + +/** + * API业务请求,分发工厂 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.10.24 18:25:31 + */ +public class ApiServiceFactory { + private static final Logger logger = LoggerFactory.getLogger(ApiServiceFactory.class); + + public static IRequestService getService(String serviceName) { + RequestAction nameEnum = RequestAction.getAction(serviceName); + switch (nameEnum) { + case SITE: + return new ApiSiteService(); + case API_USER: + return new ApiUserService(); + case API_FRIEND: + return new ApiFriendService(); + case API_GROUP: + return new ApiGroupService(); + case API_SECRETCHAT: + return new ApiSecretChatService(); + case API_FILE: + return new ApiFileService(); + case API_DEVICE: + return new ApiDeviceService(); + case API_PLUGIN: + return new ApiPluginService(); + default: + logger.error("api business service error.service={}", nameEnum.getName()); + break; + } + return null; + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/service/HttpRequestService.java b/openzaly-business/src/main/java/com/akaxin/site/business/service/HttpRequestService.java new file mode 100755 index 0000000..0356fa2 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/service/HttpRequestService.java @@ -0,0 +1,85 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.service; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.constant.HttpUriAction; +import com.akaxin.site.business.api.IRequest; +import com.akaxin.site.business.impl.hai.HttpFriendService; +import com.akaxin.site.business.impl.hai.HttpGroupService; +import com.akaxin.site.business.impl.hai.HttpMessageService; +import com.akaxin.site.business.impl.hai.HttpPushService; +import com.akaxin.site.business.impl.hai.HttpSessionService; +import com.akaxin.site.business.impl.hai.HttpSiteService; +import com.akaxin.site.business.impl.hai.HttpUserService; + +/** + * Http请求服务分发 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018.1.1 + * + */ +public class HttpRequestService implements IRequest { + private static final Logger logger = LoggerFactory.getLogger(HttpRequestService.class); + + public CommandResponse process(Command command) { + // 路由分发 + HttpUriAction huaEnum = HttpUriAction.getUriActionEnum(command.getRety(), command.getService()); + CommandResponse response = null; + try { + switch (huaEnum) { + case HAI_SITE_SERVICE: + response = new HttpSiteService().execute(command); + break; + case HAI_USER_SERVICE: + response = new HttpUserService().execute(command); + break; + case HAI_GROUP_SERVICE: + response = new HttpGroupService().execute(command); + break; + case HAI_FRIEND_SERVICE: + response = new HttpFriendService().execute(command); + break; + case HAI_MESSAGE_SERVICE: + response = new HttpMessageService().execute(command); + break; + case HAI_PUSH_SERVICE: + response = new HttpPushService().execute(command); + break; + case HAI_SESSION_SERVICE: + response = new HttpSessionService().execute(command); + break; + default: + logger.error("error http request command={}", command.toString()); + throw new Exception("http request with error url=" + command.getUri()); + } + } catch (Exception e) { + logger.error("http request service error.", e); + } + if (response == null) { + response = new CommandResponse().setErrCode(ErrorCode2.ERROR2_HTTP_URL); + } + return response.setVersion(CommandConst.PROTOCOL_VERSION).setAction(CommandConst.ACTION_RES); + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/utils/FilePathUtils.java b/openzaly-business/src/main/java/com/akaxin/site/business/utils/FilePathUtils.java new file mode 100755 index 0000000..00435c8 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/utils/FilePathUtils.java @@ -0,0 +1,79 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.utils; + +import org.apache.commons.lang3.StringUtils; + +import com.akaxin.proto.core.ConfigProto.ConfigKey; +import com.akaxin.site.business.impl.site.SiteConfig; + +/** + * 提供站点服务文件路径位置,路径存放在站点配置表中。
+ * 第一次使用通过数据库查询获取,以后每次通过缓存中获取 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-12-14 14:59:38 + */ +public class FilePathUtils { + private static final String DEFAULT_FILE_PATH = "site-file/"; + private static String filePath; + + /** + * + * @return + */ + public static String getPicPath() { + if (filePath == null) { + filePath = SiteConfig.getConfig(ConfigKey.PIC_PATH_VALUE); + } + if (StringUtils.isNotBlank(filePath)) { + if (filePath.endsWith("/")) { + return filePath + DEFAULT_FILE_PATH; + } + return filePath + "/" + DEFAULT_FILE_PATH; + } + return DEFAULT_FILE_PATH; + } + + public static String getPicPath(String filePath) { + if (StringUtils.isNotBlank(filePath)) { + if (filePath.endsWith("/")) { + return filePath + DEFAULT_FILE_PATH; + } + return filePath + "/" + DEFAULT_FILE_PATH; + } + return DEFAULT_FILE_PATH; + } + + /** + * 通过fileId获取文件路径 + * + * @param fileId + * @return + */ + public static String getFilePathByFileId(String fileId) { + // 获取文件目录 + String defaultDir = getPicPath(); + String fileUrl = fileId.replaceAll("-", "/"); + if (defaultDir.endsWith("/")) { + fileUrl = defaultDir + fileUrl; + } else { + fileUrl = defaultDir + "/" + fileUrl; + } + return fileUrl; + } + +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/utils/FileServerUtils.java b/openzaly-business/src/main/java/com/akaxin/site/business/utils/FileServerUtils.java new file mode 100755 index 0000000..72a37a6 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/utils/FileServerUtils.java @@ -0,0 +1,215 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.utils; + +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.UUID; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.proto.core.FileProto; +import com.akaxin.proto.core.FileProto.FileType; + +/** + * 文件服务相关操作 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:21:39 + */ +public class FileServerUtils { + private static final Logger logger = LoggerFactory.getLogger(FileServerUtils.class); + private static final String FILE_PREFFIX = "AKX-"; + + // 获取当前时间 "20180428" + private static String getDayTime() { + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); + return sdf.format(System.currentTimeMillis()); + } + + // 生成存放文件的文件目录 + private static String createFileDir(String defaultDir, int type) { + StringBuilder url = new StringBuilder(defaultDir); + String filePath = SiteFileType.getFilePthByType(type); + url.append(filePath).append("/"); + url.append(getDayTime()); + return url.toString(); + } + + // 生成文件名,老版本21位,新版本>21位 + private static String createFileName(FileProto.FileType type, FileProto.FileDesc fileDesc) { + String fileName = System.currentTimeMillis() + UUID.randomUUID().toString().substring(0, 8); + if (FileProto.FileType.MESSAGE_VOICE == type) { + // 语音 + if (fileDesc != null && fileDesc.getLength() > 0) { + fileName = fileName + "_" + fileDesc.getLength(); + } + } else { + // 图片 + if (fileDesc != null && fileDesc.getWidth() > 0 && fileDesc.getHeight() > 0) { + fileName = fileName + "_" + fileDesc.getWidth() + "_" + fileDesc.getHeight(); + } + } + return fileName; + } + + // 保存客户端上传的文件资源(图片,语音,视频等) + public static String saveFile(byte[] imageBytes, String defaultDir, FileProto.FileType type, + FileProto.FileDesc fileDesc) { + String fileUrl = null; + String fileName = null; + BufferedOutputStream bos = null; + try { + if (!defaultDir.endsWith("/")) { + defaultDir += "/"; + } + // 文件目录 + String fileDir = createFileDir(defaultDir, type.getNumber()); + // 文件名称 + fileName = createFileName(type, fileDesc); + + // 存储的文件资源 + File storageFile = new File(fileDir, fileName); + if (!storageFile.getParentFile().exists()) { + storageFile.getParentFile().mkdirs(); + } + + if (!storageFile.exists()) { + storageFile.createNewFile(); + } + bos = new BufferedOutputStream(new FileOutputStream(storageFile)); + bos.write(imageBytes); + + fileUrl = storageFile.getPath(); + + logger.debug("upload file URL={}", fileUrl); + } catch (IOException e) { + logger.error("uplaod file error.", e); + } finally { + try { + if (bos != null) { + bos.close(); + } + } catch (IOException e) { + logger.error("close file output stream error."); + } + } + + // >21 新改版的fileId格式 + String fileId = fileUrl.substring(defaultDir.length(), fileUrl.length()).replace(File.separatorChar, '-'); + + if (fileName.length() != 21 || fileName.contains("_")) { + return FILE_PREFFIX + fileId; + } + + return fileId; + } + + public static byte[] fileToBinary(String defaultDir, String fileUrl) { + fileUrl = fileUrl.replaceAll("-", "/"); + if (defaultDir.endsWith("/")) { + fileUrl = defaultDir + fileUrl; + } else { + fileUrl = defaultDir + "/" + fileUrl; + } + File file = new File(fileUrl); + BufferedInputStream bis = null; + try { + bis = new BufferedInputStream(new FileInputStream(file)); + byte[] bytes = new byte[bis.available()]; + bis.read(bytes); + return bytes; + } catch (IOException e) { + logger.error("download file={} error,cause={}", fileUrl, e.toString()); + } finally { + try { + if (bis != null) { + bis.close(); + } + } catch (IOException e) { + logger.error("close file stream error.", e); + } + } + return null; + } + + public static byte[] fileToBinary(String fileUrl) { + File file = new File(fileUrl); + BufferedInputStream bis = null; + try { + bis = new BufferedInputStream(new FileInputStream(file)); + byte[] bytes = new byte[bis.available()]; + bis.read(bytes); + return bytes; + } catch (IOException e) { + logger.error("download file={} error,cause={}", fileUrl, e.toString()); + } finally { + try { + if (bis != null) { + bis.close(); + } + } catch (IOException e) { + logger.error("close file stream error.", e); + } + } + return null; + } + + enum SiteFileType { + UNKNOW_FILE(FileType.UNKNOWN_FILE_VALUE, "UNKNOW"), // 用户,群头像 + USER_PORTRAIT(FileType.USER_PORTRAIT_VALUE, "U/PORT"), // 用户头像 + GROUP_PORTRAIT(FileType.GROUP_PORTRAIT_VALUE, "G/PORT"), // 群组头像 + + // 需要增加文件描述 + MESSAGE_IMAGE(FileType.MESSAGE_IMAGE_VALUE, "MSG/IMG"), // 个人消息,群图片消息 + MESSAGE_VOICE(FileType.MESSAGE_VOICE_VALUE, "MSG/VOI"), // 个人,群语音消息 + + SITE_PLUGIN(FileType.SITE_PLUGIN_VALUE, "SITE/PLUG"), // 站点扩展图片存放位置 + SITE_LOGO(FileType.SITE_ICON_VALUE, "SITE/LOGO");// 站点相关图片,如站点logo + + int type; + String pth; + + SiteFileType(int type, String pth) { + this.type = type; + this.pth = pth; + } + + public int getType() { + return this.type; + } + + public String getPth() { + return this.pth; + } + + public static String getFilePthByType(int type) { + for (SiteFileType file : SiteFileType.values()) { + if (type == file.getType()) { + return file.getPth(); + } + } + return null; + } + } +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/utils/HexUtils.java b/openzaly-business/src/main/java/com/akaxin/site/business/utils/HexUtils.java new file mode 100755 index 0000000..8cb9297 --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/utils/HexUtils.java @@ -0,0 +1,42 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.business.utils; + +/** + * byte数组与字符串之间转换 + */ +public class HexUtils { + + public static String bytesToHexString(byte[] b) { + StringBuffer returnValue = new StringBuffer(); + for (int i = 0; i < b.length; i++) { + String hex = Integer.toHexString(b[i] & 0xFF); + if (hex.length() == 1) { + hex = '0' + hex; + } + returnValue.append(hex.toUpperCase() + " "); + } + + return returnValue.toString(); + } + + public static void main(String[] args) { + String test = "你好,我是中国人"; + + System.out.println(bytesToHexString(test.getBytes())); + + } +} diff --git a/openzaly-business/src/main/java/com/akaxin/site/business/utils/StringRandomUtils.java b/openzaly-business/src/main/java/com/akaxin/site/business/utils/StringRandomUtils.java new file mode 100755 index 0000000..2e3fbdf --- /dev/null +++ b/openzaly-business/src/main/java/com/akaxin/site/business/utils/StringRandomUtils.java @@ -0,0 +1,22 @@ +package com.akaxin.site.business.utils; + +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; + +public class StringRandomUtils { + + private static final String STR_62_RANDOM = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + + // 随机生成N位字符串(A-Z,a-z,0-9) + public static String generateRandomString(int length) throws NoSuchAlgorithmException { + SecureRandom sRandom = SecureRandom.getInstance("SHA1PRNG"); + StringBuffer newRandomStr = new StringBuffer(); + for (int i = 0; i < length; ++i) { + int number = sRandom.nextInt(STR_62_RANDOM.length()); + newRandomStr.append(STR_62_RANDOM.charAt(number)); + } + return newRandomStr.toString(); + } + + +} diff --git a/openzaly-business/src/test/java/com/akaxin/site/business/test/TestHttpProto.java b/openzaly-business/src/test/java/com/akaxin/site/business/test/TestHttpProto.java new file mode 100755 index 0000000..3c69914 --- /dev/null +++ b/openzaly-business/src/test/java/com/akaxin/site/business/test/TestHttpProto.java @@ -0,0 +1,28 @@ +package com.akaxin.site.business.test; + +import java.io.IOException; + +import com.akaxin.common.http.ZalyHttpClient; +import com.akaxin.proto.core.PluginProto; + +public class TestHttpProto { + public static void main(String args[]) throws Exception { + testHttpPost(); + // testHttpGet(); + } + + private static byte[] testHttpPost() throws IOException { +// String pluginUrl = "http://192.168.1.106/siteMember/applyAddFriend"; +// String siteUserId = "test1111"; +// String requestParams = "Test"; +// PluginProto.ProxyPackage proxyPackage = PluginProto.ProxyPackage.newBuilder() +// .putProxyContent(PluginProto.ProxyKey.CLIENT_SITE_USER_ID_VALUE, siteUserId).setData(requestParams) +// .build(); +// byte[] httpResposne = ZalyHttpClient.getInstance().postBytes(pluginUrl, proxyPackage.toByteArray()); +// +// System.out.println("response = " + httpResposne.length); + + return null; + } + +} diff --git a/openzaly-common/.gitignore b/openzaly-common/.gitignore new file mode 100755 index 0000000..b83d222 --- /dev/null +++ b/openzaly-common/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/openzaly-common/pom.xml b/openzaly-common/pom.xml new file mode 100755 index 0000000..22d6e10 --- /dev/null +++ b/openzaly-common/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + + com.akaxin + openzaly-parent + 0.0.1 + + com.akaxin.common + openzaly-common + 0.0.1-RELEASE + + + + commons-codec + commons-codec + + + + org.apache.commons + commons-lang3 + + + + org.apache.commons + commons-collections4 + + + + com.akaxin.proto + openzaly-protobuf + 0.0.1-RELEASE + + + + org.bouncycastle + bcprov-jdk16 + + + + + com.belerweb + pinyin4j + 2.5.0 + + + + diff --git a/openzaly-common/src/main/java/com/akaxin/common/channel/ChannelManager.java b/openzaly-common/src/main/java/com/akaxin/common/channel/ChannelManager.java new file mode 100755 index 0000000..ccfb926 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/channel/ChannelManager.java @@ -0,0 +1,59 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.channel; + +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:26:34 + */ +public class ChannelManager { + + private static Map clientChannelSessions = new ConcurrentHashMap(); + + private ChannelManager() { + + } + + public static Map addChannelSession(String deviceId, ChannelSession channelSession) { + clientChannelSessions.put(deviceId, channelSession); + return clientChannelSessions; + } + + public static Map delChannelSession(String userId) { + clientChannelSessions.remove(userId); + return clientChannelSessions; + } + + public static ChannelSession getChannelSession(String deviceId) { + return clientChannelSessions.get(deviceId); + } + + public static Set getChannelSessionKeySet() { + return clientChannelSessions.keySet(); + } + + public static Map getChannelSessions() { + return clientChannelSessions; + } + + public static long getChannelSessionSize() { + return clientChannelSessions.size(); + } +} \ No newline at end of file diff --git a/openzaly-common/src/main/java/com/akaxin/common/channel/ChannelSession.java b/openzaly-common/src/main/java/com/akaxin/common/channel/ChannelSession.java new file mode 100755 index 0000000..fc89e77 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/channel/ChannelSession.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.channel; + +import com.akaxin.common.constant.RequestAction; + +import io.netty.channel.Channel; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:26:53 + */ +public class ChannelSession { + private String userId; // 用户在站点的siteUserId,每个站点id不同(区别globalUserId) + private String deviceId;// 用户当前设备号 + private Channel channel;// 用户当前连接的channel + private int ctype;// 1:IM 2:APi 3:WS + private long psnTime = 0;// 发送给用户PSN时间戳 + private long synFinTime = 0;// 用户同步消息结束时间 + + public ChannelSession(Channel channel) { + this.channel = channel; + } + + public ChannelSession(String userId, Channel channel) { + this.userId = userId; + this.channel = channel; + } + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public Channel getChannel() { + return channel; + } + + public void setChannel(Channel channel) { + this.channel = channel; + } + + public int getCtype() { + return ctype; + } + + public void setCtype(int ctype) { + this.ctype = ctype; + } + + public long getPsnTime() { + return psnTime; + } + + public void setPsnTime(long psnTime) { + this.psnTime = psnTime; + } + + public long getSynFinTime() { + return synFinTime; + } + + public void setSynFinTime(long synFinTime) { + this.synFinTime = synFinTime; + } + + public boolean detectPsn() { + return synFinTime <= psnTime; + } + + public void setActionForPsn(String action) { + if (RequestAction.IM_SYNC_FINISH.getName().equals(action)) { + this.synFinTime = System.currentTimeMillis(); + } else if (RequestAction.IM_STC_PSN.getName().equals(action)) { + this.psnTime = System.currentTimeMillis(); + } + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/channel/ChannelWriter.java b/openzaly-common/src/main/java/com/akaxin/common/channel/ChannelWriter.java new file mode 100755 index 0000000..4b90500 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/channel/ChannelWriter.java @@ -0,0 +1,108 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.channel; + +import java.util.HashMap; +import java.util.Map; + +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.proto.core.CoreProto; +import com.google.protobuf.ByteString; + +import io.netty.channel.Channel; +import io.netty.util.concurrent.Future; +import io.netty.util.concurrent.GenericFutureListener; + +/** + * write data to user, + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.11.10 14:06:11 + */ +public class ChannelWriter { + + public static void write(Channel channel, RedisCommand redisCommand) { + channel.writeAndFlush(redisCommand); + } + + public static void writeAndClose(final Channel channel, RedisCommand redisCommand) { + channel.writeAndFlush(redisCommand).addListener(new GenericFutureListener>() { + + @Override + public void operationComplete(Future future) throws Exception { + channel.close(); + } + }); + } + + public static void write(Channel channel, CommandResponse response) { + CoreProto.TransportPackageData.Builder packageDataBuilder = CoreProto.TransportPackageData.newBuilder(); + CoreProto.ErrorInfo errorInfo = CoreProto.ErrorInfo.newBuilder().setCode(response.getErrCode()) + .setInfo(String.valueOf(response.getErrInfo())).build(); + packageDataBuilder.setErr(errorInfo); + + Map header = new HashMap(); + header.put(CoreProto.HeaderKey.SITE_SERVER_VERSION_VALUE, CommandConst.SITE_VERSION); + packageDataBuilder.putAllHeader(header); + + if (response.getParams() != null) { + packageDataBuilder.setData(ByteString.copyFrom(response.getParams())); + } + channel.writeAndFlush(new RedisCommand().add(response.getVersion()).add(response.getAction()) + .add(packageDataBuilder.build().toByteArray())); + } + + public static void writeAndClose(final Channel channel, CommandResponse response) { + CoreProto.TransportPackageData.Builder packageDataBuilder = CoreProto.TransportPackageData.newBuilder(); + CoreProto.ErrorInfo errorInfo = CoreProto.ErrorInfo.newBuilder().setCode(response.getErrCode()) + .setInfo(String.valueOf(response.getErrInfo())).build(); + packageDataBuilder.setErr(errorInfo); + + Map header = new HashMap(); + header.put(CoreProto.HeaderKey.SITE_SERVER_VERSION_VALUE, CommandConst.SITE_VERSION); + packageDataBuilder.putAllHeader(header); + + if (response.getParams() != null) { + packageDataBuilder.setData(ByteString.copyFrom(response.getParams())); + } + channel.writeAndFlush(new RedisCommand().add(response.getVersion()).add(response.getAction()) + .add(packageDataBuilder.build().toByteArray())) + .addListener(new GenericFutureListener>() { + + @Override + public void operationComplete(Future future) throws Exception { + channel.close(); + } + }); + } + + public static void writeByDeviceId(String deviceId, CommandResponse commandResponse) { + ChannelSession channelSession = ChannelManager.getChannelSession(deviceId); + if (channelSession != null && channelSession.getChannel() != null) { + write(channelSession.getChannel(), commandResponse); + } + } + + public static void writeByDeviceId(String deviceId, RedisCommand redisCommand) { + ChannelSession channelSession = ChannelManager.getChannelSession(deviceId); + if (channelSession != null && channelSession.getChannel() != null) { + write(channelSession.getChannel(), redisCommand); + } + } + +} \ No newline at end of file diff --git a/openzaly-common/src/main/java/com/akaxin/common/channel/WebChannelManager.java b/openzaly-common/src/main/java/com/akaxin/common/channel/WebChannelManager.java new file mode 100755 index 0000000..84d41be --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/channel/WebChannelManager.java @@ -0,0 +1,63 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.channel; + +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; + +import org.apache.commons.lang3.StringUtils; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:26:34 + */ +public class WebChannelManager { + + private static Map webChannelSessions = new ConcurrentHashMap(); + + private WebChannelManager() { + + } + + public static Map addChannelSession(String siteUserId, ChannelSession channelSession) { + webChannelSessions.put(siteUserId, channelSession); + return webChannelSessions; + } + + public static Map delChannelSession(String siteUserId) { + if (StringUtils.isNotEmpty(siteUserId)) { + webChannelSessions.remove(siteUserId); + } + return webChannelSessions; + } + + public static ChannelSession getChannelSession(String siteUserId) { + return webChannelSessions.get(siteUserId); + } + + public static Set getChannelSessionKeySet() { + return webChannelSessions.keySet(); + } + + public static Map getChannelSessionMap() { + return webChannelSessions; + } + + public static long getChannelSessionSize() { + return webChannelSessions.size(); + } +} \ No newline at end of file diff --git a/openzaly-common/src/main/java/com/akaxin/common/command/Command.java b/openzaly-common/src/main/java/com/akaxin/common/command/Command.java new file mode 100755 index 0000000..6dd39c2 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/command/Command.java @@ -0,0 +1,319 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.command; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.lang3.StringUtils; + +import com.akaxin.common.channel.ChannelSession; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.utils.StringHelper; + +import io.netty.channel.ChannelHandlerContext; + +/** + * 处理完成后的消息载体 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.09.30 + */ +public class Command { + private String siteUserId;// 执行者 + private String deviceId; + private String globalUserId; + private String rety; // request type,im/api/hai + private String service; + private String method; + private Map header; + private byte[] params; + private CommandResponse response; // response + + private boolean proxy;// 是否为代理请求 + + private Map fields = new HashMap(); + + public void setAction(String splitStrs) { + String[] splitStr = splitStrs.split("\\."); + this.rety = splitStr[0]; + this.service = splitStr[1]; + if (splitStr.length == 3) { + this.method = splitStr[2]; + } + } + + public String getAction() { + if ("im".equals(this.rety) || "api".equals(this.rety)) { + return this.rety + "." + this.service + "." + this.method; + } + return null; + } + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getSiteUserId() { + return siteUserId; + } + + public void setSiteUserId(String siteUserId) { + this.siteUserId = siteUserId; + } + + public String getGlobalUserId() { + return globalUserId; + } + + public void setGlobalUserId(String globalUserId) { + this.globalUserId = globalUserId; + } + + public String getRety() { + return rety; + } + + public void setRety(String rety) { + this.rety = rety; + } + + public String getService() { + return service; + } + + public void setService(String service) { + this.service = service; + } + + public String getMethod() { + return method; + } + + public void setMethod(String method) { + this.method = method; + } + + public String getUri() { + if ("hai".equals(this.rety)) { + return "/" + this.rety + "/" + this.service + "/" + this.method; + } + return null; + } + + public void setUri(String uri) { + uri = StringHelper.clearRepeated(uri, "/"); + String[] splitStr = uri.split("/"); + int index = splitStr.length - 3; + this.rety = splitStr[index]; + this.service = splitStr[index + 1]; + this.method = splitStr[index + 2]; + } + + public Map getHeader() { + return header; + } + + public void setHeader(Map header) { + this.header = header; + } + + public byte[] getParams() { + return params; + } + + public Command setParams(byte[] params) { + this.params = params; + return this; + } + + public Map getFields() { + return fields; + } + + @SuppressWarnings("unchecked") + public T getField(String k, Class t) { + Object obj = fields.get(k); + return obj == null ? null : (T) obj; + } + + public Command setFields(Map map) { + this.fields.putAll(map); + return this; + } + + public Command setField(String k, Object v) { + this.fields.put(k, v); + return this; + } + + public Command setClientVersion(String version) { + this.fields.put(CommandConst.CLIENT_VERSION, version); + return this; + } + + public String getClientVersion() { + return this.getField(CommandConst.CLIENT_VERSION, String.class); + } + + public int getProtoVersion() { + String v = this.getField(CommandConst.CLIENT_VERSION, String.class); + if (StringUtils.isNotEmpty(v)) { + String[] vstr = v.split("\\."); + if (vstr.length >= 3) { + return Integer.parseInt(vstr[2]); + } + } + return 0; + } + + public Command setSiteFriendId(String siteFriendId) { + this.fields.put(CommandConst.SITE_FRIEND_ID, siteFriendId); + return this; + } + + public String getSiteFriendId() { + return this.getField(CommandConst.SITE_FRIEND_ID, String.class); + } + + public Command setProxySiteUserId(String proxySiteUserId) { + this.fields.put(CommandConst.PROXY_SITE_USER_ID, proxySiteUserId); + return this; + } + + public String getProxySiteUserId() { + return this.getField(CommandConst.PROXY_SITE_USER_ID, String.class); + } + + public Command setSiteGroupId(String siteGroupId) { + this.fields.put(CommandConst.SITE_GROUP_ID, siteGroupId); + return this; + } + + public String getSiteGroupId() { + return this.getField(CommandConst.SITE_GROUP_ID, String.class); + } + + public Command setClientIp(String clientIp) { + this.fields.put(CommandConst.CLIENT_IP, clientIp); + return this; + } + + public String getClientIp() { + return this.getField(CommandConst.CLIENT_IP, String.class); + } + + public Command setPluginId(String pluginId) { + this.fields.put(CommandConst.PLUGIN_ID, pluginId); + return this; + } + + public String getPluginId() { + return this.getField(CommandConst.PLUGIN_ID, String.class); + } + + public Command setPluginAuthKey(String authKey) { + this.fields.put(CommandConst.PLUGIN_AUTH_KEY, authKey); + return this; + } + + public String getPluginAuthKey() { + return this.getField(CommandConst.PLUGIN_AUTH_KEY, String.class); + } + + public Command setMsgType(int msgType) { + this.fields.put(CommandConst.MSG_TYPE, msgType); + return this; + } + + public int getMsgType() { + return this.getField(CommandConst.MSG_TYPE, Integer.class); + } + + public Command setStartTime(long time) { + this.fields.put(CommandConst.START_TIME, time); + return this; + } + + public long getStartTime() { + Long time = this.getField(CommandConst.START_TIME, Long.class); + return time == null ? 0 : time; + } + + public Command setEndTime(long time) { + this.fields.put(CommandConst.END_TIME, time); + return this; + } + + public long getEndTime() { + Long time = this.getField(CommandConst.END_TIME, Long.class); + return time == null ? 0 : time; + } + + public boolean isProxy() { + return proxy; + } + + public void setProxy(boolean proxy) { + this.proxy = proxy; + } + + public Command setMasterDB(boolean isMaster) { + this.fields.put(CommandConst.IS_MASTER_DB, isMaster); + return this; + } + + public boolean isMasterDB() { + Boolean isMaster = this.getField(CommandConst.IS_MASTER_DB, Boolean.class); + return isMaster == null ? false : isMaster; + } + + public Command setChannelSession(ChannelSession channelSession) { + this.fields.put(CommandConst.CHAHHEL_SESSION, channelSession); + return this; + } + + public ChannelSession getChannelSession() { + return this.getField(CommandConst.CHAHHEL_SESSION, ChannelSession.class); + } + + public Command setChannelContext(ChannelHandlerContext channelContext) { + this.fields.put(CommandConst.CHANNEL_CONTEXT, channelContext); + return this; + } + + public ChannelHandlerContext getChannelContext() { + return this.getField(CommandConst.CHANNEL_CONTEXT, ChannelHandlerContext.class); + } + + public CommandResponse getResponse() { + return response; + } + + public void setResponse(CommandResponse response) { + this.response = response; + } + + public String toString() { + return StringHelper.format("cmd: siteUserId={} deviceId={} rety={} service={} method={} header={}", + this.siteUserId, this.deviceId, this.rety, this.service, this.method, this.header); + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/command/CommandResponse.java b/openzaly-common/src/main/java/com/akaxin/common/command/CommandResponse.java new file mode 100755 index 0000000..5f9023f --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/command/CommandResponse.java @@ -0,0 +1,112 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.command; + +import java.util.HashMap; +import java.util.Map; + +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.constant.IErrorCode; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:27:26 + */ +public class CommandResponse { + private String version; + private String action; + private byte[] params; + + private Map header = new HashMap(); + private String errCode; + private String errInfo = ""; + + public String getVersion() { + return version; + } + + public CommandResponse setVersion(String version) { + this.version = version; + return this; + } + + public String getAction() { + return action; + } + + public CommandResponse setAction(String action) { + this.action = action; + return this; + } + + public byte[] getParams() { + return params; + } + + public CommandResponse setParams(byte[] params) { + this.params = params; + return this; + } + + public Map getHeader() { + return header; + } + + public CommandResponse setHeader(Map header) { + this.header = header; + return this; + } + + public String getErrCode() { + return errCode; + } + + public CommandResponse setErrCode(String errCode) { + this.errCode = errCode; + return this; + } + + public CommandResponse setErrCode(IErrorCode errCode) { + this.errCode = errCode.getCode(); + this.errInfo = errCode.getInfo(); + return this; + } + + public CommandResponse setErrCode2(ErrorCode2 errCode2) { + this.errCode = errCode2.getCode(); + this.errInfo = errCode2.getInfo(); + return this; + } + + public String getErrInfo() { + return errInfo; + } + + public CommandResponse setErrInfo(String errInfo) { + this.errInfo = errInfo; + return this; + } + + public String getErrorCodeInfo() { + return "errCode=" + this.errCode + ",errInfo=" + this.errInfo; + } + + public String toString() { + return "[version=" + this.version + ",action=" + this.action + ",data=" + new String(this.params) + "]"; + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/command/RedisCommand.java b/openzaly-common/src/main/java/com/akaxin/common/command/RedisCommand.java new file mode 100755 index 0000000..b9bf6c9 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/command/RedisCommand.java @@ -0,0 +1,106 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.command; + +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.util.ArrayList; +import java.util.List; + +import com.akaxin.common.resp.AbstractParameter; +import com.akaxin.common.resp.RedisBytesParameter; +import com.akaxin.common.resp.RedisDoubleParameter; +import com.akaxin.common.resp.RedisIntegerParameter; +import com.akaxin.common.resp.RedisStringParameter; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:27:39 + */ +public class RedisCommand { + private static final Charset UTF8 = Charset.forName("UTF-8"); + private static final byte[] CRLF = "\r\n".getBytes(UTF8); + + private final List arguments = new ArrayList(); + + public RedisCommand() { + + } + + public RedisCommand add(int n) { + arguments.add(RedisIntegerParameter.of(n)); + return this; + } + + public RedisCommand add(String s) { + arguments.add(RedisStringParameter.of(s)); + return this; + } + + public RedisCommand add(long n) { + arguments.add(RedisIntegerParameter.of(n)); + return this; + } + + public RedisCommand add(double n) { + arguments.add(RedisDoubleParameter.of(n)); + return this; + } + + public RedisCommand add(byte[] value) { + arguments.add(RedisBytesParameter.of(value)); + return this; + } + + public RedisCommand addAll(List paramList) { + arguments.addAll(paramList); + return this; + } + + public void encode(ByteBuffer buf) { + buf.put((byte) '*'); + RedisIntegerParameter.writeInteger(buf, arguments.size()); + buf.put(CRLF); + for (AbstractParameter argument : arguments) { + argument.encode(buf); + } + + } + + public int getByteSize() { + int byteSize = CRLF.length + 1; + byteSize += RedisIntegerParameter.getIntegerByteSize(arguments.size()); + for (AbstractParameter argument : arguments) { + byteSize += argument.getSize(); + } + return byteSize + 10; + } + + public String getParameterByIndex(int i) { + if (i > arguments.size()) { + return null; + } + return arguments.get(i).getValue(); + } + + public byte[] getBytesParamByIndex(int i) { + if (i > arguments.size()) { + return null; + } + return arguments.get(i).getBytesValue(); + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/constant/CharsetCoding.java b/openzaly-common/src/main/java/com/akaxin/common/constant/CharsetCoding.java new file mode 100755 index 0000000..ed42bfb --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/constant/CharsetCoding.java @@ -0,0 +1,12 @@ +package com.akaxin.common.constant; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-03-23 14:21:52 + */ +public interface CharsetCoding { + String UTF_8 = "UTF-8"; + + String ISO_8859_1 = "ISO-8859-1"; +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/constant/CommandConst.java b/openzaly-common/src/main/java/com/akaxin/common/constant/CommandConst.java new file mode 100755 index 0000000..657f0d8 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/constant/CommandConst.java @@ -0,0 +1,57 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.constant; + +public interface CommandConst { + public String PROTOCOL_VERSION = "1.0";// 网络协议版本 + public String SITE_VERSION = "0.9.5";// 站点版本(特指proto版本) + + public String PROXY_SITE_USER_ID = "proxy_site_user_id"; + public String SITE_FRIEND_ID = "site_friend_id"; + public String SITE_GROUP_ID = "site_group_id"; + public String CHAHHEL_SESSION = "channel_session"; + public String CHANNEL_CONTEXT = "channel_context"; + public String CLIENT_IP = "client_ip"; + public String CLIENT_VERSION = "client_version"; + + public String MSG_TYPE = "msg_type"; + public String START_TIME = "start_time"; + public String END_TIME = "end_time"; + + public String IS_PROXY = "is_proxy"; + + public String IS_MASTER_DB = "is_master_db"; + + // plugin + public String PLUGIN_AUTH_KEY = "plugin_auth_key"; + public String PLUGIN_ID = "plugin_id"; + + public String IM_MSG_TOCLIENT = "im.stc.message"; + public String IM_MSG_TOSITE = "im.cts.message"; + + public String IM_MSG_FINISH = "im.msg.finish"; + + public String IM_STC_PSN = "im.stc.psn"; + + public String IM_NOTICE = "im.stc.notice"; + + public String API_PUSH_NOTIFICATION = "api.push.notification"; + public String API_PUSH_NOTIFICATIONS = "api.push.notifications"; + + public String API_PHONE_CONFIRETOKEN = "api.phone.confirmToken"; + + public String ACTION_RES = "_"; +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/constant/ConfigConst.java b/openzaly-common/src/main/java/com/akaxin/common/constant/ConfigConst.java new file mode 100755 index 0000000..502c5a6 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/constant/ConfigConst.java @@ -0,0 +1,20 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.constant; + +public interface ConfigConst { + public String DEFAULT_SITE_ADMIN = "ZALY_SHAOYE"; +} \ No newline at end of file diff --git a/openzaly-common/src/main/java/com/akaxin/common/constant/ErrorCode2.java b/openzaly-common/src/main/java/com/akaxin/common/constant/ErrorCode2.java new file mode 100755 index 0000000..0bd0d9b --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/constant/ErrorCode2.java @@ -0,0 +1,140 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.constant; + +/** + *
+ * 站点服务端的错误信息
+ * 		1.每个请求,成功状态只有一种状态
+ * 		2.错误需要提示用户使用code=error.alert,客户端能够展示错误信息
+ * 		3.其他错误使用code=error 客户端默认提示请求失败或者不展示错误提示
+ * 
+ * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-02 18:05:31 + */ +public enum ErrorCode2 implements IErrorCode { + SUCCESS("success", ""), // 操作成功 + + ERROR_SYSTEMERROR("error.alert", "系统异常"), // + ERROR_NOPERMISSION("error.alert", "用户无权限该操作"), // 用户无权限错误 + ERROR_UNSUPPORT_PROTOCOL("error.alert", "协议版本错误"), // 服务端不支持该功能 + ERROR_ILLEGALREQUEST("error.alert", "非法请求"), // 非法的请求 + ERROR_INVALIDPACKAGEACTION("error.alert", "无效的包名称"), // 无效的包action + ERROR_DATABASE_EXECUTE("error.alert", "数据库执行错误"), // 无效的包action + + ERROR_PARAMETER("error.alert", "请求参数错误"), // 请求参数错误 + ERROR_PARAMETER_NICKNAME("error.alert", "昵称长度错误"), // 昵称格式错误 + + ERROR_LOGINID_LENGTH("error.alert", "站点账号,格式错误"), // 昵称格式错误 + ERROR_LOGINID_EXIST("error.alert", "站点账号只允许设置一次"), // 昵称格式错误 + + ERROR_SESSION("error.session", "用户身份认证失败"), // session验证失败 + + ERROR_REGISTER("error.alert", "用户注册失败"), // 用户注册失败 + ERROR_REGISTER_USERID_UNIQUE("error.unique.sui", "用户ID已存在"), // 用户注册失败 + ERROR_REGISTER_SAVEPROFILE("error.alert", "保存用户数据失败"), // 用户注册失败 + ERROR_REGISTER_UIC("error.alert", "用户邀请码错误"), // 用户邀请码错误 + ERROR_REGISTER_PHONEID("error.alert", "用户实名手机号验证错误"), // 验证手机号失败 + ERROR_REGISTER_PHONETOKEN("error.phone.token", "用户实名认证失败"), // 验证手机号失败 + + ERROR2_MESSAGE_SEND_FAIL("error.alert", "消息发送失败"), // + + ERROR2_USER_NOUSER("error.nouser", "无该用户信息"), // + ERROR2_USER_SAVE_PUSHTOKEN("error.alert", "保存数据失败"), // + ERROR2_USER_UPDATE_PROFILE("error.alert", "更新数据库用户身份失败"), // + ERROR2_USER_NOLIST("error.alert", "暂无用户"), // + + ERROR2_USER_NO_FRIEND("error.no.friends", "用户暂无好友"), // + ERROR2_USER_NO_GROUP("error.no.groups", "用户暂无群组"), // + ERROR2_USER_AVATAR("error.user.avartar", "获取用户头像失败"), // + + ERROR2_FRIEND_IS("error.alert", "用户已经为好友关系"), // + ERROR2_FRIEND_APPLYSELF("error.alert", "用户不能添加自己为好友"), // + ERROR2_FRIEND_APPLYCOUNT("error.alert", "添加好友最多为5次"), // + ERROR2_FRIEND_sealUped("error.alert", "你已经被封禁,无法执行操作"), // + ERROR2_FRIEND_NOTALLOW("error.alert", "站点不支持添加好友功能"), // + + ERROR_GROUP_DELETED("error.group.deleted", "该群聊不存在"), // + ERROR_GROUP_WHEN_CREATE("error.alert", "创建群聊出错,请稍后重试"), // + ERROR_GROUP_QUERY_PROFILE("error.alert", "查询用户资料出错,请返回重试"), // + ERROR_GROUP_INVITE_CHAT_CLOSE("error.alert", "此群组只允许管理员邀请加入"), // + ERROR_GROUP_MAXMEMBERCOUNT("error.alert", "群人数已达到上限"), // 添加群成员,人数超过上限 + ERROR_GROUP_MEMBERLESS3("error.alert", "创建群成员少于三人"), // + ERROR2_GROUP_NOTALLOW("error.alert", "站点不支持创建群组功能"), // + ERROR2_GROUP_TOKEN_INVALID("error.alert", "群二维码已失效"), // + ERROR2_GROUP_TOKEN_EXPIRED("error.alert", "群二维码已过期"), // + ERROR2_GROUP_ISMEMBER("error.group.ismember", "用户已经是群成员"), // + + ERROR2_LOGGIN_USERID_EMPTY("error.alert", "用户身份为空"), // 用户身份校验失败 + ERROR2_LOGGIN_USERTOKEN_EMPTY("error.alert", "用户身份token为空"), // 用户usertoken + ERROR2_LOGGIN_DEVICEID_EMPTY("error.alert", "设备身份为空"), // 用户身份校验失败 + ERROR2_LOGGIN_UPDATE_DEVICE("error.alert", "更新设备失败"), // 更新设备失败 + ERROR2_LOGGIN_UPDATE_SESSION("error.alert", "保存session失败"), // 保存session + ERROR2_LOGGIN_ERRORSIGN("error.alert", "用户身份校验失败,请重新登陆"), // 用户身份校验失败 + ERROR2_LOGGIN_NOREGISTER("error.login.need_register", ""), // 用户需要在该站点注册 + ERROR2_LOGGIN_SEALUPUSER("error.alert", "当前用户无权登陆"), // 用户需要在该站点注册 + ERROR2_LOGGIN_UPDATENEWPUBK("error.alert", "更新用户新身份失败"), // 用户通过手机号修改公钥,这里更新失败 + + // ERROR2_IMAUTH_FAIL("error.alert", "im连接认证失败"), // 用户需要在该站点注册 + + ERROR2_FILE_DOWNLOAD("error.file.download", ""), // + + ERROR2_PHONE_SAME("error.phone.same", "本机身份已与此号码实名绑定"), // + ERROR2_PHONE_BIND_USER("error.phone.hasUser", "该手机号码已经绑定其他账号"), // + ERROR2_PHONE_EXIST("error.alert", "该手机号码已经绑定其他账号"), // + ERROR2_PHONE_REALNAME_EXIST("error.alert", "此账号已经绑定手机号码"), // + ERROR2_PHONE_VERIFYCODE("error.alert", "验证码验证失败"), // + ERROR2_PHONE_GETVERIFYCODE("error.alert", "获取验证码失败"), // + ERROR2_PHONE_FORMATTING("error.alert", "不支持的手机号"), // + ERROR2_PHONE_HAVE_NO("error.alert", "手机号不存在"), // + + ERROR2_PLUGIN_STATUS("error.alert", "扩展状态错误"), // + + ERROR2_SECRETCHAT_CLOSE("error.alert", "站点服务不支持绝密聊天"), // + + ERROR2_HTTP_URL("error.alert", "请求使用的url错误"), // + + ERROR("error.alert", "请求失败"); // 默认未知错误 + + private String code; + private String info; + + ErrorCode2(String code, String info) { + this.code = code; + this.info = info; + } + + @Override + public String getCode() { + return this.code; + } + + @Override + public String getInfo() { + return this.info; + } + + @Override + public boolean isSuccess() { + return "success".equals(this.code) ? true : false; + } + + @Override + public String toString() { + return "errCode:" + this.code + " errInfo:" + this.info; + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/constant/HttpUriAction.java b/openzaly-common/src/main/java/com/akaxin/common/constant/HttpUriAction.java new file mode 100755 index 0000000..ae55c10 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/constant/HttpUriAction.java @@ -0,0 +1,67 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.constant; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:28:44 + */ +public enum HttpUriAction { + HTTP_ACTION("akaxin-plugin-api", ""), // + + HAI_SITE_SERVICE("hai", "site"), // 站点配置服务 + + HAI_USER_SERVICE("hai", "user"), // 用户服务 + + HAI_GROUP_SERVICE("hai", "group"), // 群组服务 + + HAI_FRIEND_SERVICE("hai", "friend"), // 好友服务 + + HAI_MESSAGE_SERVICE("hai", "message"), // 好友服务 + + HAI_PUSH_SERVICE("hai", "push"), // push通知推送 + + HAI_UIC_SERVICE("hai", "uic"), // 邀请码服务 + + HAI_PLUGIN_SERVICE("hai", "plugin"), // 扩展服务 + + HAI_SESSION_SERVICE("hai", "session");// Session服务 + + private String rety; + private String service; + + HttpUriAction(String rety, String service) { + this.rety = rety; + this.service = service; + } + + public String getRety() { + return this.rety; + } + + public String getService() { + return this.service; + } + + public static HttpUriAction getUriActionEnum(String rety, String service) { + for (HttpUriAction hua : HttpUriAction.values()) { + if (hua.getService().equals(service)) { + return hua; + } + } + return null; + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/constant/IErrorCode.java b/openzaly-common/src/main/java/com/akaxin/common/constant/IErrorCode.java new file mode 100755 index 0000000..964071a --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/constant/IErrorCode.java @@ -0,0 +1,26 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.constant; + +public interface IErrorCode { + public String getCode(); + + public String getInfo(); + + public boolean isSuccess(); + + public String toString(); +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/constant/RequestAction.java b/openzaly-common/src/main/java/com/akaxin/common/constant/RequestAction.java new file mode 100755 index 0000000..77432e1 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/constant/RequestAction.java @@ -0,0 +1,89 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.constant; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:28:35 + */ +public enum RequestAction { + None(0, "none"), // none + + SITE(1, "site"), // + + IM(100, "im"), // im request + IM_SITE(101, "im.site"), // + IM_SITE_HELLO(102, "im.site.hello"), // + IM_SITE_AUTH(103, "im.site.auth"), // + + IM_CTS_PING(104, "im.cts.ping"), // 客户端发送的ping + IM_STC_PONG(105, "im.stc.pong"), // 服务端回复的pong + IM_CTS_MESSAGE(106, "im.cts.message"), // im.messag + IM_CTS_MESSAGE_U2(107, "im.cts.message.u2"), // 二人 + IM_CTS_MESSAGE_GROUP(108, "im.cts.message.group"), // 群组 + IM_STC_PSN(109, "im.stc.psn"), // 站点给客户端发送psn + IM_SYNC_MESSAGE(110, "im.sync.message"), // + IM_SYNC_FINISH(111, "im.sync.finish"), // + IM_STC_NOTICE(112, "im.stc.notice"), // 站点给客户端发送通知命令 + IM_SYNC_MSGSTATUS(113, "im.sync.msgStatus"), // + + API(200, "api"), // api request + API_SITE(201, "api.site"), // + API_SITE_CONFIG(202, "api.site.config"), // register + API_SITE_REGISTER(203, "api.site.register"), // register + API_SITE_LOGIN(204, "api.site.login"), // login + API_FRIEND(205, "friend"), // + API_GROUP(206, "group"), // + API_SECRETCHAT(207, "secretChat"), // + API_USER(208, "user"), // + API_DEVICE(209, "device"), // device + API_FILE(210, "file"), // file + API_PLUGIN(211, "plugin"); + + private int index; + private String name; + + RequestAction(int index, String name) { + this.index = index; + this.name = name; + } + + public int getIndex() { + return this.index; + } + + public String getName() { + return this.name; + } + + public static RequestAction getAction(String serviceName) { + for (RequestAction sName : RequestAction.values()) { + if (sName.getName().equals(serviceName)) { + return sName; + } + } + return None; + } + + public static RequestAction getService(int index) { + for (RequestAction sName : RequestAction.values()) { + if (sName.getIndex() == index) { + return sName; + } + } + return None; + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/crypto/AESCrypto.java b/openzaly-common/src/main/java/com/akaxin/common/crypto/AESCrypto.java new file mode 100755 index 0000000..a7d1daa --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/crypto/AESCrypto.java @@ -0,0 +1,104 @@ +package com.akaxin.common.crypto; + +import java.security.SecureRandom; + +import javax.crypto.Cipher; +import javax.crypto.KeyGenerator; +import javax.crypto.SecretKey; +import javax.crypto.spec.SecretKeySpec; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.constant.CharsetCoding; + +public class AESCrypto { + private static final Logger logger = LoggerFactory.getLogger(AESCrypto.class); + + /** + *
+	 * AES四种加密模式:
+	 * 	ECB模式:有利于并行计算
+	 * 	CBC模式:不容易攻击,安全性高于ECB模式,适合传输长度长的报文,是SSL,IPSec的标准,不利于并行计算
+	 * 	CFB模式:不利于并行计算
+	 * 	OFB模式:不利于并行计算
+	 * 
+ */ + public static final String ALGORITHM = "AES/ECB/PKCS5Padding"; + + /** + * 随机生成AES加密解密KEY + * + * @return + */ + public static byte[] generateTSKey() { + try { + KeyGenerator kg = KeyGenerator.getInstance("AES"); + kg.init(128); + SecretKey secretKey = kg.generateKey(); + return secretKey.getEncoded(); + } catch (Exception e) { + logger.error("generate ts key error", e); + } + return null; + } + + /** + * 通过key生成AES加密解密key + * + * @param key + * @return + */ + public static byte[] generateTSKey(String key) { + try { + KeyGenerator kgen = KeyGenerator.getInstance("AES"); + SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG"); + secureRandom.setSeed(key.getBytes(CharsetCoding.ISO_8859_1)); + kgen.init(128, secureRandom); + SecretKey secretKey = kgen.generateKey(); + return secretKey.getEncoded(); + } catch (Exception e) { + logger.error("generate ts key error by key=" + key, e); + } + return null; + } + + /** + * 加密内容 + * + * @param tsk + * @param content + * @return + */ + public static byte[] encrypt(byte[] tsk, byte[] content) { + try { + SecretKeySpec key = new SecretKeySpec(tsk, "AES"); + Cipher cipher = Cipher.getInstance(ALGORITHM);// 创建密码器 + cipher.init(Cipher.ENCRYPT_MODE, key);// 初始化 + return cipher.doFinal(content); + } catch (Exception e) { + logger.error("aes encrypt error tsk-size={} content-size={}", tsk.length, content.length); + } + return null; + } + + /** + * 解密内容 + * + * @param tsk + * @param content + * @return + */ + public static byte[] decrypt(byte[] tsk, byte[] content) { + try { + SecretKeySpec key = new SecretKeySpec(tsk, "AES"); + Cipher cipher = Cipher.getInstance(ALGORITHM);// 创建密码器 + cipher.init(Cipher.DECRYPT_MODE, key);// 初始化 + return cipher.doFinal(content); + } catch (Exception e) { + logger.error("AES decrypt error,tsk-len={} content-len={}", tsk.length, content.length); + } + return null; + } + +} \ No newline at end of file diff --git a/openzaly-common/src/main/java/com/akaxin/common/crypto/HashCrypto.java b/openzaly-common/src/main/java/com/akaxin/common/crypto/HashCrypto.java new file mode 100755 index 0000000..7e4e23b --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/crypto/HashCrypto.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.crypto; + +import org.apache.commons.codec.binary.Hex; +import org.apache.commons.codec.digest.DigestUtils; + +/** + * SHA1 && MD5 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:30:50 + */ +public class HashCrypto { + + public static String SHA1(String key) { + byte[] data = DigestUtils.sha1(key); + return Hex.encodeHexString(data); + } + + public static byte[] SHA1Bytes(String key) { + return DigestUtils.sha1(key); + } + + public static String MD5(String key) { + byte[] md5Data = DigestUtils.md5(key); + return Hex.encodeHexString(md5Data); + } + + public static byte[] MD5Bytes(String key) { + return DigestUtils.md5(key); + } + +} \ No newline at end of file diff --git a/openzaly-common/src/main/java/com/akaxin/common/crypto/RSACrypto.java b/openzaly-common/src/main/java/com/akaxin/common/crypto/RSACrypto.java new file mode 100755 index 0000000..1fe9484 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/crypto/RSACrypto.java @@ -0,0 +1,130 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.crypto; + +import java.io.IOException; +import java.io.StringReader; +import java.io.StringWriter; +import java.security.Key; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.Security; + +import javax.crypto.Cipher; + +import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.bouncycastle.openssl.PEMReader; +import org.bouncycastle.openssl.PEMWriter; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class RSACrypto { + private static final Logger logger = LoggerFactory.getLogger(RSACrypto.class); + private static final String ALGORITHM = "RSA/ECB/PKCS1Padding"; + + // 生成keypair + public static KeyPair buildRSAKeyPair() throws NoSuchAlgorithmException { + KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA"); + keyPairGenerator.initialize(1024); + return keyPairGenerator.genKeyPair(); + } + + public static byte[] encrypt(Key key, String content) throws Exception { + Cipher cipher = Cipher.getInstance(ALGORITHM); + cipher.init(Cipher.ENCRYPT_MODE, key); + return cipher.doFinal(content.getBytes()); + } + + public static byte[] encrypt(Key key, byte[] content) throws Exception { + Cipher cipher = Cipher.getInstance(ALGORITHM); + cipher.init(Cipher.ENCRYPT_MODE, key); + return cipher.doFinal(content); + } + + public static byte[] decrypt(Key key, byte[] encrypted) throws Exception { + Cipher cipher = Cipher.getInstance(ALGORITHM); + cipher.init(Cipher.DECRYPT_MODE, key); + return cipher.doFinal(encrypted); + } + + /** + * RSA转换成PEM格式 + * + * @param key + * @return + */ + public static String getPEMFromRSAKey(Key key) { + StringWriter pemStrWriter = new StringWriter(); + PEMWriter pemWriter = new PEMWriter(pemStrWriter); + try { + pemWriter.writeObject(key); + } catch (IOException e) { + logger.error("get pem from rsa key error.", e); + } finally { + try { + if (pemWriter != null) { + pemWriter.close(); + } + } catch (IOException e) { + logger.error("close pemwriter error.", e); + } + } + return pemStrWriter.toString(); + } + + public static PrivateKey getRSAPriKeyFromPem(String pem) { + PEMReader pemReader = new PEMReader(new StringReader(pem)); + PrivateKey key = null; + try { + Security.addProvider(new BouncyCastleProvider()); + key = (PrivateKey) pemReader.readObject(); + } catch (Exception e) { + logger.error("get RSA private key from pem error.", e); + } finally { + try { + if (pemReader != null) { + pemReader.close(); + } + } catch (Exception ec) { + logger.error("cloase pem reader error.", ec); + } + } + return key; + } + + public static PublicKey getRSAPubKeyFromPem(String pem) { + PEMReader pemReader = new PEMReader(new StringReader(pem)); + PublicKey key = null; + try { + Security.addProvider(new BouncyCastleProvider()); + key = (PublicKey) pemReader.readObject(); + } catch (Exception e) { + logger.error("get RSA public key from pem error.", e); + } finally { + try { + if (pemReader != null) { + pemReader.close(); + } + } catch (Exception ec) { + logger.error("close pem reader error.", ec); + } + } + return key; + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/exceptions/ZalyException.java b/openzaly-common/src/main/java/com/akaxin/common/exceptions/ZalyException.java new file mode 100755 index 0000000..4add708 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/exceptions/ZalyException.java @@ -0,0 +1,41 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.exceptions; + +import com.akaxin.common.constant.IErrorCode; + +/** + * 自定义API请求过程中产生的特殊异常 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-09 12:32:08 + */ +public class ZalyException extends Exception { + /** + * + */ + private static final long serialVersionUID = 1L; + private IErrorCode errCode; + + public ZalyException(IErrorCode errCode) { + super(errCode.toString()); + this.errCode = errCode; + } + + public IErrorCode getErrCode() { + return this.errCode; + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/exceptions/ZalyException2.java b/openzaly-common/src/main/java/com/akaxin/common/exceptions/ZalyException2.java new file mode 100755 index 0000000..5af5580 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/exceptions/ZalyException2.java @@ -0,0 +1,40 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.exceptions; + +import com.akaxin.common.constant.IErrorCode; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-05-26 13:31:49 + */ +public class ZalyException2 extends Throwable { + /** + * + */ + private static final long serialVersionUID = 1L; + private IErrorCode errCode; + + public ZalyException2(IErrorCode errCode) { + super(errCode.toString()); + this.errCode = errCode; + } + + public IErrorCode getErrCode() { + return this.errCode; + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/executor/AbstracteExecutor.java b/openzaly-common/src/main/java/com/akaxin/common/executor/AbstracteExecutor.java new file mode 100755 index 0000000..8c449f6 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/executor/AbstracteExecutor.java @@ -0,0 +1,50 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.executor; + +import java.util.HashMap; +import java.util.Map; + +import com.akaxin.common.executor.chain.handler.IHandler; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:31:26 + * @param + */ +public abstract class AbstracteExecutor implements IExecutor { + + protected Map> executors = new HashMap>(); + protected Map> regexExecutors = new HashMap>(); + + public abstract R execute(String name, T t); + + public AbstracteExecutor addChain(String name, IHandler chain) { + executors.put(name, chain); + return this; + } + + public AbstracteExecutor addRegexChain(String regexName, IHandler regexChain) { + regexExecutors.put(regexName, regexChain); + return this; + } + + public IHandler getChain(String name) { + IHandler handler = executors.get(name); + return handler; + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/executor/IExecutor.java b/openzaly-common/src/main/java/com/akaxin/common/executor/IExecutor.java new file mode 100755 index 0000000..2355513 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/executor/IExecutor.java @@ -0,0 +1,20 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.executor; + +public interface IExecutor { + public R execute(String name, T t); +} \ No newline at end of file diff --git a/openzaly-common/src/main/java/com/akaxin/common/executor/SimpleExecutor.java b/openzaly-common/src/main/java/com/akaxin/common/executor/SimpleExecutor.java new file mode 100755 index 0000000..9865b3a --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/executor/SimpleExecutor.java @@ -0,0 +1,35 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.executor; + +import com.akaxin.common.executor.chain.handler.IHandler; + +/** + * 定义一个简单统一的执行器 + * + * @author Sam + * @since 2017.09.29 + * + */ +public class SimpleExecutor extends AbstracteExecutor { + + @Override + public R execute(String name, T t) { + IHandler chain = getChain(name); + return chain.handle(t); + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/executor/chain/AbstractHandlerChain.java b/openzaly-common/src/main/java/com/akaxin/common/executor/chain/AbstractHandlerChain.java new file mode 100755 index 0000000..6477b6f --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/executor/chain/AbstractHandlerChain.java @@ -0,0 +1,40 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.executor.chain; + +import java.util.ArrayList; +import java.util.List; + +import com.akaxin.common.executor.chain.handler.IHandler; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:24:59 + */ +public abstract class AbstractHandlerChain implements IHandler { + + private List> handlers = new ArrayList>(); + + public abstract R handle(T t); + + public boolean addHandler(IHandler handler) { + return handlers.add(handler); + } + + public List> getHandlers() { + return handlers; + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/executor/chain/CustomRHandlerChain.java b/openzaly-common/src/main/java/com/akaxin/common/executor/chain/CustomRHandlerChain.java new file mode 100755 index 0000000..852da5e --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/executor/chain/CustomRHandlerChain.java @@ -0,0 +1,38 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.executor.chain; + +import com.akaxin.common.executor.chain.handler.IHandler; + +/** + * 自定义返回值的handler + * + * @author Sam + * @since 2017-09.30 + * @param + */ +public class CustomRHandlerChain extends AbstractHandlerChain { + + @Override + public R handle(T t) { + + for (IHandler handler : getHandlers()) { + return handler.handle(t); + } + return null; + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/executor/chain/SimpleHandlerChain.java b/openzaly-common/src/main/java/com/akaxin/common/executor/chain/SimpleHandlerChain.java new file mode 100755 index 0000000..d21089c --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/executor/chain/SimpleHandlerChain.java @@ -0,0 +1,45 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.executor.chain; + +import com.akaxin.common.executor.chain.handler.IHandler; + +/** + *
+ * 	简单的来说(Chain中每个Handler的返回值)
+ * 		返回true,此条消息链才算处理成功,继续执行
+ * 		返回false,则消息链终止执行,返回false
+ * 
+ * + * @author Sam + * @since 2017-09.30 + * @param + */ +public class SimpleHandlerChain extends AbstractHandlerChain { + + @Override + public Boolean handle(T t) { + // hander.handle(t) == false ,return fasle and break + // hander.handle(t) == true ,return true and go on + for (IHandler handler : getHandlers()) { + if (!handler.handle(t)) { + return false; + } + } + return true; + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/executor/chain/handler/IHandler.java b/openzaly-common/src/main/java/com/akaxin/common/executor/chain/handler/IHandler.java new file mode 100755 index 0000000..983129c --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/executor/chain/handler/IHandler.java @@ -0,0 +1,14 @@ +package com.akaxin.common.executor.chain.handler; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-03-28 18:47:49 + * @param + * 执行参数的类型 + * @param + * 返回类型的参数 + */ +public interface IHandler { + public R handle(T t); +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/executor/chain/handler/MethodReflectHandler.java b/openzaly-common/src/main/java/com/akaxin/common/executor/chain/handler/MethodReflectHandler.java new file mode 100755 index 0000000..ccb8b2f --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/executor/chain/handler/MethodReflectHandler.java @@ -0,0 +1,60 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.executor.chain.handler; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:26:07 + * @param + */ +public class MethodReflectHandler implements IHandler { + private static final Logger logger = LoggerFactory.getLogger(MethodReflectHandler.class); + + @SuppressWarnings("unchecked") + public R handle(T t) { + try { + Command cmd = (Command) t; + String methodName = cmd.getMethod(); + + Method m = this.getClass().getDeclaredMethod(methodName, cmd.getClass()); + Object result = m.invoke(this, t); + + if (result != null) { + return (R) result; + } + } catch (NoSuchMethodException e) { + logger.error("method handler NoSuchMethod error.", e); + } catch (SecurityException e) { + logger.error("method handler Security error.", e); + } catch (IllegalAccessException e) { + logger.error("method handler IllegalAccess error.", e); + } catch (IllegalArgumentException e) { + logger.error("method handler IllegalArgument error.", e); + } catch (InvocationTargetException e) { + logger.error("method handler InvocationTarget error.", e); + } + return null; + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/http/ZalyHttpClient.java b/openzaly-common/src/main/java/com/akaxin/common/http/ZalyHttpClient.java new file mode 100755 index 0000000..a307ecf --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/http/ZalyHttpClient.java @@ -0,0 +1,105 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.http; + +import java.io.IOException; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.squareup.okhttp.MediaType; +import com.squareup.okhttp.OkHttpClient; +import com.squareup.okhttp.Request; +import com.squareup.okhttp.RequestBody; +import com.squareup.okhttp.Response; +import com.squareup.okhttp.ResponseBody; + +public class ZalyHttpClient { + private static final Logger logger = LoggerFactory.getLogger(ZalyHttpClient.class); + private static final MediaType JSON = MediaType.parse("application/json; charset=utf-8"); + private static final OkHttpClient httpClient = new OkHttpClient(); + + private static ZalyHttpClient instance = new ZalyHttpClient(); + + private ZalyHttpClient() { + } + + public static ZalyHttpClient getInstance() { + return instance; + } + + public byte[] get(String url) throws Exception { + ResponseBody body = null; + try { + Request request = new Request.Builder().url(url).build(); + Response response = httpClient.newCall(request).execute(); + if (response.isSuccessful()) { + body = response.body(); + byte[] res = body.bytes(); + return res; + } else { + logger.error("http get url={} error.{}", url, response.message()); + } + } finally { + if (body != null) { + body.close(); + } + } + return null; + } + + public byte[] postString(String url, String json) throws IOException { + ResponseBody body = null; + try { + RequestBody postBody = RequestBody.create(JSON, json); + Request request = new Request.Builder().url(url).post(postBody).build(); + Response response = httpClient.newCall(request).execute(); + if (response.isSuccessful()) { + body = response.body(); + byte[] res = body.bytes(); + return res; + } else { + logger.error("http post error.{}", response.message()); + } + } finally { + if (body != null) { + body.close(); + } + } + return null; + } + + public byte[] postBytes(String url, byte[] bytes) throws IOException { + ResponseBody body = null; + try { + RequestBody postBody = RequestBody.create(JSON, bytes); + Request request = new Request.Builder().url(url).post(postBody).build(); + Response response = httpClient.newCall(request).execute(); + if (response.isSuccessful()) { + body = response.body(); + byte[] res = body.bytes(); + return res; + } else { + logger.error("http post error.{}", response.message()); + } + } finally { + if (body != null) { + body.close(); + } + } + return null; + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/logs/AkxLog4jManager.java b/openzaly-common/src/main/java/com/akaxin/common/logs/AkxLog4jManager.java new file mode 100755 index 0000000..a70f25f --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/logs/AkxLog4jManager.java @@ -0,0 +1,69 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.logs; + +import java.util.Enumeration; + +import org.apache.log4j.Level; +import org.apache.log4j.Logger; + +/** + *
+ * 	管理log4j相关设置
+ * 		1.日志等级的动态修改
+ * 		2.其他
+ * 
+ * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-03-26 17:03:37 + */ +public class AkxLog4jManager { + private static Logger logger = Logger.getLogger(AkxLog4jManager.class); + + public static Level getLogLevel() { + Logger rootLogger = Logger.getRootLogger(); + return rootLogger.getLevel(); + } + + // 设置日志级别 + public static void setLogLevel(Level level) { + try { + Logger rootLogger = Logger.getRootLogger(); + if (rootLogger.getLevel() == level) { + return; + } + rootLogger.setLevel(level); + Enumeration logEnum = getAllLogger(); + while (logEnum.hasMoreElements()) { + Logger logger = logEnum.nextElement(); + logger.setLevel(level); + } + logger.info("set site server log_level=" + level); + } catch (Exception e) { + logger.error("update log4j level=" + level + " error", e); + } + logger.info("update log4j level=" + level + " finish"); + } + + // 获取所有的日志logger + public static Enumeration getAllLogger() { + Logger rootLogger = Logger.getRootLogger(); + @SuppressWarnings("unchecked") + Enumeration logEnum = rootLogger.getLoggerRepository().getCurrentLoggers(); + return logEnum; + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/logs/LogCreater.java b/openzaly-common/src/main/java/com/akaxin/common/logs/LogCreater.java new file mode 100755 index 0000000..6292834 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/logs/LogCreater.java @@ -0,0 +1,101 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.logs; + +import org.apache.commons.lang3.StringUtils; +import org.apache.log4j.DailyRollingFileAppender; +import org.apache.log4j.FileAppender; +import org.apache.log4j.Logger; +import org.apache.log4j.PatternLayout; +import org.apache.log4j.RollingFileAppender; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:31:53 + */ +public class LogCreater { + + // 默认当前目录下 + public static Logger createLogger(String logName) { + return createLogger(logName, null, new PatternLayout(), false, false); + } + + // 指定目录logPath下 + public static Logger createLogger(String logName, String logPath) { + return createLogger(logName, logPath, new PatternLayout(), false, false); + } + + // 当前目录下每天创建一个日志 + public static Logger createTimeLogger(String logName) { + return createLogger(logName, null, new PatternLayout("[%p] %d [%c] \r\n\t%m%n"), false, true); + } + + // 指定目录下每天创建一个日志 + public static Logger createTimeLogger(String logName, String logPath) { + return createLogger(logName, logPath, new PatternLayout("[%p] %d [%c] \r\n\t%m%n"), false, true); + } + + /** + * + * @param logName + * log文件名称 + * @param logPath + * log路径 + * @param layout + * log布局 + * @param additivity + * 子类appender是否集成父类appender + * @param isDailyMode + * 是否按天来记录 + * @return + */ + public static Logger createLogger(String logName, String logPath, PatternLayout layout, boolean additivity, + boolean isDailyMode) { + Logger createdLogger = Logger.getLogger(logName); + try { + String logFileName = null; + if (StringUtils.isEmpty(logPath)) { + logFileName = logName + ".log"; + } else if (logPath.endsWith("/")) { + logFileName = logPath + logName + ".log"; + } else { + logFileName = logPath + "/" + logName + ".log"; + } + + FileAppender fileAppender = null; + if (isDailyMode) { + fileAppender = new DailyRollingFileAppender(layout, logFileName, "'.'yyyy-MM-dd"); + } else { + fileAppender = new RollingFileAppender(layout, logFileName, true); + RollingFileAppender rollingAppender = (RollingFileAppender) fileAppender; + rollingAppender.setMaxFileSize("200MB"); + rollingAppender.setMaxBackupIndex(5); + } + // do not need bufferedIO + // fileAppender.setBufferedIO(true); + // fileAppender.setBufferSize(8192); + + createdLogger = Logger.getLogger(logName); + createdLogger.removeAllAppenders(); + createdLogger.setAdditivity(additivity); + createdLogger.addAppender(fileAppender); + } catch (Exception e) { + throw new RuntimeException("create logger error", e); + } + return createdLogger; + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/logs/LogUtils.java b/openzaly-common/src/main/java/com/akaxin/common/logs/LogUtils.java new file mode 100755 index 0000000..7e60e81 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/logs/LogUtils.java @@ -0,0 +1,83 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.logs; + +import org.slf4j.Logger; +import org.slf4j.helpers.FormattingTuple; +import org.slf4j.helpers.MessageFormatter; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.utils.StringHelper; + +/** + * 封装log,针对网络日志以及数据库操作日志 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-25 16:13:00 + */ +public class LogUtils extends LogCreater { + + public static void requestInfoLog(Logger logger, Command command, String messagePattern, Object... objects) { + FormattingTuple format = MessageFormatter.arrayFormat(messagePattern, objects); + logger.info("client={} siteUserId={} action={} msg={}", command.getClientIp(), command.getSiteUserId(), + command.getAction(), command.toString(), format.getMessage()); + return; + } + + public static void requestDebugLog(Logger logger, Command command, String requestStr) { + logger.debug("client={} siteUserId={} action={} command={} request={}", command.getClientIp(), + command.getSiteUserId(), command.getAction(), command.toString(), requestStr); + } + + public static void requestErrorLog(Logger logger, Command command, Throwable t) { + logger.error(StringHelper.format("client={} siteUserId={} action={} uri={} error", command.getClientIp(), + command.getSiteUserId(), command.getAction(), command.getUri()), t); + } + + public static void requestErrorLog(Logger logger, Command command, Class clazz, Throwable t) { + logger.error(StringHelper.format("client={} siteUserId={} action={} uri={} {} error", command.getClientIp(), + command.getSiteUserId(), command.getAction(), command.getUri(), clazz.getClass().getName()), t); + } + + public static void requestResultLog(Logger logger, Command command, CommandResponse response) { + try { + logger.info("client={} clientVersion={} siteUserId={} action={} uri={} cost={}ms result=[{}]", + command.getClientIp(), command.getClientVersion(), command.getSiteUserId(), command.getAction(), + command.getUri(), System.currentTimeMillis() - command.getStartTime(), response.getErrorCodeInfo()); + } catch (Exception e) { + logger.error(StringHelper.format("request result log error command={} response={}", command, response), e); + } + } + + public static void dbDebugLog(Logger logger, long startTime, Object result, String sql, Object... objects) { + String messagePattern = sql.replace("?", "{}"); + FormattingTuple format = MessageFormatter.arrayFormat(messagePattern, objects); + logger.debug("[openzaly-db] cost:{}ms result:{} sql:{}", System.currentTimeMillis() - startTime, result, + format.getMessage()); + } + + public static void info(org.apache.log4j.Logger logger, String messagePattern, Object object) { + FormattingTuple format = MessageFormatter.format(messagePattern, object); + logger.info(format.getMessage()); + } + + public static void info(org.apache.log4j.Logger logger, String messagePattern, Object... objects) { + FormattingTuple format = MessageFormatter.arrayFormat(messagePattern, objects); + logger.info(format.getMessage()); + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/netty/IRedisCommandResponse.java b/openzaly-common/src/main/java/com/akaxin/common/netty/IRedisCommandResponse.java new file mode 100755 index 0000000..86350a5 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/netty/IRedisCommandResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.netty; + +import com.akaxin.common.command.RedisCommand; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-19 17:35:20 + * @param + */ +public interface IRedisCommandResponse { + + public RedisCommand getRedisCommand(); + + public boolean isSuccess(); + + public String getErrInfo(); + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/netty/NettyClient2.java b/openzaly-common/src/main/java/com/akaxin/common/netty/NettyClient2.java new file mode 100755 index 0000000..54c53b5 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/netty/NettyClient2.java @@ -0,0 +1,188 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.netty; + +import java.util.concurrent.TimeUnit; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.netty.codec.MessageDecoder; +import com.akaxin.common.netty.codec.MessageEncoder; + +import io.netty.bootstrap.Bootstrap; +import io.netty.channel.Channel; +import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelInitializer; +import io.netty.channel.ChannelOption; +import io.netty.channel.ChannelPromise; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.socket.nio.NioSocketChannel; +import io.netty.handler.timeout.IdleStateHandler; +import io.netty.handler.timeout.WriteTimeoutHandler; +import io.netty.util.concurrent.DefaultPromise; +import io.netty.util.concurrent.FailedFuture; +import io.netty.util.concurrent.Future; +import io.netty.util.concurrent.GenericFutureListener; +import io.netty.util.concurrent.GlobalEventExecutor; +import io.netty.util.concurrent.Promise; +import io.netty.util.concurrent.SucceededFuture; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-19 18:14:16 + */ +public class NettyClient2 { + private static final Logger logger = LoggerFactory.getLogger(NettyClient2.class); + private volatile ChannelPromise channelPromise; + private EventLoopGroup eventLoopGroup = new NioEventLoopGroup(1); + private final Bootstrap clientBoot = new Bootstrap(); + private Promise responsePromise; + private static final Exception CONNECT_EXCEPTION = new Exception("client connect to server error"); + private NettyClientHandler nettyClientHandler; + + public NettyClient2() { + try { + clientBoot.option(ChannelOption.TCP_NODELAY, true); + clientBoot.group(eventLoopGroup); + clientBoot.channel(NioSocketChannel.class); + clientBoot.option(ChannelOption.TCP_NODELAY, true); + clientBoot.handler(new ChannelInitializer() { + + @Override + protected void initChannel(Channel channel) throws Exception { + channel.pipeline().addLast(new MessageEncoder()); + channel.pipeline().addLast(new MessageDecoder()); + channel.pipeline().addLast("timeout", new IdleStateHandler(20, 20, 0, TimeUnit.SECONDS)); + channel.pipeline().addLast(new WriteTimeoutHandler(10, TimeUnit.SECONDS)); + + nettyClientHandler = new NettyClientHandler(NettyClient2.this); + channel.pipeline().addLast(nettyClientHandler); + } + + }); + } catch (Exception e) { + shutDownGracefully(); + logger.error("init netty client error.", e); + } + } + + public Future connect(String address, int port) { + final Future connectionFuture; + synchronized (clientBoot) { + if (this.channelPromise == null) { + try { + final ChannelFuture connectFuture = this.clientBoot.connect(address, port).sync(); + this.channelPromise = connectFuture.channel().newPromise(); + + } catch (Exception e) { + logger.error("connect to akaxin platform error.", e); + } + + } + // if (this.channelPromise != null) { + // logger.info("Finish this APNs connect isSuccess={} AND its channel + // isActive={}", + // this.channelPromise.isSuccess(), this.channelPromise.channel().isActive()); + // } + connectionFuture = this.channelPromise; + } + // logger.info("connect to server connectionFuture={}", connectionFuture); + return connectionFuture; + } + + public void shutDownGracefully() { + try { + if (eventLoopGroup != null) { + eventLoopGroup.shutdownGracefully(); + eventLoopGroup.terminationFuture().sync(); + } + // logger.info("=========shut down gracefully=========="); + } catch (InterruptedException e) { + logger.error("shutdown netty client error.", e); + } + } + + public Future sendRedisCommand(final RedisCommand redisCommand) { + final Future responseFuture; + // logger.info("send push message {} {} {}", channelPromise, + // channelPromise.isSuccess(), + // channelPromise.channel().isActive()); + if (channelPromise != null) { + final ChannelPromise readyPromise = this.channelPromise; + + final DefaultPromise responsePromise = new DefaultPromise( + readyPromise.channel().eventLoop()); + // 提交一个事件 + readyPromise.channel().eventLoop().submit(new Runnable() { + @Override + public void run() { + // 将这个结果赋值给responsePromise + NettyClient2.this.responsePromise = responsePromise; + } + }); + + readyPromise.channel().writeAndFlush(redisCommand).addListener(new GenericFutureListener() { + @Override + public void operationComplete(final ChannelFuture future) throws Exception { + if (!future.isSuccess()) { + // 如果失败了,直接将promise返回 + responsePromise.tryFailure(future.cause()); + logger.error("send push message error: {},cause={}", redisCommand, future.cause()); + } else { + // logger.info("write data to platform success"); + } + } + }); + responseFuture = responsePromise; + } else { + logger.error("send push error because client is not connected: {}", redisCommand.toString()); + responseFuture = new FailedFuture(GlobalEventExecutor.INSTANCE, CONNECT_EXCEPTION); + } + return responseFuture; + } + + // 提交一次tcp请求结果 + protected void handleResponse(final IRedisCommandResponse response) { + try { + this.responsePromise.setSuccess(response); + } catch (Exception e) { + logger.error("handlePushNotificationResponse error!", e); + } + } + + public void disconnect() { + // logger.info("close tcp socket, Disconnecting."); + synchronized (this.clientBoot) { + this.channelPromise = null; + final Future channelCloseFuture; + if (this.channelPromise != null) { + channelCloseFuture = this.channelPromise.channel().close(); + } else { + channelCloseFuture = new SucceededFuture(GlobalEventExecutor.INSTANCE, null); + } + channelCloseFuture.addListener(new GenericFutureListener>() { + @Override + public void operationComplete(final Future future) throws Exception { + NettyClient2.this.clientBoot.config().group().shutdownGracefully(); + } + }); + } + // logger.info("close netty tcp socket connection"); + } +} \ No newline at end of file diff --git a/openzaly-common/src/main/java/com/akaxin/common/netty/NettyClientHandler.java b/openzaly-common/src/main/java/com/akaxin/common/netty/NettyClientHandler.java new file mode 100755 index 0000000..e255ad7 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/netty/NettyClientHandler.java @@ -0,0 +1,80 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.netty; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.RedisCommand; +import com.akaxin.proto.core.CoreProto; + +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.SimpleChannelInboundHandler; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-19 18:54:30 + */ +public class NettyClientHandler extends SimpleChannelInboundHandler { + private static final Logger logger = LoggerFactory.getLogger(NettyClientHandler.class); + + private final NettyClient2 nettyClient; + + public NettyClientHandler(NettyClient2 nettyClient) { + this.nettyClient = nettyClient; + } + + @Override + public void channelActive(ChannelHandlerContext ctx) throws Exception { + } + + @Override + public void channelInactive(ChannelHandlerContext ctx) throws Exception { +// logger.info("------Close channel of tcp socket.-----"); + } + + @Override + protected void channelRead0(ChannelHandlerContext ctx, RedisCommand redisCmd) throws Exception { + String version = redisCmd.getParameterByIndex(0); + String action = redisCmd.getParameterByIndex(1); + byte[] params = redisCmd.getBytesParamByIndex(2); + + CoreProto.TransportPackageData packageData = CoreProto.TransportPackageData.parseFrom(params); + CoreProto.ErrorInfo errInfo = packageData.getErr(); + Command command = new Command(); + command.setHeader(packageData.getHeaderMap()); + command.setParams(packageData.getData().toByteArray()); + +// logger.info("netty client channel handler command={}", command.toString()); + + NettyClientHandler.this.nettyClient + .handleResponse(new RedisCommandResponse(redisCmd, errInfo.getCode(), errInfo.getInfo())); + } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { + if (cause != null) { + logger.error("netty client channel exeception happen.", cause); + } + ctx.close(); + } + + @Override + public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/netty/PlatformClientHandler.java b/openzaly-common/src/main/java/com/akaxin/common/netty/PlatformClientHandler.java new file mode 100755 index 0000000..fb79be8 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/netty/PlatformClientHandler.java @@ -0,0 +1,80 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.netty; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.RedisCommand; +import com.akaxin.proto.core.CoreProto; + +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.SimpleChannelInboundHandler; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-19 18:54:30 + */ +public class PlatformClientHandler extends SimpleChannelInboundHandler { + private static final Logger logger = LoggerFactory.getLogger(PlatformClientHandler.class); + + private final PlatformSSLClient nettyClient; + + public PlatformClientHandler(PlatformSSLClient nettyClient) { + this.nettyClient = nettyClient; + } + + @Override + public void channelActive(ChannelHandlerContext ctx) throws Exception { + } + + @Override + public void channelInactive(ChannelHandlerContext ctx) throws Exception { + // logger.info("------Close channel of tcp socket.-----"); + } + + @Override + protected void channelRead0(ChannelHandlerContext ctx, RedisCommand redisCmd) throws Exception { + String version = redisCmd.getParameterByIndex(0); + String action = redisCmd.getParameterByIndex(1); + byte[] params = redisCmd.getBytesParamByIndex(2); + + CoreProto.TransportPackageData packageData = CoreProto.TransportPackageData.parseFrom(params); + CoreProto.ErrorInfo errInfo = packageData.getErr(); + Command command = new Command(); + command.setHeader(packageData.getHeaderMap()); + command.setParams(packageData.getData().toByteArray()); + + // logger.info("netty client channel handler command={}", command.toString()); + + PlatformClientHandler.this.nettyClient + .handleResponse(new RedisCommandResponse(redisCmd, errInfo.getCode(), errInfo.getInfo())); + } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { + if (cause != null) { + logger.error("netty client channel exeception happen.", cause); + } + ctx.close(); + } + + @Override + public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/netty/PlatformSSLClient.java b/openzaly-common/src/main/java/com/akaxin/common/netty/PlatformSSLClient.java new file mode 100755 index 0000000..1f88c73 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/netty/PlatformSSLClient.java @@ -0,0 +1,195 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.netty; + +import java.util.concurrent.TimeUnit; + +import javax.net.ssl.SSLEngine; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.netty.codec.MessageDecoder; +import com.akaxin.common.netty.codec.MessageEncoder; +import com.akaxin.common.ssl.ZalySSLContext; + +import io.netty.bootstrap.Bootstrap; +import io.netty.channel.Channel; +import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelInitializer; +import io.netty.channel.ChannelOption; +import io.netty.channel.ChannelPromise; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.socket.nio.NioSocketChannel; +import io.netty.handler.ssl.SslContext; +import io.netty.handler.ssl.SslHandler; +import io.netty.handler.timeout.IdleStateHandler; +import io.netty.handler.timeout.WriteTimeoutHandler; +import io.netty.util.concurrent.DefaultPromise; +import io.netty.util.concurrent.FailedFuture; +import io.netty.util.concurrent.Future; +import io.netty.util.concurrent.GenericFutureListener; +import io.netty.util.concurrent.GlobalEventExecutor; +import io.netty.util.concurrent.Promise; +import io.netty.util.concurrent.SucceededFuture; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-19 18:14:16 + */ +public class PlatformSSLClient { + private static final Logger logger = LoggerFactory.getLogger(PlatformSSLClient.class); + private volatile ChannelPromise channelPromise; + private EventLoopGroup eventLoopGroup = new NioEventLoopGroup(1); + private final Bootstrap clientBoot = new Bootstrap(); + private Promise responsePromise; + private static final Exception CONNECT_EXCEPTION = new Exception("client connect to server error"); + private PlatformClientHandler nettyClientHandler; + + private String peerHost; + private int peerPort; + + public PlatformSSLClient() { + try { + clientBoot.option(ChannelOption.TCP_NODELAY, true); + clientBoot.group(eventLoopGroup); + clientBoot.channel(NioSocketChannel.class); + clientBoot.option(ChannelOption.TCP_NODELAY, true); + clientBoot.handler(new ChannelInitializer() { + + @Override + protected void initChannel(Channel channel) throws Exception { + // use ssl + SslContext sslContext = ZalySSLContext.getSSLContext(); + SSLEngine sslEngine = sslContext.newEngine(channel.alloc(), peerHost, peerPort); + channel.pipeline().addLast(new SslHandler(sslEngine)); + + channel.pipeline().addLast(new MessageEncoder()); + channel.pipeline().addLast(new MessageDecoder()); + channel.pipeline().addLast("timeout", new IdleStateHandler(20, 20, 0, TimeUnit.SECONDS)); + channel.pipeline().addLast(new WriteTimeoutHandler(10, TimeUnit.SECONDS)); + + nettyClientHandler = new PlatformClientHandler(PlatformSSLClient.this); + channel.pipeline().addLast(nettyClientHandler); + } + + }); + } catch (Exception e) { + shutDownGracefully(); + logger.error("init netty client error.", e); + } + } + + public Future connect(String address, int port) { + final Future connectionFuture; + this.peerHost = address; + this.peerPort = port; + + synchronized (clientBoot) { + if (this.channelPromise == null) { + try { + final ChannelFuture connectFuture = this.clientBoot.connect(address, port).sync(); + this.channelPromise = connectFuture.channel().newPromise(); + + } catch (Exception e) { + logger.error("connect to akaxin platform error.", e); + } + + } + connectionFuture = this.channelPromise; + } + // logger.info("connect to server connectionFuture={}", connectionFuture); + return connectionFuture; + } + + public void shutDownGracefully() { + try { + if (eventLoopGroup != null) { + eventLoopGroup.shutdownGracefully(); + eventLoopGroup.terminationFuture().sync(); + } + } catch (InterruptedException e) { + logger.error("shutdown netty client error.", e); + } + } + + public Future sendRedisCommand(final RedisCommand redisCommand) { + final Future responseFuture; + if (channelPromise != null) { + final ChannelPromise readyPromise = this.channelPromise; + + final DefaultPromise responsePromise = new DefaultPromise( + readyPromise.channel().eventLoop()); + // 提交一个事件 + readyPromise.channel().eventLoop().submit(new Runnable() { + @Override + public void run() { + // 将这个结果赋值给responsePromise + PlatformSSLClient.this.responsePromise = responsePromise; + } + }); + + readyPromise.channel().writeAndFlush(redisCommand).addListener(new GenericFutureListener() { + @Override + public void operationComplete(final ChannelFuture future) throws Exception { + if (!future.isSuccess()) { + // 如果失败了,直接将promise返回 + responsePromise.tryFailure(future.cause()); + logger.error("send push message error: {},cause={}", redisCommand, future.cause()); + } else { + // logger.info("write data to platform success"); + } + } + }); + responseFuture = responsePromise; + } else { + logger.error("send push error because client is not connected: {}", redisCommand.toString()); + responseFuture = new FailedFuture(GlobalEventExecutor.INSTANCE, CONNECT_EXCEPTION); + } + return responseFuture; + } + + // 提交一次tcp请求结果 + protected void handleResponse(final IRedisCommandResponse response) { + try { + this.responsePromise.setSuccess(response); + } catch (Exception e) { + logger.error("handlePushNotificationResponse error!", e); + } + } + + public void disconnect() { + // logger.info("close tcp socket, Disconnecting."); + synchronized (this.clientBoot) { + this.channelPromise = null; + final Future channelCloseFuture; + if (this.channelPromise != null) { + channelCloseFuture = this.channelPromise.channel().close(); + } else { + channelCloseFuture = new SucceededFuture(GlobalEventExecutor.INSTANCE, null); + } + channelCloseFuture.addListener(new GenericFutureListener>() { + @Override + public void operationComplete(final Future future) throws Exception { + PlatformSSLClient.this.clientBoot.config().group().shutdownGracefully(); + } + }); + } + // logger.info("close netty tcp socket connection"); + } +} \ No newline at end of file diff --git a/openzaly-common/src/main/java/com/akaxin/common/netty/RedisCommandResponse.java b/openzaly-common/src/main/java/com/akaxin/common/netty/RedisCommandResponse.java new file mode 100755 index 0000000..e729543 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/netty/RedisCommandResponse.java @@ -0,0 +1,53 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.netty; + +import com.akaxin.common.command.RedisCommand; +import com.google.gson.Gson; + +public class RedisCommandResponse implements IRedisCommandResponse { + + private final RedisCommand redisCommand; + private final String errCode; + private final String errInfo; + + public RedisCommandResponse(RedisCommand redisCommand, String errCode, String errInfo) { + this.redisCommand = redisCommand; + this.errCode = errCode; + this.errInfo = errInfo; + } + + @Override + public RedisCommand getRedisCommand() { + return this.redisCommand; + } + + @Override + public boolean isSuccess() { + return "success".equals(this.errCode); + } + + @Override + public String getErrInfo() { + return this.errInfo; + } + + @Override + public String toString() { + return new Gson().toJson(this); + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/netty/codec/MessageDecoder.java b/openzaly-common/src/main/java/com/akaxin/common/netty/codec/MessageDecoder.java new file mode 100755 index 0000000..f88a46f --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/netty/codec/MessageDecoder.java @@ -0,0 +1,55 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.netty.codec; + +import java.util.List; + +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.ReplayingDecoder; + +/** + * 解码器,使用ReplayingDecoder,每一个deccode必须是 + * + * @author Sam + * @since 2017.09.27 + * + */ +public class MessageDecoder extends ReplayingDecoder { + + private ProtocolParser parser = new ProtocolParser(); + + public MessageDecoder() { + super.state(ReplaySignal.START_POINT); + } + + @Override + public void decode(ChannelHandlerContext ctx, ByteBuf in, List out) throws Exception { + parser.readAndOut(ctx.channel(), in, out, this); + + } + + @Override + public void checkpoint(ReplaySignal bp) { + super.checkpoint(bp); + } + + @Override + public ReplaySignal state() { + return super.state(); + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/netty/codec/MessageEncoder.java b/openzaly-common/src/main/java/com/akaxin/common/netty/codec/MessageEncoder.java new file mode 100755 index 0000000..8ddb61b --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/netty/codec/MessageEncoder.java @@ -0,0 +1,65 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.netty.codec; + +import java.nio.ByteBuffer; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.RedisCommand; + +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelPromise; +import io.netty.handler.codec.MessageToByteEncoder; +import io.netty.util.concurrent.Future; +import io.netty.util.concurrent.GenericFutureListener; + +/** + * 编码器 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.09.27 + * @since 2018-01-19 18:43:34 + */ +public class MessageEncoder extends MessageToByteEncoder { + private static final Logger logger = LoggerFactory.getLogger(MessageEncoder.class); + + @Override + public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { + promise.addListener(new GenericFutureListener>() { + + public void operationComplete(Future future) throws Exception { + if (!future.isSuccess()) { + logger.error("write data to client fail ", future.cause()); + } + } + }); + + super.write(ctx, msg, promise); + } + + @Override + protected void encode(ChannelHandlerContext ctx, RedisCommand msg, ByteBuf out) throws Exception { + int byteSize = msg.getByteSize(); + ByteBuffer byteBuffer = ByteBuffer.allocate(byteSize); + msg.encode(byteBuffer); + byte[] bytes = byteBuffer.array(); + out.writeBytes(bytes); + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/netty/codec/ProtocolParser.java b/openzaly-common/src/main/java/com/akaxin/common/netty/codec/ProtocolParser.java new file mode 100755 index 0000000..c7c7671 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/netty/codec/ProtocolParser.java @@ -0,0 +1,123 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.netty.codec; + +import java.util.ArrayList; +import java.util.List; + +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.resp.AbstractParameter; +import com.akaxin.common.resp.RedisBytesParameter; + +import io.netty.buffer.ByteBuf; +import io.netty.channel.Channel; + +/** + * + * @author ay.sam + * @since 2017-09-27 + * + */ +public class ProtocolParser{ + + public void readAndOut(Channel ch, ByteBuf inByte, List out, MessageDecoder decoder) { + // System.out.println("ProtocolParser:readAndOut"); + switch (decoder.state()) { + case START_POINT: + List paramsList = null; + + byte firstByte = inByte.readByte(); + if (firstByte == '*') { + List sizeBytes = new ArrayList(); + while (true) { + byte curent = inByte.readByte(); + if (curent == '\r' && inByte.readByte() == '\n') { + break; + } + sizeBytes.add(curent); + } + + byte[] tempBytes = new byte[sizeBytes.size()]; + for (int i = 0; i < sizeBytes.size(); i++) { + tempBytes[i] = sizeBytes.get(i); + } + +// System.out.println("start read data size=" + Integer.parseInt(new String(tempBytes))); + paramsList = new ArrayList(Integer.parseInt(new String(tempBytes))); + + while (true) { + if (inByte.readByte() == '$') { +// System.out.println("start read String "); + List interBytes = new ArrayList(); + while (true) { + byte curent = inByte.readByte(); + if (curent == '\r' && inByte.readByte() == '\n') { + break; + } + interBytes.add(curent); + + } + + byte[] tempInnerByte = new byte[interBytes.size()]; + for (int j = 0; j < interBytes.size(); j++) { + tempInnerByte[j] = interBytes.get(j); + } + + int readByteSize = Integer.parseInt(new String(tempInnerByte)); +// System.out.println("String length=" + readByteSize); + + byte[] dataBuffer = new byte[readByteSize]; + inByte.readBytes(dataBuffer); + paramsList.add(new RedisBytesParameter(dataBuffer)); + +// System.out.println("read String ==" + new String(dataBuffer)); + + if (inByte.readByte() == '\r' && inByte.readByte() == '\n') { +// System.out.println("success!..."); + } else { + System.out.println("error!....."); + } + + if (paramsList.size() == Integer.parseInt(new String(tempBytes))) { +// System.out.println("receive data from client ......"); + break; + } + + } + } + + decoder.checkpoint(ReplaySignal.START_POINT); + + out.add(buildRedisCommand(paramsList)); + + } else { +// System.out.println("read first data not right=" + firstByte); + } + + break; + + default: + System.out.print("error......"); + break; + } + } + + private RedisCommand buildRedisCommand(List redisParamsList) { + + return new RedisCommand().addAll(redisParamsList); + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/netty/codec/ReplaySignal.java b/openzaly-common/src/main/java/com/akaxin/common/netty/codec/ReplaySignal.java new file mode 100755 index 0000000..6db1564 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/netty/codec/ReplaySignal.java @@ -0,0 +1,28 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.netty.codec; + +/** + * + * @author Sam{@link anguoyue254@gmail.com} + * @since 2017-09-27 + * + */ +public enum ReplaySignal { + START_POINT, // start + HEADER_POINT, // head + BODY_POINT;// body +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/resp/AbstractParameter.java b/openzaly-common/src/main/java/com/akaxin/common/resp/AbstractParameter.java new file mode 100755 index 0000000..fcb262a --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/resp/AbstractParameter.java @@ -0,0 +1,21 @@ +package com.akaxin.common.resp; + +import java.nio.ByteBuffer; +import java.nio.charset.Charset; + +public abstract class AbstractParameter { + protected static final Charset UTF8 = Charset.forName("UTF-8"); + protected static final byte[] CRLF = "\r\n".getBytes(UTF8); + + public abstract void encode(ByteBuffer buffer); + + public abstract int getSize(); + + public String getValue() { + return null; + } + + public byte[] getBytesValue() { + return null; + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/resp/RedisBytesParameter.java b/openzaly-common/src/main/java/com/akaxin/common/resp/RedisBytesParameter.java new file mode 100755 index 0000000..3fbccd2 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/resp/RedisBytesParameter.java @@ -0,0 +1,54 @@ +package com.akaxin.common.resp; + +import java.nio.ByteBuffer; + +public class RedisBytesParameter extends AbstractParameter { + + final byte[] value; + + public RedisBytesParameter(byte[] value) { + this.value = value; + } + + public static RedisBytesParameter of(byte[] value) { + return new RedisBytesParameter(value); + } + + @Override + public void encode(ByteBuffer buffer) { + writeBytes(buffer, value); + } + + public static void writeBytes(ByteBuffer buffer, byte[] value) { + + buffer.put((byte) '$'); + + RedisIntegerParameter.writeInteger(buffer, value.length); + buffer.put(CRLF); + + buffer.put(value); + buffer.put(CRLF); + } + + public static int getByteSize(byte[] value) { + int byteSize = CRLF.length * 2 + 1; + byteSize += RedisIntegerParameter.getIntegerByteSize(value.length); + byteSize += value.length; + return byteSize; + } + + @Override + public String getValue() { + return new String(value); + } + + @Override + public byte[] getBytesValue() { + return this.value; + } + + @Override + public int getSize() { + return getByteSize(this.value); + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/resp/RedisDoubleParameter.java b/openzaly-common/src/main/java/com/akaxin/common/resp/RedisDoubleParameter.java new file mode 100755 index 0000000..f58c5ec --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/resp/RedisDoubleParameter.java @@ -0,0 +1,30 @@ +package com.akaxin.common.resp; + +import java.nio.ByteBuffer; + +public class RedisDoubleParameter extends AbstractParameter { + final double value; + + private RedisDoubleParameter(double value) { + this.value = value; + } + + public static RedisDoubleParameter of(double val) { + return new RedisDoubleParameter(val); + } + + @Override + public void encode(ByteBuffer target) { + RedisStringParameter.writeString(target, Double.toString(value)); + } + + @Override + public String getValue() { + return String.valueOf(value); + } + + @Override + public int getSize() { + return RedisStringParameter.getStringByteSize(String.valueOf(value)); + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/resp/RedisIntegerParameter.java b/openzaly-common/src/main/java/com/akaxin/common/resp/RedisIntegerParameter.java new file mode 100755 index 0000000..9566972 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/resp/RedisIntegerParameter.java @@ -0,0 +1,84 @@ +package com.akaxin.common.resp; + +import java.nio.ByteBuffer; + +public class RedisIntegerParameter extends AbstractParameter { + final long value; + + private RedisIntegerParameter(long value) { + this.value = value; + } + + public static RedisIntegerParameter of(long val) { + + if (val >= 0 && val < IntegerCache.cache.length) { + return IntegerCache.cache[(int) val]; + } + + if (val < 0 && -val < IntegerCache.cache.length) { + return IntegerCache.negativeCache[(int) -val]; + } + + return new RedisIntegerParameter(val); + } + + @Override + public void encode(ByteBuffer target) { + RedisStringParameter.writeString(target, Long.toString(value)); + } + + public static void writeInteger(ByteBuffer target, long value) { + if (value < 10) { + target.put((byte) ('0' + value)); + return; + } + + String asString = Long.toString(value); + + for (int i = 0; i < asString.length(); i++) { + target.put((byte) asString.charAt(i)); + } + + } + + public static int getIntegerByteSize(long value) { + int size = 1; + if (value < 10) { + return size; + } + + String asString = Long.toString(value); + + for (int i = 0; i < asString.length(); i++) { + size++; + } + + return size; + } + + static class IntegerCache { + + static final RedisIntegerParameter cache[]; + static final RedisIntegerParameter negativeCache[]; + + static { + int high = Integer.getInteger("biz.paluch.redis.CommandArgs.IntegerCache", 128); + cache = new RedisIntegerParameter[high]; + negativeCache = new RedisIntegerParameter[high]; + for (int i = 0; i < high; i++) { + cache[i] = new RedisIntegerParameter(i); + negativeCache[i] = new RedisIntegerParameter(-i); + } + } + } + + @Override + public String getValue() { + return String.valueOf(value); + } + + @Override + public int getSize() { + return getIntegerByteSize(this.value); + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/resp/RedisStringParameter.java b/openzaly-common/src/main/java/com/akaxin/common/resp/RedisStringParameter.java new file mode 100755 index 0000000..be2e9e3 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/resp/RedisStringParameter.java @@ -0,0 +1,49 @@ +package com.akaxin.common.resp; + +import java.nio.ByteBuffer; + +public class RedisStringParameter extends AbstractParameter { + + public final String value; + + public RedisStringParameter(String val) { + this.value = val; + } + + public static RedisStringParameter of(String val) { + return new RedisStringParameter(val); + } + + @Override + public void encode(ByteBuffer target) { + writeString(target, value); + } + + public static void writeString(ByteBuffer target, String value) { + target.put((byte) '$'); + byte[] valueByte = value.getBytes(UTF8); + RedisIntegerParameter.writeInteger(target, valueByte.length); + target.put(CRLF); + target.put(valueByte); + target.put(CRLF); + } + + public static int getStringByteSize(String value) { + int byteSize = CRLF.length * 2 + 1; + byte[] valueByte = value.getBytes(UTF8); + byteSize += RedisIntegerParameter.getIntegerByteSize(valueByte.length); + byteSize += valueByte.length; + return byteSize; + } + + @Override + public String getValue() { + return value; + } + + @Override + public int getSize() { + return getStringByteSize(this.value); + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/ssl/ZalySSLContext.java b/openzaly-common/src/main/java/com/akaxin/common/ssl/ZalySSLContext.java new file mode 100755 index 0000000..ff65e01 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/ssl/ZalySSLContext.java @@ -0,0 +1,32 @@ +package com.akaxin.common.ssl; + +import io.netty.handler.ssl.SslContext; +import io.netty.handler.ssl.SslContextBuilder; + +/** + * 获取SSL访问使用的Context + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-20 21:04:43 + */ +public class ZalySSLContext { + + private static SslContext sslContext; + + private ZalySSLContext() { + + } + + public static SslContext getSSLContext() { + try { + if (sslContext == null) { + sslContext = SslContextBuilder.forClient().trustManager(ZalyTrustManagerFactory.INSTANCE).build(); + } + } catch (Exception e) { + throw new Error("Failed to initialize platform SSLContext", e); + } + + return sslContext; + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/ssl/ZalyTrustManagerFactory.java b/openzaly-common/src/main/java/com/akaxin/common/ssl/ZalyTrustManagerFactory.java new file mode 100755 index 0000000..8a467d9 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/ssl/ZalyTrustManagerFactory.java @@ -0,0 +1,101 @@ +package com.akaxin.common.ssl; + +import java.net.Socket; +import java.security.KeyStore; +import java.security.Principal; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; + +import javax.net.ssl.ManagerFactoryParameters; +import javax.net.ssl.SSLEngine; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509ExtendedTrustManager; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import io.netty.handler.ssl.util.SimpleTrustManagerFactory; +import io.netty.util.internal.EmptyArrays; + +/** + * 增加netty验证ssl服务器域名 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-21 10:58:16 + */ +public class ZalyTrustManagerFactory extends SimpleTrustManagerFactory { + private static final Logger logger = LoggerFactory.getLogger(ZalyTrustManagerFactory.class); + + public static final ZalyTrustManagerFactory INSTANCE = new ZalyTrustManagerFactory(); + + private static X509ExtendedTrustManager trustManager = new X509ExtendedTrustManager() { + + @Override + public X509Certificate[] getAcceptedIssuers() { + return EmptyArrays.EMPTY_X509_CERTIFICATES; + } + + @Override + public void checkClientTrusted(X509Certificate[] chain, String s) { + logger.debug("check ssl client trusted certificate: {}", chain[0].getSubjectDN()); + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String s) throws CertificateException { + logger.debug("check ssl server trusted certificate : {}", chain[0].getSubjectDN()); + } + + @Override + public void checkClientTrusted(X509Certificate[] arg0, String arg1, Socket arg2) throws CertificateException { + logger.debug("check ssl client trusted certificate: {} {} socket={}", arg0[0].getSubjectDN(), arg1, + arg2.getLocalAddress()); + } + + @Override + public void checkClientTrusted(X509Certificate[] arg0, String arg1, SSLEngine arg2) + throws CertificateException { + logger.debug("check ssl client trusted certificate: {} {} sslengine={}", arg0[0].getSubjectDN(), arg1, + arg2.getPeerHost()); + + } + + @Override + public void checkServerTrusted(X509Certificate[] arg0, String arg1, Socket arg2) throws CertificateException { + logger.debug("check ssl server trusted certificate : {} {} socket={} ", arg0[0].getSubjectDN(), arg1, + arg2.getLocalAddress()); + } + + @Override + public void checkServerTrusted(X509Certificate[] arg0, String arg1, SSLEngine arg2) + throws CertificateException { + logger.debug("check ssl server trusted certificate : {} {} sslEngine={} ", arg0[0].getSubjectDN(), arg1, + arg2.toString()); + + String peerHost = arg2.getPeerHost(); + Principal pri = arg0[0].getSubjectDN(); + String serverHost = pri.getName().substring(3); + if (StringUtils.isEmpty(serverHost) || !serverHost.equals(peerHost)) { + throw new CertificateException("untrust server host : " + serverHost); + } + + } + }; + + private ZalyTrustManagerFactory() { + } + + @Override + protected void engineInit(KeyStore keyStore) throws Exception { + } + + @Override + protected void engineInit(ManagerFactoryParameters managerFactoryParameters) throws Exception { + } + + @Override + protected TrustManager[] engineGetTrustManagers() { + return new TrustManager[] { trustManager }; + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/utils/GsonUtils.java b/openzaly-common/src/main/java/com/akaxin/common/utils/GsonUtils.java new file mode 100755 index 0000000..5bcf754 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/utils/GsonUtils.java @@ -0,0 +1,34 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.utils; + +import com.google.gson.Gson; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:34:31 + */ +public class GsonUtils { + public static String toJson(Object obj) { + Gson gson = new Gson(); + return gson.toJson(obj); + } + + public static T fromJson(String str, Class clazz) { + return new Gson().fromJson(str, clazz); + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/utils/IpUtils.java b/openzaly-common/src/main/java/com/akaxin/common/utils/IpUtils.java new file mode 100755 index 0000000..d663400 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/utils/IpUtils.java @@ -0,0 +1,22 @@ +package com.akaxin.common.utils; + +import java.net.Inet4Address; +import java.net.UnknownHostException; + +public class IpUtils { + +// public static String getLocalAddress() { +// +// try { +// return Inet4Address.getLocalHost().getHostAddress(); +// } catch (UnknownHostException e) { +// e.printStackTrace(); +// } +// +// return null; +// } +// +// public static int getPort() { +// return 8448; +// } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/utils/PrintUtils.java b/openzaly-common/src/main/java/com/akaxin/common/utils/PrintUtils.java new file mode 100755 index 0000000..4bd58e6 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/utils/PrintUtils.java @@ -0,0 +1,33 @@ +package com.akaxin.common.utils; + +import java.io.PrintWriter; + +/** + * 控制台输出信息 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-15 15:14:53 + */ +public class PrintUtils { + + private static PrintWriter pw; + + public static PrintWriter getPW() { + if (pw == null) { + pw = new PrintWriter(System.out); + } + return pw; + } + + public static void print(String messagePattern, Object... objects) { + getPW().println(StringHelper.format(messagePattern, objects)); + } + + public static void print() { + getPW().println(); + } + + public static void flush() { + getPW().flush(); + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/utils/ServerAddress.java b/openzaly-common/src/main/java/com/akaxin/common/utils/ServerAddress.java new file mode 100755 index 0000000..099ff1d --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/utils/ServerAddress.java @@ -0,0 +1,83 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.utils; + +import org.apache.commons.lang3.StringUtils; + +/** + * address = {host}:{port} + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-30 11:07:21 + */ +public class ServerAddress { + private String host = "0.0.0.0"; + private int port = 2021; // default port + + public ServerAddress(String address) { + this.setAddress(address); + } + + public ServerAddress(String host, int port) { + this.host = host; + this.port = port; + } + + public ServerAddress setAddress(String address) { + if (StringUtils.isNoneBlank(address)) { + // InetAddress netAdd =InetAddress.getByName(address); + String addrs[] = address.split(":"); + if (addrs.length == 1) { + this.host = address; + } else if (addrs.length == 2) { + this.host = addrs[0]; + this.port = Integer.parseInt(addrs[1]); + } + } + return this; + } + + public String getAddress() { + if (this.port == 2021) { + return this.host; + } + return this.host + ":" + this.port; + } + + public String getFullAddress() { + return this.host + ":" + this.port; + } + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host; + } + + public int getPort() { + return port; + } + + public void setPort(int port) { + this.port = port; + } + + public boolean isRightAddress() { + return !"0.0.0.0".equals(this.host); + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/utils/ServerAddressUtils.java b/openzaly-common/src/main/java/com/akaxin/common/utils/ServerAddressUtils.java new file mode 100755 index 0000000..3c35642 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/utils/ServerAddressUtils.java @@ -0,0 +1,53 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.utils; + +/** + *
+ * 	提供Netty启动的服务地址以及端口号
+ * 
+ * 	Address and Port of Netty server
+ * 
+ * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:35:32 + */ +public class ServerAddressUtils { + + private static String address = "0.0.0.0"; + private static int port = 2021; // default port + + public static String getAddress() { + return address; + } + + public static void setAddress(String address) { + ServerAddressUtils.address = address; + } + + public static void setPort(int currPort) { + ServerAddressUtils.port = currPort; + } + + public static int getPort() { + return port; + } + + public static String getAddressPort() { + return address + ":" + port; + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/utils/StringHelper.java b/openzaly-common/src/main/java/com/akaxin/common/utils/StringHelper.java new file mode 100755 index 0000000..783af95 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/utils/StringHelper.java @@ -0,0 +1,123 @@ +package com.akaxin.common.utils; + +import java.util.Random; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.helpers.FormattingTuple; +import org.slf4j.helpers.MessageFormatter; + +import net.sourceforge.pinyin4j.PinyinHelper; +import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; +import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat; +import net.sourceforge.pinyin4j.format.HanyuPinyinToneType; +import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType; +import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination; + +public class StringHelper { + private static final Logger logger = LoggerFactory.getLogger(StringHelper.class); + + public static String getSubString(String str, int length) { + int count = 0; + int offset = 0; + char[] c = str.toCharArray(); + int size = c.length; + if (size >= length) { + for (int i = 0; i < c.length; i++) { + if (c[i] > 256) { + offset = 2; + count += 2; + } else { + offset = 1; + count++; + } + if (count == length) { + return str.substring(0, i + 1); + } + if ((count == length + 1 && offset == 2)) { + return str.substring(0, i); + } + } + } else { + return str; + } + return ""; + } + + /** + * + * @param messagePattern + * "hello,nice {} see {}" + * @param objects + * ["to","see"] + * @return hello,nice to see you + */ + public static String format(String messagePattern, Object... objects) { + FormattingTuple format = MessageFormatter.arrayFormat(messagePattern, objects); + return format.getMessage(); + } + + private static final String STR_62_RANDOM = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + + // 随机生成N位字符串(A-Z,a-z,0-9) + public static String generateRandomString(int length) { + Random random = new Random(); + StringBuffer newRandomStr = new StringBuffer(); + for (int i = 0; i < length; ++i) { + int number = random.nextInt(STR_62_RANDOM.length()); + newRandomStr.append(STR_62_RANDOM.charAt(number)); + } + return newRandomStr.toString(); + } + + private static final String STR_16_RANDOM = "1234567890"; + + // 随机生成N位字符串(A-Z,a-z,0-9) + public static String generateRandomNumber(int length) { + Random random = new Random(); + StringBuffer newRandomStr = new StringBuffer(); + for (int i = 0; i < length; ++i) { + int number = random.nextInt(STR_16_RANDOM.length()); + newRandomStr.append(STR_16_RANDOM.charAt(number)); + } + return newRandomStr.toString(); + } + + public static String toLatinPinYin(String text) { + // format for string + HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat(); + format.setToneType(HanyuPinyinToneType.WITHOUT_TONE); + format.setCaseType(HanyuPinyinCaseType.LOWERCASE);// 小写 + format.setVCharType(HanyuPinyinVCharType.WITH_U_UNICODE); + + char[] input = StringUtils.trimToEmpty(text).toCharArray(); + StringBuffer result = new StringBuffer(); + try { + for (char ch : input) { + if (Character.toString(ch).matches("[\\u4E00-\\u9FA5]+")) { + String[] temp = PinyinHelper.toHanyuPinyinStringArray(ch, format); + result.append(temp[0]); + } else + result.append(Character.toString(ch)); + } + } catch (BadHanyuPinyinOutputFormatCombination e) { + logger.error("string to latin pinyin error", e); + } + return result.toString(); + } + + public static String clearRepeated(String message, String replace) { + Pattern pattern = Pattern.compile("(" + replace + ")\\1+"); + Matcher matcher = pattern.matcher(message); + StringBuffer result = new StringBuffer(); + while (matcher.find()) { + matcher.appendReplacement(result, replace); + } + matcher.appendTail(result); + return result.toString(); + } + +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/utils/TimeFormats.java b/openzaly-common/src/main/java/com/akaxin/common/utils/TimeFormats.java new file mode 100755 index 0000000..da5dd8b --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/utils/TimeFormats.java @@ -0,0 +1,56 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.utils; + +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.TimeZone; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:36:18 + */ +public class TimeFormats { + public static String formatToSeconds(long time) { + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + return format.format(new Date(time)); + } + + //获取当日0点的毫秒值 + public static long getStartTimeOfDay(long now) { + TimeZone timeZone = TimeZone.getTimeZone("GMT+8"); + Calendar calendar = Calendar.getInstance(timeZone); + calendar.setTimeInMillis(now); + calendar.set(Calendar.HOUR_OF_DAY, 0); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + return calendar.getTimeInMillis(); + } + + //获取当日23:59:59的毫秒值 + public static long getEndTimeOfDay(long now) { + TimeZone timeZone = TimeZone.getTimeZone("GMT+8"); + Calendar calendar = Calendar.getInstance(timeZone); + calendar.setTimeInMillis(now); + calendar.set(Calendar.HOUR_OF_DAY, 23); + calendar.set(Calendar.MINUTE, 59); + calendar.set(Calendar.SECOND, 59); + calendar.set(Calendar.MILLISECOND, 999); + return calendar.getTimeInMillis(); + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/utils/URLRegexUtils.java b/openzaly-common/src/main/java/com/akaxin/common/utils/URLRegexUtils.java new file mode 100755 index 0000000..aeb831b --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/utils/URLRegexUtils.java @@ -0,0 +1,44 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.utils; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:36:48 + */ +public class URLRegexUtils { + public static String getParam(String url, String name) { + String reg_pattern = "(^|&|\\?)" + name + "=([^&]*)(&|$)"; + Pattern pattern = Pattern.compile(reg_pattern); + Matcher matcher = pattern.matcher(url); + if (matcher.find()) { + String[] fistParam = matcher.group().split("="); + if (fistParam != null && fistParam.length == 2) { + return fistParam[1]; + } + } + return ""; + } + + public static void main(String[] args) { + String test = URLRegexUtils.getParam("/test?siteUserId=hellosericksiekdjhfsk", "siteUserId"); + + System.out.println(test); + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/utils/UserIdUtils.java b/openzaly-common/src/main/java/com/akaxin/common/utils/UserIdUtils.java new file mode 100755 index 0000000..04720c1 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/utils/UserIdUtils.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.common.utils; + +import java.util.UUID; +import java.util.zip.CRC32; + +import com.akaxin.common.crypto.HashCrypto; + +/** + *

+ * 		生产各种不同类型的用户ID
+ * 		siteUserId && GlobalUserId
+ * 
+ * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-26 15:38:49 + */ +public class UserIdUtils { + // 用户在每个站点的id为UUID + public static String createSiteUserId() { + return UUID.randomUUID().toString(); + } + + // 通过用户公钥,生成用户 + public static String getV1GlobalUserId(String userIdPubk) { + String body = userIdPubk; + String SHA1UserPubKey = HashCrypto.SHA1(body); + CRC32 c32 = new CRC32(); + c32.update(body.getBytes(), 0, body.getBytes().length); + String CRC32UserPubKey = String.valueOf(c32.getValue()); + return SHA1UserPubKey + "-" + CRC32UserPubKey; + } +} diff --git a/openzaly-common/src/main/java/com/akaxin/common/utils/ValidatorPattern.java b/openzaly-common/src/main/java/com/akaxin/common/utils/ValidatorPattern.java new file mode 100755 index 0000000..fc265d3 --- /dev/null +++ b/openzaly-common/src/main/java/com/akaxin/common/utils/ValidatorPattern.java @@ -0,0 +1,118 @@ +package com.akaxin.common.utils; + +import java.util.regex.Pattern; + +public class ValidatorPattern { + /** + * 正则表达式:验证手机号 + */ + public static final String REGEX_PHONDID = "^((13[0-9])|(15[^4,\\D])|(16[0-9])|(17[0-9])|(18[0-9])|(19[0-9]))\\d{8}$"; + + /** + * 正则表达式:验证测试手机号 + */ + public static final String TEST_REGEX_PHONDID = "^(20210000[0-9])\\d{2}$"; + + /** + * 正则表达式:验证邮箱 + */ + public static final String REGEX_EMAIL = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$"; + + /** + * 正则表达式:验证汉字 + */ + public static final String REGEX_CHINESE = "^[\u4e00-\u9fa5],{0,}$"; + + /** + * 正则表达式:验证身份证 + */ + public static final String REGEX_ID_CARD = "(^\\d{18}$)|(^\\d{15}$)"; + + /** + * 正则表达式:验证URL + */ + public static final String REGEX_URL = "http(s)?://([\\w-]+\\.)+[\\w-]+(/[\\w- ./?%&=]*)?"; + + /** + * 正则表达式:验证IP地址 + */ + public static final String REGEX_IP_ADDR = "(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)"; + + /** + * 校验手机号 + * + * @param phoneId + * @return 校验通过返回true,否则返回false + */ + public static boolean isPhoneId(String phoneId) { + if (phoneId == null) { + return false; + } + return Pattern.matches(REGEX_PHONDID, phoneId) || Pattern.matches(TEST_REGEX_PHONDID, phoneId); + } + + /** + * 校验邮箱 + * + * @param email + * @return 校验通过返回true,否则返回false + */ + public static boolean isEmail(String email) { + if (email == null) { + return false; + } + return Pattern.matches(REGEX_EMAIL, email); + } + + /** + * 校验汉字 + * + * @param chinese + * @return 校验通过返回true,否则返回false + */ + public static boolean isChinese(String chinese) { + if (chinese == null) { + return false; + } + return Pattern.matches(REGEX_CHINESE, chinese); + } + + /** + * 校验身份证 + * + * @param idCard + * @return 校验通过返回true,否则返回false + */ + public static boolean isIDCard(String idCard) { + if (idCard == null) { + return false; + } + return Pattern.matches(REGEX_ID_CARD, idCard); + } + + /** + * 校验URL + * + * @param url + * @return 校验通过返回true,否则返回false + */ + public static boolean isUrl(String url) { + if (url == null) { + return false; + } + return Pattern.matches(REGEX_URL, url); + } + + /** + * 校验IP地址 + * + * @param ipAddr + * @return + */ + public static boolean isIPAddr(String ipAddr) { + if (ipAddr == null) { + return false; + } + return Pattern.matches(REGEX_IP_ADDR, ipAddr); + } +} diff --git a/openzaly-common/src/test/java/com/akaxin/common/test/TestInetAddress.java b/openzaly-common/src/test/java/com/akaxin/common/test/TestInetAddress.java new file mode 100755 index 0000000..870eda6 --- /dev/null +++ b/openzaly-common/src/test/java/com/akaxin/common/test/TestInetAddress.java @@ -0,0 +1,4 @@ +package com.akaxin.common.test; + +public class TestInetAddress { +} diff --git a/openzaly-connector/.gitignore b/openzaly-connector/.gitignore new file mode 100755 index 0000000..b83d222 --- /dev/null +++ b/openzaly-connector/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/openzaly-connector/bin/src/main/java/com/zaly/site/connector/client/UserMessage.class b/openzaly-connector/bin/src/main/java/com/zaly/site/connector/client/UserMessage.class new file mode 100755 index 0000000..bac5778 Binary files /dev/null and b/openzaly-connector/bin/src/main/java/com/zaly/site/connector/client/UserMessage.class differ diff --git a/openzaly-connector/pom.xml b/openzaly-connector/pom.xml new file mode 100755 index 0000000..4f96a6f --- /dev/null +++ b/openzaly-connector/pom.xml @@ -0,0 +1,60 @@ + + + 4.0.0 + + com.akaxin + openzaly-parent + 0.0.1 + + com.akaxin.site + openzaly-connector + 0.0.1-RELEASE + + + 1.6 + 1.6 + + + + + com.akaxin.common + openzaly-common + 0.0.1-RELEASE + + + + com.akaxin.site + openzaly-message + 0.0.1-RELEASE + + + + com.akaxin.site + openzaly-business + 0.0.1-RELEASE + + + + com.akaxin.site + openzaly-storage + 0.0.1-RELEASE + + + + + \ No newline at end of file diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/cache/PluginCache.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/cache/PluginCache.java new file mode 100755 index 0000000..677d07c --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/cache/PluginCache.java @@ -0,0 +1,5 @@ +package com.akaxin.site.connector.cache; + +public class PluginCache { + +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/codec/parser/ChannelConst.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/codec/parser/ChannelConst.java new file mode 100755 index 0000000..260fff2 --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/codec/parser/ChannelConst.java @@ -0,0 +1,17 @@ +package com.akaxin.site.connector.codec.parser; + +import com.akaxin.common.channel.ChannelSession; + +import io.netty.util.AttributeKey; + +/** + * bind ChannelSession to channel by AttributeKey + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-08 16:14:29 + */ +public class ChannelConst { + + public static final AttributeKey CHANNELSESSION = AttributeKey.valueOf("channelSession"); + +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/codec/parser/IProtocolParser.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/codec/parser/IProtocolParser.java new file mode 100755 index 0000000..9386514 --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/codec/parser/IProtocolParser.java @@ -0,0 +1,35 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.codec.parser; + +import java.util.List; + +import com.akaxin.site.connector.codec.protocol.MessageDecoder; + +import io.netty.buffer.ByteBuf; +import io.netty.channel.Channel; + +/** + * Decoder中使用IProtocolParser,将Byte转成protocolPacket,并交给out传递给InboundHandler + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.09.27 + */ +public interface IProtocolParser { + + public void readAndOut(Channel ch, ByteBuf inByte, List out, MessageDecoder decoder) throws Exception; + +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/codec/parser/ProtocolParser.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/codec/parser/ProtocolParser.java new file mode 100755 index 0000000..fb17955 --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/codec/parser/ProtocolParser.java @@ -0,0 +1,114 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.codec.parser; + +import java.util.ArrayList; +import java.util.List; + +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.resp.AbstractParameter; +import com.akaxin.common.resp.RedisBytesParameter; +import com.akaxin.site.connector.codec.protocol.MessageDecoder; +import com.akaxin.site.connector.codec.protocol.ReplaySignal; + +import io.netty.buffer.ByteBuf; +import io.netty.channel.Channel; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-09-27 11:40:49 + */ +public class ProtocolParser implements IProtocolParser { + + public void readAndOut(Channel ch, ByteBuf inByte, List out, MessageDecoder decoder) throws Exception { + switch (decoder.state()) { + case START_POINT: + List paramsList = null; + + byte firstByte = inByte.readByte(); + if (firstByte == '*') { + List sizeBytes = new ArrayList(); + while (true) { + byte curent = inByte.readByte(); + if (curent == '\r' && inByte.readByte() == '\n') { + break; + } + sizeBytes.add(curent); + } + + byte[] tempBytes = new byte[sizeBytes.size()]; + for (int i = 0; i < sizeBytes.size(); i++) { + tempBytes[i] = sizeBytes.get(i); + } + + paramsList = new ArrayList(Integer.parseInt(new String(tempBytes))); + + while (true) { + if (inByte.readByte() == '$') { + List interBytes = new ArrayList(); + while (true) { + byte curent = inByte.readByte(); + if (curent == '\r' && inByte.readByte() == '\n') { + break; + } + interBytes.add(curent); + + } + + byte[] tempInnerByte = new byte[interBytes.size()]; + for (int j = 0; j < interBytes.size(); j++) { + tempInnerByte[j] = interBytes.get(j); + } + + int readByteSize = Integer.parseInt(new String(tempInnerByte)); + // System.out.println("String length=" + readByteSize); + + byte[] dataBuffer = new byte[readByteSize]; + inByte.readBytes(dataBuffer); + paramsList.add(new RedisBytesParameter(dataBuffer)); + + // System.out.println("read String ==" + new String(dataBuffer)); + + if (inByte.readByte() == '\r' && inByte.readByte() == '\n') { + // System.out.println("success!..."); + } else { + System.out.println("error!....."); + } + + if (paramsList.size() == Integer.parseInt(new String(tempBytes))) { + // System.out.println("receive data from client ......"); + break; + } + + } + } + + decoder.checkpoint(ReplaySignal.START_POINT); + out.add(buildRedisCommand(paramsList)); + } + + break; + + default: + throw new Exception("parsing protocol exceptions"); + } + } + + private RedisCommand buildRedisCommand(List redisParamsList) { + return new RedisCommand().addAll(redisParamsList); + } + +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/codec/protocol/MessageDecoder.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/codec/protocol/MessageDecoder.java new file mode 100755 index 0000000..f2efb50 --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/codec/protocol/MessageDecoder.java @@ -0,0 +1,58 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.codec.protocol; + +import java.util.List; + +import com.akaxin.site.connector.codec.parser.IProtocolParser; +import com.akaxin.site.connector.codec.parser.ProtocolParser; + +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.ReplayingDecoder; + +/** + * 解码器,使用ReplayingDecoder,每一个deccode必须是 + * + * @author Sam + * @since 2017.09.27 + * + */ +public class MessageDecoder extends ReplayingDecoder { + + private IProtocolParser parser = new ProtocolParser(); + + public MessageDecoder() { + super.state(ReplaySignal.START_POINT); + } + + @Override + public void decode(ChannelHandlerContext ctx, ByteBuf in, List out) throws Exception { + parser.readAndOut(ctx.channel(), in, out, this); + + } + + @Override + public void checkpoint(ReplaySignal bp) { + super.checkpoint(bp); + } + + @Override + public ReplaySignal state() { + return super.state(); + } + +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/codec/protocol/MessageEncoder.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/codec/protocol/MessageEncoder.java new file mode 100755 index 0000000..79d75a3 --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/codec/protocol/MessageEncoder.java @@ -0,0 +1,84 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.codec.protocol; + +import java.net.InetSocketAddress; +import java.nio.ByteBuffer; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.channel.ChannelSession; +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.constant.RequestAction; +import com.akaxin.site.connector.codec.parser.ChannelConst; +import com.akaxin.site.connector.constant.AkxProject; + +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelPromise; +import io.netty.handler.codec.MessageToByteEncoder; +import io.netty.util.concurrent.Future; +import io.netty.util.concurrent.GenericFutureListener; + +/** + * 编码器 + * + * @author Sam + * @since 2017.09.27 + * + */ +public class MessageEncoder extends MessageToByteEncoder { + private static final Logger logger = LoggerFactory.getLogger(MessageEncoder.class); + + @Override + public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { + promise.addListener(new GenericFutureListener>() { + + public void operationComplete(Future future) throws Exception { + if (!future.isSuccess()) { + logger.error("write data to client fail ", future.cause()); + } + } + }); + + super.write(ctx, msg, promise); + } + + @Override + protected void encode(ChannelHandlerContext ctx, RedisCommand msg, ByteBuf out) throws Exception { + InetSocketAddress socketAddress = (InetSocketAddress) ctx.channel().remoteAddress(); + String clientIp = socketAddress.getAddress().getHostAddress(); + ChannelSession channelSession = ctx.channel().attr(ChannelConst.CHANNELSESSION).get(); + String version = msg.getParameterByIndex(0); + String action = msg.getParameterByIndex(1); + byte[] params = msg.getBytesParamByIndex(2); + channelSession.setActionForPsn(action); + + if (!RequestAction.IM_STC_PONG.getName().equals(action)) { + logger.debug("{} site -> client={} version={} action={} params-length={}", AkxProject.PLN, clientIp, + version, action, params.length); + } + + int byteSize = msg.getByteSize(); + ByteBuffer byteBuffer = ByteBuffer.allocate(byteSize); + msg.encode(byteBuffer); + byte[] bytes = byteBuffer.array(); + out.writeBytes(bytes); + + } + +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/codec/protocol/ReplaySignal.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/codec/protocol/ReplaySignal.java new file mode 100755 index 0000000..847825e --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/codec/protocol/ReplaySignal.java @@ -0,0 +1,28 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.codec.protocol; + +/** + * + * @author Sam{@link anguoyue254@gmail.com} + * @since 2017-09-27 + * + */ +public enum ReplaySignal { + START_POINT, // start + HEADER_POINT, // head + BODY_POINT;// body +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/constant/AkxProject.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/constant/AkxProject.java new file mode 100755 index 0000000..eb46ef3 --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/constant/AkxProject.java @@ -0,0 +1,7 @@ +package com.akaxin.site.connector.constant; + +public interface AkxProject { + + String PLN = "[openzaly-connector]"; + +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/constant/HttpConst.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/constant/HttpConst.java new file mode 100755 index 0000000..582cc82 --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/constant/HttpConst.java @@ -0,0 +1,9 @@ +package com.akaxin.site.connector.constant; + +public interface HttpConst { + + String HTTP_H_FORWARDED = "X-Forwarded-For"; + String HTTP_H_CONTENT_TYPE = "application/json"; + + String HTTP_M_POST = "POST"; +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/constant/PluginConst.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/constant/PluginConst.java new file mode 100755 index 0000000..804d56c --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/constant/PluginConst.java @@ -0,0 +1,8 @@ +package com.akaxin.site.connector.constant; + +public interface PluginConst { + + String SITE_PLUGIN_ID = "site-plugin-id"; + + String PLUGIN_AUTH_KEY = "auth-key"; +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/exception/HttpServerException.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/exception/HttpServerException.java new file mode 100755 index 0000000..068e2ba --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/exception/HttpServerException.java @@ -0,0 +1,24 @@ +package com.akaxin.site.connector.exception; + +/** + * define custom exception for httpserver + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-05-19 11:50:13 + */ +public class HttpServerException extends Throwable { + + /** + * + */ + private static final long serialVersionUID = 6242277890587744071L; + + public HttpServerException(String message) { + super(message); + } + + public HttpServerException(String message, Throwable throwable) { + super(message, throwable); + } + +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/exception/TcpServerException.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/exception/TcpServerException.java new file mode 100755 index 0000000..2179f8f --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/exception/TcpServerException.java @@ -0,0 +1,17 @@ +package com.akaxin.site.connector.exception; + +public class TcpServerException extends Throwable { + + /** + * + */ + private static final long serialVersionUID = 7366967641018300790L; + + public TcpServerException(String message) { + super(message); + } + + public TcpServerException(String message, Throwable throwable) { + super(message, throwable); + } +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/handler/AbstractCommonHandler.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/handler/AbstractCommonHandler.java new file mode 100755 index 0000000..55430d6 --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/handler/AbstractCommonHandler.java @@ -0,0 +1,46 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.handler; + +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.executor.chain.handler.IHandler; + +import io.netty.channel.Channel; + +public abstract class AbstractCommonHandler implements IHandler { + + // default error ressponse by ErrorCode2.ERROR + protected CommandResponse defaultErrorResponse() { + CommandResponse commandResponse = new CommandResponse().setVersion(CommandConst.PROTOCOL_VERSION) + .setAction(CommandConst.ACTION_RES); + commandResponse.setErrCode2(ErrorCode2.ERROR); + return commandResponse; + } + + // defined by user + protected CommandResponse customResponse(ErrorCode2 errCode) { + CommandResponse commandResponse = new CommandResponse().setVersion(CommandConst.PROTOCOL_VERSION) + .setAction(CommandConst.ACTION_RES); + commandResponse.setErrCode2(errCode); + return commandResponse; + } + + protected void closeChannel(Channel channel) { + channel.close(); + } +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/handler/ApiRequestHandler.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/handler/ApiRequestHandler.java new file mode 100755 index 0000000..377a2ca --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/handler/ApiRequestHandler.java @@ -0,0 +1,182 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.handler; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.channel.ChannelSession; +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.constant.RequestAction; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.site.business.service.ApiRequestService; +import com.akaxin.site.connector.constant.AkxProject; +import com.akaxin.site.storage.api.IUserSessionDao; +import com.akaxin.site.storage.bean.SimpleAuthBean; +import com.akaxin.site.storage.service.UserSessionDaoService; +import com.google.protobuf.ByteString; + +import io.netty.channel.Channel; +import io.netty.util.concurrent.Future; +import io.netty.util.concurrent.GenericFutureListener; + +/** + * 使用TCP处理API请求,TCP代处理HTTP请求 + * + * @author Sam + * @since 2017.10.19 + * + * @param + */ +public class ApiRequestHandler extends AbstractCommonHandler { + private static final Logger logger = LoggerFactory.getLogger(ApiRequestHandler.class); + + public CommandResponse handle(Command command) { + try { + ChannelSession channelSession = command.getChannelSession(); + if (channelSession == null || channelSession.getChannel() == null) { + logger.error("{} client={} api request handler error.channelSession={}", AkxProject.PLN, + command.getClientIp(), channelSession); + // NULL,则不需要再次关闭channel + return null; + } + + switch (RequestAction.getAction(command.getAction())) { + case API_SITE_CONFIG: + case API_SITE_REGISTER: + case API_SITE_LOGIN: + break; + default: { + Map header = command.getHeader(); + String sessionId = header.get(CoreProto.HeaderKey.CLIENT_SOCKET_SITE_SESSION_ID_VALUE); + // logger.debug("{} client={} api request sessionId={}", AkxProject.PLN, + // command.getClientIp(), sessionId); + + if (!StringUtils.isNotEmpty(sessionId)) { + this.tellClientSessionError(channelSession.getChannel()); + logger.error("{} client={} api request with sessionId is NULL", AkxProject.PLN, + command.getClientIp()); + return customResponse(ErrorCode2.ERROR_SESSION); + } + + IUserSessionDao sessionDao = new UserSessionDaoService(); + SimpleAuthBean authBean = sessionDao.getUserSession(sessionId); + // logger.debug("{} client={} api session auth result {}", authBean.toString()); + + if (authBean == null || StringUtils.isAnyEmpty(authBean.getSiteUserId(), authBean.getDeviceId())) { + this.tellClientSessionError(channelSession.getChannel()); + logger.error("{} client={} api session auth fail.authBean={}", AkxProject.PLN, + command.getClientIp(), authBean); + return customResponse(ErrorCode2.ERROR_SESSION); + } + + command.setSiteUserId(authBean.getSiteUserId()); + command.setDeviceId(authBean.getDeviceId()); + } + } + // 执行业务操作 + return this.doApiRequest(channelSession.getChannel(), command); + } catch (Exception e) { + logger.error(StringHelper.format("{} client={} api request error.", AkxProject.PLN, command.getClientIp()), + e); + } + + return customResponse(ErrorCode2.ERROR); + } + + private CommandResponse doApiRequest(final Channel channel, Command command) { + // response + CoreProto.TransportPackageData.Builder packageBuilder = CoreProto.TransportPackageData.newBuilder(); + + CommandResponse comamndResponse = new ApiRequestService().process(command); + + // 1.header + Map header = new HashMap(); + // 站点业务版本(proto版本) + header.put(CoreProto.HeaderKey.SITE_SERVER_VERSION_VALUE, CommandConst.SITE_VERSION); + packageBuilder.putAllHeader(header); + + // 2.errCode + int protoVersion = command.getProtoVersion(); + CoreProto.ErrorInfo.Builder errBuilder = CoreProto.ErrorInfo.newBuilder(); + // 兼容 “error.alert” + if (protoVersion < 5 && "error.alert".equals(comamndResponse.getErrCode())) { + errBuilder.setCode("error.alter"); + } else { + errBuilder.setCode(comamndResponse.getErrCode()); + } + + if (StringUtils.isNotEmpty(comamndResponse.getErrInfo())) { + errBuilder.setInfo(comamndResponse.getErrInfo()); + } + packageBuilder.setErr(errBuilder.build()); + + // 3.data + if (comamndResponse.getParams() != null) { + packageBuilder.setData(ByteString.copyFrom(comamndResponse.getParams())).build(); + } + // 协议版本 CommandConst.PROTOCOL_VERSION=1.0 + String protocolVersion = CommandConst.PROTOCOL_VERSION; + String action = comamndResponse.getAction() == null ? CommandConst.ACTION_RES : comamndResponse.getAction(); + channel.writeAndFlush( + new RedisCommand().add(protocolVersion).add(action).add(packageBuilder.build().toByteArray())) + .addListener(new GenericFutureListener>() { + + @Override + public void operationComplete(Future future) throws Exception { + channel.close(); + } + }); + // future.await(timeoutMillis); + return comamndResponse; + } + + private void tellClientSessionError(final Channel channel) { + // response + CoreProto.TransportPackageData.Builder packageBuilder = CoreProto.TransportPackageData.newBuilder(); + // header + Map header = new HashMap(); + // 站点业务版本(proto版本) + header.put(CoreProto.HeaderKey.SITE_SERVER_VERSION_VALUE, CommandConst.SITE_VERSION); + packageBuilder.putAllHeader(header); + // errCode + CoreProto.ErrorInfo errInfo = CoreProto.ErrorInfo.newBuilder().setCode(ErrorCode2.ERROR_SESSION.getCode()) + .setInfo(ErrorCode2.ERROR_SESSION.getInfo()).build(); + packageBuilder.setErr(errInfo); + + // 协议版本 CommandConst.PROTOCOL_VERSION=1.0 + String protocolVersion = CommandConst.PROTOCOL_VERSION; + String action = CommandConst.ACTION_RES; + channel.writeAndFlush( + new RedisCommand().add(protocolVersion).add(action).add(packageBuilder.build().toByteArray())) + .addListener(new GenericFutureListener>() { + + public void operationComplete(Future future) throws Exception { + channel.close(); + } + }); + } + +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/handler/HttpRequestHandler.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/handler/HttpRequestHandler.java new file mode 100755 index 0000000..413cadd --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/handler/HttpRequestHandler.java @@ -0,0 +1,115 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.handler; + +import java.util.Base64; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CharsetCoding; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.crypto.AESCrypto; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.PluginProto; +import com.akaxin.site.business.service.HttpRequestService; +import com.akaxin.site.connector.constant.AkxProject; +import com.akaxin.site.connector.constant.HttpConst; +import com.akaxin.site.connector.constant.PluginConst; + +import io.netty.buffer.Unpooled; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http.DefaultFullHttpResponse; +import io.netty.handler.codec.http.FullHttpResponse; +import io.netty.handler.codec.http.HttpHeaderNames; +import io.netty.handler.codec.http.HttpHeaderValues; +import io.netty.handler.codec.http.HttpResponseStatus; +import io.netty.handler.codec.http.HttpVersion; + +/** + * 使用TCP处理API请求,TCP代处理HTTP请求 + * + * @author Sam + * @since 2017.10.19 + * + * @param + */ +public class HttpRequestHandler extends AbstractCommonHandler { + private static final Logger logger = LoggerFactory.getLogger(HttpRequestHandler.class); + + @Override + public CommandResponse handle(Command command) { + try { + ChannelHandlerContext context = command.getChannelContext(); + if (context == null) { + logger.error("{} client={} http request error context={}", AkxProject.PLN, command.getClientIp(), + context); + return null; + } + CommandResponse comamndResponse = new HttpRequestService().process(command); + comamndResponse.setVersion(CommandConst.PROTOCOL_VERSION); + comamndResponse.setAction(CommandConst.ACTION_RES); + + String authKey = command.getField(PluginConst.PLUGIN_AUTH_KEY, String.class); + fullHttpResponse(context, comamndResponse, authKey); + return comamndResponse; + } catch (Exception e) { + logger.error("api request error.", e); + } + return null; + } + + /** + * response包含:
+ * 1.状态行 ,Http-Version Status-Code Reason-Phrase CLRLF
+ * 2.消息报头
+ * 3.响应正文 + */ + private void fullHttpResponse(ChannelHandlerContext context, CommandResponse commandResponse, String authKey) { + FullHttpResponse response = null; + try { + PluginProto.ProxyPluginPackage.Builder packBuilder = PluginProto.ProxyPluginPackage.newBuilder(); + CoreProto.ErrorInfo errInfo = CoreProto.ErrorInfo.newBuilder().setCode(commandResponse.getErrCode()) + .setInfo(commandResponse.getErrInfo()).build(); + packBuilder.setErrorInfo(errInfo); + if (commandResponse.getParams() != null) { + String dataStr = Base64.getEncoder().encodeToString(commandResponse.getParams()); + packBuilder.setData(dataStr); + } + + byte[] httpResBytes = packBuilder.build().toByteArray(); + if (StringUtils.isNotEmpty(authKey)) { + // authKey存在,则加密,不存在则使用原文 + byte[] tsk = authKey.getBytes(CharsetCoding.ISO_8859_1); + byte[] decContent = AESCrypto.encrypt(tsk, httpResBytes); + httpResBytes = decContent; + } + response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK, + Unpooled.wrappedBuffer(httpResBytes)); + } catch (Exception e) { + response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.NO_CONTENT); + logger.error("full http response error.", e); + } + response.headers().set(HttpHeaderNames.CONTENT_TYPE, HttpConst.HTTP_H_CONTENT_TYPE); + response.headers().set(HttpHeaderNames.CONTENT_LENGTH, response.content().readableBytes()); + response.headers().set(HttpHeaderNames.CONNECTION, HttpHeaderValues.KEEP_ALIVE); + context.writeAndFlush(response); + } + +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/handler/ImMessageHandler.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/handler/ImMessageHandler.java new file mode 100755 index 0000000..719c12c --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/handler/ImMessageHandler.java @@ -0,0 +1,113 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.handler; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.channel.ChannelManager; +import com.akaxin.common.channel.ChannelSession; +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.constant.RequestAction; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.site.connector.constant.AkxProject; +import com.akaxin.site.message.service.ImMessageService; + +/** + * 这里负责下发消息至message模块进行处理 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-11-15 11:11:42 + */ +public class ImMessageHandler extends AbstractCommonHandler { + private static final Logger logger = LoggerFactory.getLogger(ImMessageHandler.class); + + public CommandResponse handle(Command command) { + try { + ChannelSession channelSession = command.getChannelSession(); + String deviceId = channelSession.getDeviceId(); + if (StringUtils.isEmpty(deviceId)) { + channelSession.getChannel().close(); + logger.error("{} client={} im request error with deviceId={}.", AkxProject.PLN, command.getClientIp(), + deviceId); + return customResponse(ErrorCode2.ERROR); + } + + ChannelSession acsession = ChannelManager.getChannelSession(deviceId); + if (acsession == null) { + channelSession.getChannel().close(); + logger.error("{} client={} im request error with channelSession={}", AkxProject.PLN, + command.getClientIp(), acsession); + return customResponse(ErrorCode2.ERROR); + } + + if (!checkSiteUserId(command.getSiteUserId(), acsession.getUserId())) { + channelSession.getChannel().close(); + logger.error("{} client={} im request fail siteUserId={},sessionUserId={}", AkxProject.PLN, + command.getClientIp(), command.getSiteUserId(), acsession.getUserId()); + return customResponse(ErrorCode2.ERROR); + } + + if (RequestAction.IM_CTS_PING.getName().equalsIgnoreCase(command.getAction())) { + Map header = new HashMap(); + header.put(CoreProto.HeaderKey.SITE_SERVER_VERSION_VALUE, CommandConst.SITE_VERSION); + CoreProto.TransportPackageData.Builder packBuilder = CoreProto.TransportPackageData.newBuilder(); + packBuilder.putAllHeader(header); + channelSession.getChannel().writeAndFlush(new RedisCommand().add(CommandConst.PROTOCOL_VERSION) + .add(RequestAction.IM_STC_PONG.getName()).add(packBuilder.build().toByteArray())); + // 检测是否需要给用户发送PSN + if (channelSession.detectPsn()) { + channelSession.getChannel().writeAndFlush(new RedisCommand().add(CommandConst.PROTOCOL_VERSION) + .add(RequestAction.IM_STC_PSN.getName()).add(packBuilder.build().toByteArray())); + logger.debug("{} client={} siteUserId={} deviceId={} push psn {} {}", AkxProject.PLN, + command.getClientIp(), command.getSiteUserId(), command.getDeviceId(), + channelSession.getPsnTime(), channelSession.getSynFinTime()); + } + + } else { + // 排除ping请求,其他请求走im服务 + new ImMessageService().execute(command); + } + + return customResponse(ErrorCode2.SUCCESS); + } catch (Exception e) { + logger.error(StringHelper.format("{} client={} im request error.", AkxProject.PLN, command.getClientIp()), + e); + } + return defaultErrorResponse(); + } + + /** + * 比较 + * + * @param cmdUserId + * @param sessionUserId + * @return + */ + private boolean checkSiteUserId(String cmdUserId, String sessionUserId) { + return StringUtils.isBlank(sessionUserId) ? false : sessionUserId.equals(cmdUserId); + } + +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/handler/ImSiteAuthHandler.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/handler/ImSiteAuthHandler.java new file mode 100755 index 0000000..32793dd --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/handler/ImSiteAuthHandler.java @@ -0,0 +1,157 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.handler; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.channel.ChannelManager; +import com.akaxin.common.channel.ChannelSession; +import com.akaxin.common.channel.ChannelWriter; +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.constant.RequestAction; +import com.akaxin.common.executor.chain.handler.MethodReflectHandler; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.site.ImSiteAuthProto; +import com.akaxin.proto.site.ImSiteHelloProto; +import com.akaxin.site.business.impl.site.SiteConfig; +import com.akaxin.site.connector.constant.AkxProject; +import com.akaxin.site.connector.session.SessionManager; +import com.akaxin.site.storage.bean.SimpleAuthBean; + +import io.netty.channel.Channel; + +/** + *
+ * 处理用户登陆站点之前认证行为 
+ * 		1.hello行为,获取站点版本号 
+ * 		2.auth行为,进行用户个人身份认证
+ * 
+ * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.11.15 + * + * @param + */ +public class ImSiteAuthHandler extends MethodReflectHandler { + private static final Logger logger = LoggerFactory.getLogger(ImSiteAuthHandler.class); + private static final int IM = 1; + + public CommandResponse hello(Command command) { + ChannelSession channelSession = command.getChannelSession(); + try { + if (channelSession != null) { + ImSiteHelloProto.ImSiteHelloRequest request = ImSiteHelloProto.ImSiteHelloRequest + .parseFrom(command.getParams()); + String clientVersion = request.getClientVersion(); + logger.debug("{} client={} siteUserId={} action={} clientVersion={}", AkxProject.PLN, + command.getClientIp(), command.getSiteUserId(), RequestAction.IM_SITE_HELLO, clientVersion); + return helloResponse(channelSession.getChannel()); + } + } catch (Exception e) { + logger.error(StringHelper.format("{} client={} siteUserId={} action={} error.", AkxProject.PLN, + command.getClientIp(), command.getSiteUserId(), RequestAction.IM_SITE_HELLO), e); + } + return defaultErrorResponse(); + } + + private CommandResponse helloResponse(Channel channel) { + CommandResponse commandResponse = new CommandResponse().setVersion(CommandConst.PROTOCOL_VERSION) + .setAction(CommandConst.ACTION_RES); + ImSiteHelloProto.ImSiteHelloResponse response = ImSiteHelloProto.ImSiteHelloResponse.newBuilder() + .setSiteVersion(CommandConst.SITE_VERSION).build(); + commandResponse.setErrCode2(ErrorCode2.SUCCESS); + commandResponse.setParams(response.toByteArray()); + ChannelWriter.write(channel, commandResponse); + return commandResponse; + } + + public CommandResponse auth(Command command) { + ChannelSession channelSession = command.getChannelSession(); + if (channelSession != null) { + boolean authResult = authentication(channelSession, command); + return authResponse(channelSession.getChannel(), command, authResult); + } + return defaultErrorResponse(); + } + + private boolean authentication(ChannelSession channelSession, Command command) { + try { + ImSiteAuthProto.ImSiteAuthRequest request = ImSiteAuthProto.ImSiteAuthRequest + .parseFrom(command.getParams()); + String siteUserId = request.getSiteUserId(); + String sessionId = request.getSiteSessionId(); + command.setSiteUserId(siteUserId); + + if (StringUtils.isNoneEmpty(siteUserId, sessionId)) { + SimpleAuthBean authSession = SessionManager.getInstance().getAuthSession(sessionId); + logger.debug("{} client={} siteUserId={} action={} sessionId={} authSession={}", AkxProject.PLN, + command.getClientIp(), siteUserId, RequestAction.IM_SITE_AUTH, sessionId, authSession); + + if (authSession != null && siteUserId.equals(authSession.getSiteUserId())) { + // 1. set user online + SessionManager.getInstance().setUserOnline(siteUserId, authSession.getDeviceId()); + // 2. Mark IM长链接 + channelSession.setCtype(IM); + channelSession.setUserId(siteUserId); + channelSession.setDeviceId(authSession.getDeviceId()); + ChannelManager.addChannelSession(authSession.getDeviceId(), channelSession); + // 3. update active time + SessionManager.getInstance().updateActiveTime(siteUserId, authSession.getDeviceId()); + // 4. log + logger.debug("{} client={} siteUserId={} action={} AUTH SUCCESS ChannelSessionSize{}", + AkxProject.PLN, command.getClientIp(), command.getSiteUserId(), RequestAction.IM_SITE_AUTH, + ChannelManager.getChannelSessionSize()); + return true; + } + } + } catch (Exception e) { + logger.error(StringHelper.format("{} client={} siteUserId={} auth session error......", AkxProject.PLN, + command.getClientIp(), command.getSiteUserId()), e); + } + return false; + } + + private CommandResponse authResponse(Channel channel, Command command, boolean result) { + CommandResponse commandResponse = new CommandResponse().setVersion(CommandConst.PROTOCOL_VERSION) + .setAction(CommandConst.ACTION_RES); + ErrorCode2 errCode = ErrorCode2.ERROR_SESSION; + if (result) { + String siteServer = SiteConfig.getSiteAddress(); + ImSiteAuthProto.ImSiteAuthResponse authResponse = ImSiteAuthProto.ImSiteAuthResponse.newBuilder() + .setSiteServer(siteServer).build(); + commandResponse.setParams(authResponse.toByteArray()); + errCode = ErrorCode2.SUCCESS; + ChannelWriter.write(channel, commandResponse.setErrCode2(errCode)); + } else { + ChannelWriter.writeAndClose(channel, commandResponse.setErrCode2(errCode)); + } + logger.debug("{} client={} siteUserId={} action={} auth response result={}", AkxProject.PLN, + command.getClientIp(), command.getSiteUserId(), RequestAction.IM_SITE_AUTH, errCode.toString()); + return commandResponse; + } + + private CommandResponse defaultErrorResponse() { + CommandResponse commandResponse = new CommandResponse().setVersion(CommandConst.PROTOCOL_VERSION) + .setAction(CommandConst.ACTION_RES); + commandResponse.setErrCode2(ErrorCode2.ERROR); + return commandResponse; + } +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/handler/WSRequestHandler.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/handler/WSRequestHandler.java new file mode 100755 index 0000000..b5e353b --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/handler/WSRequestHandler.java @@ -0,0 +1,61 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.handler; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; + +import io.netty.channel.Channel; +import io.netty.util.concurrent.Future; +import io.netty.util.concurrent.GenericFutureListener; + +/** + * 使用TCP处理API请求,TCP代处理HTTP请求 + * + * @author Sam + * @since 2017.10.19 + * + * @param + */ +public class WSRequestHandler extends AbstractCommonHandler { + private static final Logger logger = LoggerFactory.getLogger(WSRequestHandler.class); + + public CommandResponse handle(Command command) { + try { + System.out.println(command.toString()); + System.out.println(command.getClientIp() + "," + command.getStartTime()); + } catch (Exception e) { + logger.error("process ws request handler error", e); + } + return customResponse(ErrorCode2.ERROR); + } + + private void tellClientSessionError(final Channel channel) { + String action = CommandConst.ACTION_RES; + channel.writeAndFlush("").addListener(new GenericFutureListener>() { + + public void operationComplete(Future future) throws Exception { + channel.close(); + } + }); + } + +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/http/HttpServer.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/http/HttpServer.java new file mode 100755 index 0000000..cf461b9 --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/http/HttpServer.java @@ -0,0 +1,128 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.http; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.executor.AbstracteExecutor; +import com.akaxin.common.executor.SimpleExecutor; +import com.akaxin.site.connector.constant.AkxProject; +import com.akaxin.site.connector.exception.HttpServerException; +import com.akaxin.site.connector.http.handler.HttpServerHandler; + +import io.netty.bootstrap.ServerBootstrap; +import io.netty.buffer.PooledByteBufAllocator; +import io.netty.channel.AdaptiveRecvByteBufAllocator; +import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelInitializer; +import io.netty.channel.ChannelOption; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.socket.SocketChannel; +import io.netty.channel.socket.nio.NioServerSocketChannel; +import io.netty.handler.codec.http.HttpObjectAggregator; +import io.netty.handler.codec.http.HttpRequestDecoder; +import io.netty.handler.codec.http.HttpResponseEncoder; +import io.netty.handler.stream.ChunkedWriteHandler; +import io.netty.util.concurrent.Future; +import io.netty.util.concurrent.GenericFutureListener; + +public abstract class HttpServer { + private static Logger logger = LoggerFactory.getLogger(HttpServer.class); + private ServerBootstrap bootstrap; + private EventLoopGroup parentGroup; + private EventLoopGroup childGroup; + private AbstracteExecutor executor; + + public HttpServer() { + try { + executor = new SimpleExecutor(); + loadExecutor(executor); + int needThreadNum = Runtime.getRuntime().availableProcessors() + 1; + int parentNum = 5;// accept from channel socket + int childNum = needThreadNum * 2 + 5;// give to business handler + bootstrap = new ServerBootstrap(); + parentGroup = new NioEventLoopGroup(parentNum); + childGroup = new NioEventLoopGroup(childNum); + bootstrap.group(parentGroup, childGroup); + bootstrap.channel(NioServerSocketChannel.class); + // 接受连接的可连接队列大小 + bootstrap.option(ChannelOption.SO_BACKLOG, 120); + bootstrap.option(ChannelOption.SO_REUSEADDR, true); + // 设置缓存大小 + bootstrap.option(ChannelOption.SO_RCVBUF, 256 * 1024); + bootstrap.option(ChannelOption.SO_SNDBUF, 256 * 1024);// 256 KB/字节 + + bootstrap.childOption(ChannelOption.SO_KEEPALIVE, true); + bootstrap.childOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT); + /** + * 接受缓存区,动态内存分配端的算法 + */ + bootstrap.childOption(ChannelOption.RCVBUF_ALLOCATOR, AdaptiveRecvByteBufAllocator.DEFAULT); + bootstrap.childHandler(new ChannelInitializer() { + @Override + public void initChannel(SocketChannel ch) throws Exception { + ch.pipeline().addLast(new HttpResponseEncoder()); + ch.pipeline().addLast(new HttpRequestDecoder()); + ch.pipeline().addLast("aggregator", new HttpObjectAggregator(65536)); + ch.pipeline().addLast("streamer", new ChunkedWriteHandler()); + ch.pipeline().addLast(new HttpServerHandler(executor)); + } + }); + } catch (Exception e) { + closeGracefylly(); + logger.error(AkxProject.PLN + " init http server error.", e); + System.exit(-200); + } + } + + public void start(String address, int port) throws HttpServerException { + try { + ChannelFuture channelFuture = bootstrap.bind(address, port).sync(); + channelFuture.channel().closeFuture().addListener(new GenericFutureListener>() { + + @Override + public void operationComplete(Future future) throws Exception { + closeGracefylly(); + } + + }); + } catch (Exception e) { + closeGracefylly(); + throw new HttpServerException("start openzaly http-server error", e); + } + } + + private void closeGracefylly() { + try { + if (parentGroup != null) { + parentGroup.shutdownGracefully(); + parentGroup.terminationFuture().sync(); + } + if (childGroup != null) { + childGroup.shutdownGracefully(); + childGroup.terminationFuture().sync(); + } + } catch (InterruptedException e) { + logger.error("shutdown http gracefylly error.", e); + } + } + + public abstract void loadExecutor(AbstracteExecutor executor); +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/http/handler/HttpServerHandler.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/http/handler/HttpServerHandler.java new file mode 100755 index 0000000..6a5953e --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/http/handler/HttpServerHandler.java @@ -0,0 +1,250 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.http.handler; + +import java.net.InetSocketAddress; +import java.util.Base64; +import java.util.Map; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CharsetCoding; +import com.akaxin.common.constant.HttpUriAction; +import com.akaxin.common.crypto.AESCrypto; +import com.akaxin.common.executor.AbstracteExecutor; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.core.PluginProto; +import com.akaxin.site.connector.constant.AkxProject; +import com.akaxin.site.connector.constant.HttpConst; +import com.akaxin.site.connector.constant.PluginConst; +import com.akaxin.site.connector.session.PluginSession; + +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelInboundHandlerAdapter; +import io.netty.handler.codec.http.HttpContent; +import io.netty.handler.codec.http.HttpRequest; +import io.netty.handler.codec.http.LastHttpContent; + +/** + * 处理Http请求 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-11-28 18:49:38 + */ +public class HttpServerHandler extends ChannelInboundHandlerAdapter { + private static Logger logger = LoggerFactory.getLogger(HttpServerHandler.class); + + private HttpRequest request; + private String httpClientIp; + private AbstracteExecutor executor; + + public HttpServerHandler(AbstracteExecutor executor) { + this.executor = executor; + } + + @Override + public void channelActive(ChannelHandlerContext ctx) throws Exception { + logger.debug("{} client connect to http server... client={}", AkxProject.PLN, ctx.channel().toString()); + } + + @Override + public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { + try { + /** + * 一次Http请求,分两次处理,第一次处理Http消息头,第二次请求http消息体 + */ + /** + * http-request包含:
+ * 1.请求行 ,Method Request-URI Http-Version CRLF
+ * 2.消息头
+ * 3.请求正文
+ */ + if (msg instanceof HttpRequest) { + request = (HttpRequest) msg; + if (!checkLegalRequest()) { + logger.error("{} http request method error. please use post!", AkxProject.PLN); + ctx.close(); + return; + } + + String sitePluginId = request.headers().get(PluginConst.SITE_PLUGIN_ID); + + if (StringUtils.isEmpty(sitePluginId)) { + logger.error("{} http request illegal with error pluginId={}.", AkxProject.PLN, sitePluginId); + ctx.close(); + return; + } + + // set socket ip + InetSocketAddress address = (InetSocketAddress) ctx.channel().remoteAddress(); + httpClientIp = address.getAddress().getHostAddress(); + + if (!checkLegalClientIp(sitePluginId, httpClientIp)) { + logger.error("{} http request illegal IP={}.", AkxProject.PLN, httpClientIp); + ctx.close(); + return; + } + + // 检测URI,http://127.0.0.1:8280/akaxin-plugin-api/hai/user/friends + if (checkRequestUri()) { + logger.error("akaxin plugin http request illegal uri={}.", AkxProject.PLN, request.uri()); + ctx.close(); + return; + } + + logger.debug("{} request uri:{} clientIp={}", AkxProject.PLN, request.uri(), httpClientIp); + } + + /** + * HttpContent:表示HTTP实体正文和内容标头的基类
+ * method.name=POST 传输消息体存在内容 + */ + if (msg instanceof LastHttpContent) { + HttpContent content = (HttpContent) msg; + ByteBuf httpByteBuf = content.content(); + if (httpByteBuf == null) { + return; + } + + if (!checkLegalRequest()) { + ctx.close(); + return; + } + + // String clientIp = request.headers().get(HttpConst.HTTP_H_FORWARDED); + String sitePluginId = request.headers().get(PluginConst.SITE_PLUGIN_ID); + byte[] contentBytes = new byte[httpByteBuf.readableBytes()]; + httpByteBuf.readBytes(contentBytes); + httpByteBuf.release(); + + logger.debug("{} http request IP={} pluginId={}", AkxProject.PLN, httpClientIp, sitePluginId); + + if (StringUtils.isEmpty(sitePluginId)) { + logger.error("{} http request body illegal pluginId={}.", AkxProject.PLN, sitePluginId); + ctx.close(); + return; + } + + // 查询扩展的auth——key + String authKey = PluginSession.getInstance().getPluginAuthKey(sitePluginId); + logger.debug("http request ip={} pluginId={} authKey={}", httpClientIp, sitePluginId, authKey); + if (StringUtils.isNotEmpty(authKey)) { + // byte[] tsk = AESCrypto.generateTSKey(authKey); + byte[] tsk = authKey.getBytes(CharsetCoding.ISO_8859_1); + byte[] decContent = AESCrypto.decrypt(tsk, contentBytes); + contentBytes = decContent; + } + + PluginProto.ProxyPluginPackage pluginPackage = PluginProto.ProxyPluginPackage.parseFrom(contentBytes); + Map proxyHeader = pluginPackage.getPluginHeaderMap(); + + String requestTime = proxyHeader.get(PluginProto.PluginHeaderKey.PLUGIN_TIMESTAMP_VALUE); + long currentTime = System.currentTimeMillis(); + boolean timeOut = true; + if (StringUtils.isNotEmpty(requestTime)) { + long timeMills = Long.valueOf(requestTime); + if (currentTime - timeMills < 10 * 1000l) { + timeOut = false; + } + } + + logger.debug("{} client={} http request timeOut={} currTime={} reqTime={}", AkxProject.PLN, + httpClientIp, timeOut, currentTime, requestTime); + + if (!timeOut) { + Command command = new Command(); + command.setField(PluginConst.PLUGIN_AUTH_KEY, authKey); + if (proxyHeader != null) { + command.setSiteUserId(proxyHeader.get(PluginProto.PluginHeaderKey.CLIENT_SITE_USER_ID_VALUE)); + } + command.setChannelContext(ctx); + command.setUri(request.uri()); + command.setParams(Base64.getDecoder().decode(pluginPackage.getData())); + command.setClientIp(httpClientIp); + command.setStartTime(System.currentTimeMillis()); + command.setPluginId(sitePluginId); + command.setPluginAuthKey(authKey); + + logger.info("{} client={} uri={} http server handler command={}", AkxProject.PLN, httpClientIp, + request.uri(), command.toString()); + + CommandResponse response = this.executor.execute(HttpUriAction.HTTP_ACTION.getRety(), command); + LogUtils.requestResultLog(logger, command, response); + } else { + // 超时10s,认为此请求失效,直接断开连接 + ctx.close(); + logger.error("{} client={} http request error.timeOut={} currTime={} reqTime={}", AkxProject.PLN, + httpClientIp, timeOut, currentTime, requestTime); + } + } + } catch (Exception e) { + ctx.close(); + logger.error(StringHelper.format("{} http request error.", AkxProject.PLN), e); + } + } + + @Override + public void channelReadComplete(ChannelHandlerContext ctx) throws Exception { + ctx.flush(); + } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { + ctx.close(); + logger.error(StringHelper.format("{} channel exception caught", AkxProject.PLN), cause); + } + + /** + * 所有扩展请求站点的http服务请求,全部使用post请求 + * + * @return + */ + private boolean checkLegalRequest() { + String methodName = request.method().name(); + if (HttpConst.HTTP_M_POST.equals(methodName)) { + return true; + } + return false; + } + + // 预留处理请求ip过滤 + private boolean checkLegalClientIp(String pluginId, String ip) { + // #TODO 使用缓存 + String allowIps = PluginSession.getInstance().getPluginAllowIp(pluginId); + if (StringUtils.isNotEmpty(allowIps)) { + if (!allowIps.contains(ip)) { + return false; + } + } + return true; + } + + private boolean checkRequestUri() { + String uri = request.uri(); + if (StringUtils.isNotEmpty(uri)) { + return uri.startsWith("/akaxin-plugin-api/hai/") || uri.startsWith("//akaxin-plugin-api/hai/") + || uri.startsWith("akaxin-plugin-api/hai/"); + } + return false; + } + +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/netty/NettyServer.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/netty/NettyServer.java new file mode 100755 index 0000000..d5d8d7b --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/netty/NettyServer.java @@ -0,0 +1,186 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.netty; + +import java.util.concurrent.TimeUnit; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.executor.AbstracteExecutor; +import com.akaxin.common.executor.SimpleExecutor; +import com.akaxin.site.connector.codec.protocol.MessageDecoder; +import com.akaxin.site.connector.codec.protocol.MessageEncoder; +import com.akaxin.site.connector.constant.AkxProject; +import com.akaxin.site.connector.exception.TcpServerException; +import com.akaxin.site.connector.netty.handler.NettyServerHandler; + +import io.netty.bootstrap.ServerBootstrap; +import io.netty.buffer.PooledByteBufAllocator; +import io.netty.channel.AdaptiveRecvByteBufAllocator; +import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelInitializer; +import io.netty.channel.ChannelOption; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.socket.SocketChannel; +import io.netty.channel.socket.nio.NioServerSocketChannel; +import io.netty.handler.logging.LogLevel; +import io.netty.handler.logging.LoggingHandler; +import io.netty.handler.timeout.IdleStateHandler; +import io.netty.handler.timeout.ReadTimeoutHandler; +import io.netty.handler.timeout.WriteTimeoutHandler; +import io.netty.util.concurrent.Future; +import io.netty.util.concurrent.GenericFutureListener; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-10-20 14:40:15 + */ +public abstract class NettyServer { + private static final Logger logger = LoggerFactory.getLogger(NettyServer.class); + private AbstracteExecutor executor; + private ServerBootstrap bootstrap; + private EventLoopGroup parentGroup; + private EventLoopGroup childGroup; + + public NettyServer() { + try { + bootstrap = new ServerBootstrap(); + int needThreadNum = Runtime.getRuntime().availableProcessors() + 1; + int parentNum = 10;// accept from channel socket + int childNum = needThreadNum * 5 + 10;// give to business handler + // 处理服务端事件组 + parentGroup = new NioEventLoopGroup(parentNum, new PrefixThreadFactory("bim-boss-evenloopgroup")); + // 处理客户端连接请求的事件组 + childGroup = new NioEventLoopGroup(childNum, new PrefixThreadFactory("bim-worker-evenloopgroup")); + // 用户处理所有的channel + bootstrap.group(parentGroup, childGroup); + bootstrap.channel(NioServerSocketChannel.class); + /** + * 对应的是tcp/ip协议listen函数中的backlog参数,函数listen(int socketfd,int + * backlog)用来初始化服务端可连接队列. 服务端处理客户端连接请求是顺序处理的,所以同一时间只能处理一个客户端连接,多个客户端来的时候, + * 服务端将不能处理的客户端连接请求放在队列中等待处理,backlog参数指定了队列的大小 + */ + bootstrap.option(ChannelOption.SO_BACKLOG, 2000); + /** + * 允许监听的端口共存 + */ + bootstrap.option(ChannelOption.SO_REUSEADDR, true); + /** + * ChannelOption.SO_SNDBUF参数对应于套接字选项中的SO_SNDBUF, + * ChannelOption.SO_RCVBUF参数对应于套接字选项中的SO_RCVBUF这两个参数 + * 用于操作接收缓冲区和发送缓冲区的大小,接收缓冲区用于保存网络协议站内收到的数据, 直到应用程序读取成功,发送缓冲区用于保存发送数据,直到发送成 + */ + bootstrap.option(ChannelOption.SO_RCVBUF, 256 * 1024); + bootstrap.option(ChannelOption.SO_SNDBUF, 256 * 1024);// 256 KB/字节 + /** + * 在4.x版本中,UnpooledByteBufAllocator是默认的allocator,尽管其存在某些限制。 + * 现在PooledByteBufAllocator已经广泛使用一段时间,并且我们有了增强的缓冲区泄漏追踪机制, + * 所以是时候让PooledByteBufAllocator成为默认了。
+ * 总结:Netty4使用对象池,重用缓冲区 + */ + bootstrap.option(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT); + /** + * 当设置该选项以后,如果在两小时内没有数据的通信时,TCP会自动发送一个活动探测数据报文。 + */ + bootstrap.childOption(ChannelOption.SO_KEEPALIVE, true); + /** + * Nagle算法是将小的数据包组装为更大的帧然后进行发送,而不是输入一次发送一次, 因此在数据包不足的时候会等待其他数据的到了,组装成大的数据包进行发送, + * 虽然该方式有效提高网络的有效负载, 但是却造成了延时, + * 而该参数的作用就是禁止使用Nagle算法,使用于小数据即时传输,于TCP_NODELAY相对应的是TCP_CORK, + * 该选项是需要等到发送的数据量最大的时候,一次性发送 + */ + bootstrap.childOption(ChannelOption.TCP_NODELAY, true); + bootstrap.childOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT); + /** + * 接受缓存区,动态内存分配端的算法 + */ + bootstrap.childOption(ChannelOption.RCVBUF_ALLOCATOR, AdaptiveRecvByteBufAllocator.DEFAULT); + // the ChannelHandler to use for serving the requests. + bootstrap.handler(new LoggingHandler(LogLevel.DEBUG)); + // Set the ChannelHandler which is used to serve the request for the + // Channel's + bootstrap.childHandler(new NettyChannelInitializer()); + + executor = new SimpleExecutor(); + loadExecutor(executor); + } catch (Exception e) { + closeGracefully(); + logger.error(AkxProject.PLN + " init openzaly netty-server error.", e); + System.exit(-10); + } + } + + public void start(String address, int port) throws TcpServerException { + try { + ChannelFuture channelFuture = bootstrap.bind(address, port).sync(); + channelFuture.channel().closeFuture().addListener(new GenericFutureListener>() { + + @Override + public void operationComplete(Future future) throws Exception { + closeGracefully(); + } + }); + } catch (Exception e) { + closeGracefully(); + throw new TcpServerException("start openzaly tcp-server error", e); + } + } + + private class NettyChannelInitializer extends ChannelInitializer { + @Override + protected void initChannel(SocketChannel channel) throws Exception { + // SSLEngine sslEngine = + // NettySocketSslContext.getInstance().getServerContext().createSSLEngine(); + + channel.pipeline().addLast(new MessageDecoder()); + channel.pipeline().addLast(new MessageEncoder()); + channel.pipeline().addLast("timeout", new IdleStateHandler(60 * 5, 60 * 5, 60 * 5, TimeUnit.SECONDS)); + + // ch.pipeline().addLast(new SslHandler(sslEngine)); + + channel.pipeline().addLast("readTimeoutHandler", new ReadTimeoutHandler(60 * 5, TimeUnit.SECONDS)); + channel.pipeline().addLast("writeTimeoutHandler", new WriteTimeoutHandler(60 * 5, TimeUnit.SECONDS)); + channel.pipeline().addLast(new NettyServerHandler(executor)); + } + + } + + private void closeGracefully() { + try { + if (parentGroup != null) { + // terminate all threads + parentGroup.shutdownGracefully(); + // wait for all threads terminated + parentGroup.terminationFuture().sync(); + } + if (childGroup != null) { + // terminate all threads + childGroup.shutdownGracefully(); + // wait for all threads terminated + childGroup.terminationFuture().sync(); + } + } catch (Exception es) { + logger.error(AkxProject.PLN + " shutdown netty gracefully error.", es); + } + } + + public abstract void loadExecutor(AbstracteExecutor executor); +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/netty/PrefixThreadFactory.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/netty/PrefixThreadFactory.java new file mode 100755 index 0000000..a03b811 --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/netty/PrefixThreadFactory.java @@ -0,0 +1,51 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.netty; + +import java.util.concurrent.ThreadFactory; +import java.util.concurrent.atomic.AtomicInteger; + +public class PrefixThreadFactory implements ThreadFactory { + + private final ThreadGroup threadGroup; + private final String prefix; + private final boolean isDaemon; + private final AtomicInteger sequence = new AtomicInteger(0); + + public PrefixThreadFactory(String namePrefix) { + this(namePrefix, false); + } + + public PrefixThreadFactory(String threadNamePrefix, boolean isDaemon) { + SecurityManager securityManager = System.getSecurityManager(); + this.threadGroup = (securityManager == null) ? Thread.currentThread().getThreadGroup() + : securityManager.getThreadGroup(); + this.prefix = threadNamePrefix + "-thread-"; + this.isDaemon = isDaemon; + } + + public ThreadGroup getThreadGroup() { + return threadGroup; + } + + public Thread newThread(Runnable r) { + final String name = prefix + sequence.getAndIncrement(); + Thread thread = new Thread(threadGroup, r, name, 0); + thread.setDaemon(isDaemon); + return thread; + } + +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/netty/handler/NettyServerHandler.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/netty/handler/NettyServerHandler.java new file mode 100755 index 0000000..332e630 --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/netty/handler/NettyServerHandler.java @@ -0,0 +1,175 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.netty.handler; + +import java.net.InetSocketAddress; +import java.util.Map; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.channel.ChannelManager; +import com.akaxin.common.channel.ChannelSession; +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.constant.RequestAction; +import com.akaxin.common.executor.AbstracteExecutor; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.site.connector.codec.parser.ChannelConst; +import com.akaxin.site.connector.constant.AkxProject; +import com.akaxin.site.connector.session.SessionManager; + +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.SimpleChannelInboundHandler; + +/** + * Netty处理TCP链接中接受客户端传入的消息 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.11.07 16:56:36 + */ +public class NettyServerHandler extends SimpleChannelInboundHandler { + private static final Logger logger = LoggerFactory.getLogger(NettyServerHandler.class); + private AbstracteExecutor executor; + + public NettyServerHandler(AbstracteExecutor executor) { + this.executor = executor; + } + + @Override + public void channelActive(ChannelHandlerContext ctx) throws Exception { + InetSocketAddress socketAddress = (InetSocketAddress) ctx.channel().remoteAddress(); + String clientIp = socketAddress.getAddress().getHostAddress(); + ctx.channel().attr(ChannelConst.CHANNELSESSION).set(new ChannelSession(ctx.channel())); + logger.debug("{} client={} connect to Netty Server...", AkxProject.PLN, clientIp); + } + + @Override + public void channelInactive(ChannelHandlerContext ctx) throws Exception { + InetSocketAddress socketAddress = (InetSocketAddress) ctx.channel().remoteAddress(); + String clientIp = socketAddress.getAddress().getHostAddress(); + logger.debug("{} client={} close connection... ChannelSize={}", AkxProject.PLN, clientIp, + ChannelManager.getChannelSessionSize()); + + ChannelSession channelSession = ctx.channel().attr(ChannelConst.CHANNELSESSION).get(); + if (channelSession.getCtype() == 1 && StringUtils.isNotEmpty(channelSession.getUserId())) { + ChannelManager.delChannelSession(channelSession.getDeviceId()); + String siteUserId = channelSession.getUserId(); + String deviceId = channelSession.getDeviceId(); + boolean offRes = SessionManager.getInstance().setUserOffline(siteUserId, deviceId); + + logger.debug("{} set client={} siteUserId={} deviceId={} offline-status:{} ChannelSize={}", AkxProject.PLN, + clientIp, siteUserId, deviceId, offRes, ChannelManager.getChannelSessionSize()); + } + } + + @Override + protected void channelRead0(ChannelHandlerContext ctx, RedisCommand redisCmd) throws Exception { + InetSocketAddress socketAddress = (InetSocketAddress) ctx.channel().remoteAddress(); + String clientIp = socketAddress.getAddress().getHostAddress(); + ChannelSession channelSession = ctx.channel().attr(ChannelConst.CHANNELSESSION).get(); + + // Channel不可用情况下,关闭连接事件 + // disconnect tcp connection as channel is unavailable + if (channelSession.getChannel() == null || !channelSession.getChannel().isActive()) { + ctx.disconnect();// 断开连接事件(与对方的连接断开) + logger.warn("{} close client={} as its channel is not active ", AkxProject.PLN, clientIp); + } + + String version = redisCmd.getParameterByIndex(0);// 网络协议版本1.0 + String action = redisCmd.getParameterByIndex(1); + byte[] params = redisCmd.getBytesParamByIndex(2); + CoreProto.TransportPackageData packageData = CoreProto.TransportPackageData.parseFrom(params); + + Map header = packageData.getHeaderMap(); + + Command command = new Command(); + command.setClientIp(clientIp); + command.setSiteUserId(channelSession.getUserId()); + command.setDeviceId(channelSession.getDeviceId()); + command.setAction(action); + command.setHeader(header); + if (header != null) { + command.setClientVersion(header.get(CoreProto.HeaderKey.CLIENT_SOCKET_VERSION_VALUE)); + } + command.setParams(packageData.getData().toByteArray()); + command.setChannelSession(channelSession); + command.setStartTime(System.currentTimeMillis()); + + if (!RequestAction.IM_CTS_PING.getName().equalsIgnoreCase(command.getAction())) { + logger.debug("{} client={} -> site version={} action={} params-length={}", AkxProject.PLN, clientIp, + version, action, params.length); + } + + if (RequestAction.IM.getName().equals(command.getRety())) { + // 如果是syncFinish,则这里需要修改channel中的syncFinTime + channelSession.setActionForPsn(action); + // 单独处理im.site.hello && im.site.auth + if (RequestAction.SITE.getName().equalsIgnoreCase(command.getService())) { + String anoRequest = command.getRety() + "." + command.getService(); + command.setRety(anoRequest); + } + CommandResponse response = this.executor.execute(command.getRety(), command); + + if (!RequestAction.IM_CTS_PING.getName().equals(command.getAction())) { + // 输出IM请求结果 + LogUtils.requestResultLog(logger, command, response); + } + } else if (RequestAction.API.getName().equalsIgnoreCase(command.getRety())) { + CommandResponse response = this.executor.execute(command.getRety(), command); + // 输出API请求结果 + LogUtils.requestResultLog(logger, command, response); + } else { + /** + *
+			 * 
+			 * pipeline.addLast("A", new AHandler());
+			 * pipeline.addLast("B", new BHandler());
+			 * pipeline.addLast("C", new CHandler());
+			 * 
+			 * ctx.close() && channel().close();
+			 * 		ctx.close(): close the channel in current handler,will start from the tail of the ChannelPipeline
+			 * 				do A.close() ,B.close(),C.close();
+			 * 		channel().close():close channel in all handler from pointer
+			 * 				do C.close() , B.close(), A.close();
+			 * 
+ */ + ctx.channel().close();// 关闭channel事件(关闭自己的连接) + logger.error("{} client={} siteUserId={} action={} unknow request method", AkxProject.PLN, + command.getClientIp(), command.getSiteUserId(), command.getAction()); + return; + } + } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { + InetSocketAddress socketAddress = (InetSocketAddress) ctx.channel().remoteAddress(); + String clientIp = socketAddress.getAddress().getHostAddress(); + ctx.close(); + logger.error(StringHelper.format("{} client{} channel exeception happen.", AkxProject.PLN, clientIp), cause); + } + + @Override + public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { + // 设置idle,触发此方法 + // logger.info("user event triggered evt={}", evt.toString()); + } + +} \ No newline at end of file diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/session/PluginSession.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/session/PluginSession.java new file mode 100755 index 0000000..efc8f20 --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/session/PluginSession.java @@ -0,0 +1,81 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.session; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.utils.StringHelper; +import com.akaxin.site.connector.constant.AkxProject; +import com.akaxin.site.storage.api.IPluginDao; +import com.akaxin.site.storage.bean.PluginBean; +import com.akaxin.site.storage.service.PluginServiceDao; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-03-20 18:41:59 + */ +public class PluginSession { + private static final Logger logger = LoggerFactory.getLogger(PluginSession.class); + + private IPluginDao pluginDao = new PluginServiceDao(); + + public static PluginSession getInstance() { + return SingletonHolder.instance; + } + + static class SingletonHolder { + private static PluginSession instance = new PluginSession(); + } + + public PluginBean getPlugin(String sitePluginId) { + try { + int pluginId = Integer.valueOf(sitePluginId); + return pluginDao.getPluginProfile(pluginId); + } catch (Exception e) { + logger.error(StringHelper.format("{} get plugin error pluginId={}", AkxProject.PLN, sitePluginId), e); + } + return null; + } + + public String getPluginAuthKey(String sitePluginId) { + try { + int pluginId = Integer.valueOf(sitePluginId); + PluginBean bean = pluginDao.getPluginProfile(pluginId); + if (bean != null) { + return bean.getAuthKey(); + } + } catch (Exception e) { + logger.error(StringHelper.format("{} get plugin authKey error pluginId={}", AkxProject.PLN, sitePluginId), + e); + } + return null; + } + + public String getPluginAllowIp(String sitePluginId) { + try { + int pluginId = Integer.valueOf(sitePluginId); + PluginBean bean = pluginDao.getPluginProfile(pluginId); + if (bean != null) { + return bean.getAllowedIp(); + } + } catch (Exception e) { + logger.error(StringHelper.format("{} get plugin allowIp error pluginId={}", AkxProject.PLN, sitePluginId), + e); + } + return null; + } +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/session/SessionManager.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/session/SessionManager.java new file mode 100755 index 0000000..22c8930 --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/session/SessionManager.java @@ -0,0 +1,51 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.session; + +import com.akaxin.site.storage.bean.SimpleAuthBean; + +/** + * 管理用户session,设置用户在线/离线状态。 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.11.04 11:24:35 + */ +public class SessionManager { + + public static SessionManager getInstance() { + return SingletonHolder.instance; + } + + static class SingletonHolder { + private static SessionManager instance = new SessionManager(); + } + + public SimpleAuthBean getAuthSession(String sessionId) { + return UserSession.getInstance().getUserSession(sessionId); + } + + public boolean setUserOnline(String siteUserId, String deviceId) { + return UserSession.getInstance().updateSessionOnline(siteUserId, deviceId); + } + + public boolean setUserOffline(String siteUserId, String deviceId) { + return UserSession.getInstance().updateSessionOffline(siteUserId, deviceId); + } + + public boolean updateActiveTime(String siteUserId, String deviceId) { + return UserSession.getInstance().updateActiveTime(siteUserId, deviceId); + } +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/session/UserSession.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/session/UserSession.java new file mode 100755 index 0000000..dad204a --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/session/UserSession.java @@ -0,0 +1,88 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.session; + +import java.sql.SQLException; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.site.storage.api.IUserDeviceDao; +import com.akaxin.site.storage.api.IUserSessionDao; +import com.akaxin.site.storage.bean.SimpleAuthBean; +import com.akaxin.site.storage.service.DeviceDaoService; +import com.akaxin.site.storage.service.UserSessionDaoService; + +/** + * 负责用户session表数据更新 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-11-04 11:17:13 + */ +public class UserSession { + private static final Logger logger = LoggerFactory.getLogger(UserSession.class); + private IUserSessionDao userSessionDao = new UserSessionDaoService(); + private IUserDeviceDao userDeviceDao = new DeviceDaoService(); + + private UserSession() { + + } + + public static UserSession getInstance() { + return SingletonHolder.instance; + } + + static class SingletonHolder { + private static UserSession instance = new UserSession(); + } + + public SimpleAuthBean getUserSession(String sessionId) { + SimpleAuthBean bean = new SimpleAuthBean(); + try { + bean = userSessionDao.getUserSession(sessionId); + } catch (SQLException e) { + logger.error("get user session error.", e); + } + return bean; + } + + public boolean updateSessionOnline(String siteUserId, String deviceId) { + try { + return userSessionDao.onlineSession(siteUserId, deviceId); + } catch (SQLException e) { + logger.error("set user online error.", e); + } + return false; + } + + public boolean updateSessionOffline(String siteUserId, String deviceId) { + try { + return userSessionDao.offlineSession(siteUserId, deviceId); + } catch (SQLException e) { + logger.error("set user offline error.", e); + } + return false; + } + + public boolean updateActiveTime(String siteUserId, String deviceId) { + try { + return userDeviceDao.updateActiveTime(siteUserId, deviceId); + } catch (SQLException e) { + logger.error("update active time", e); + } + return false; + } +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/ssl/NettySocketSslContext.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/ssl/NettySocketSslContext.java new file mode 100755 index 0000000..243ff17 --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/ssl/NettySocketSslContext.java @@ -0,0 +1,66 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.connector.ssl; + +import java.security.KeyStore; + +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; + +import io.netty.util.internal.SystemPropertyUtil; + +public class NettySocketSslContext { + private static final String PROTOCOL = "TLS"; + + private SSLContext serverContext; + + private NettySocketSslContext() { + String algorithm = SystemPropertyUtil.get("ssl.KeyManagerFactory.algorithm"); + if (algorithm == null) { + algorithm = "SunX509"; + } + + try { + // + KeyStore keystore = KeyStore.getInstance("JKS"); + keystore.load(SslKeyStore.asInputStream(), SslKeyStore.getKeyStorePassword()); + + // Set up key manager factory to use our key store + KeyManagerFactory kmf = KeyManagerFactory.getInstance(algorithm); + kmf.init(keystore, SslKeyStore.getCertificatePassword()); + + // Initialize the SSLContext to work with our key managers. + serverContext = SSLContext.getInstance(PROTOCOL); + serverContext.init(kmf.getKeyManagers(), null, null); + } catch (Exception e) { + throw new Error("Failed to initialize the server-side SSLContext", e); + } + + } + + public static NettySocketSslContext getInstance() { + return SingletonHolder.instance; + } + + private static class SingletonHolder { + static NettySocketSslContext instance = new NettySocketSslContext(); + } + + public SSLContext getServerContext() { + return serverContext; + } + +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/ssl/SslKeyStore.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/ssl/SslKeyStore.java new file mode 100755 index 0000000..604f48f --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/ssl/SslKeyStore.java @@ -0,0 +1,274 @@ +package com.akaxin.site.connector.ssl; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.security.KeyStore; + +public class SslKeyStore { + private static final byte[] JKS_CERT_BYTES = { (byte) 254, (byte) 237, (byte) 254, (byte) 237, (byte) 0, (byte) 0, + (byte) 0, (byte) 2, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 1, + (byte) 0, (byte) 12, (byte) 115, (byte) 101, (byte) 99, (byte) 117, (byte) 114, (byte) 101, (byte) 115, + (byte) 111, (byte) 99, (byte) 107, (byte) 101, (byte) 116, (byte) 0, (byte) 0, (byte) 1, (byte) 69, + (byte) 231, (byte) 201, (byte) 156, (byte) 140, (byte) 0, (byte) 0, (byte) 5, (byte) 0, (byte) 48, + (byte) 130, (byte) 4, (byte) 252, (byte) 48, (byte) 14, (byte) 6, (byte) 10, (byte) 43, (byte) 6, (byte) 1, + (byte) 4, (byte) 1, (byte) 42, (byte) 2, (byte) 17, (byte) 1, (byte) 1, (byte) 5, (byte) 0, (byte) 4, + (byte) 130, (byte) 4, (byte) 232, (byte) 221, (byte) 18, (byte) 203, (byte) 171, (byte) 175, (byte) 82, + (byte) 132, (byte) 227, (byte) 115, (byte) 143, (byte) 38, (byte) 191, (byte) 42, (byte) 202, (byte) 130, + (byte) 171, (byte) 75, (byte) 6, (byte) 161, (byte) 120, (byte) 204, (byte) 61, (byte) 106, (byte) 160, + (byte) 81, (byte) 9, (byte) 204, (byte) 153, (byte) 166, (byte) 38, (byte) 246, (byte) 13, (byte) 43, + (byte) 19, (byte) 100, (byte) 132, (byte) 45, (byte) 90, (byte) 143, (byte) 1, (byte) 231, (byte) 182, + (byte) 89, (byte) 228, (byte) 183, (byte) 17, (byte) 95, (byte) 129, (byte) 229, (byte) 42, (byte) 182, + (byte) 126, (byte) 114, (byte) 76, (byte) 124, (byte) 123, (byte) 246, (byte) 152, (byte) 0, (byte) 141, + (byte) 212, (byte) 111, (byte) 52, (byte) 243, (byte) 112, (byte) 31, (byte) 117, (byte) 124, (byte) 142, + (byte) 24, (byte) 59, (byte) 198, (byte) 164, (byte) 253, (byte) 21, (byte) 177, (byte) 189, (byte) 74, + (byte) 218, (byte) 110, (byte) 83, (byte) 154, (byte) 49, (byte) 186, (byte) 159, (byte) 173, (byte) 202, + (byte) 94, (byte) 174, (byte) 183, (byte) 223, (byte) 119, (byte) 109, (byte) 110, (byte) 72, (byte) 93, + (byte) 208, (byte) 195, (byte) 19, (byte) 89, (byte) 33, (byte) 34, (byte) 186, (byte) 12, (byte) 86, + (byte) 156, (byte) 156, (byte) 210, (byte) 111, (byte) 110, (byte) 44, (byte) 106, (byte) 36, (byte) 67, + (byte) 168, (byte) 7, (byte) 179, (byte) 244, (byte) 53, (byte) 134, (byte) 10, (byte) 86, (byte) 179, + (byte) 34, (byte) 60, (byte) 184, (byte) 179, (byte) 162, (byte) 69, (byte) 24, (byte) 168, (byte) 100, + (byte) 183, (byte) 206, (byte) 64, (byte) 4, (byte) 32, (byte) 66, (byte) 237, (byte) 228, (byte) 92, + (byte) 6, (byte) 213, (byte) 141, (byte) 147, (byte) 198, (byte) 141, (byte) 216, (byte) 41, (byte) 0, + (byte) 101, (byte) 65, (byte) 41, (byte) 185, (byte) 128, (byte) 229, (byte) 107, (byte) 25, (byte) 89, + (byte) 148, (byte) 16, (byte) 194, (byte) 101, (byte) 100, (byte) 243, (byte) 147, (byte) 77, (byte) 230, + (byte) 11, (byte) 151, (byte) 99, (byte) 124, (byte) 55, (byte) 195, (byte) 185, (byte) 30, (byte) 234, + (byte) 83, (byte) 61, (byte) 109, (byte) 131, (byte) 156, (byte) 244, (byte) 133, (byte) 66, (byte) 39, + (byte) 153, (byte) 9, (byte) 34, (byte) 218, (byte) 201, (byte) 143, (byte) 190, (byte) 127, (byte) 119, + (byte) 102, (byte) 6, (byte) 83, (byte) 134, (byte) 96, (byte) 170, (byte) 79, (byte) 196, (byte) 214, + (byte) 47, (byte) 215, (byte) 37, (byte) 250, (byte) 64, (byte) 8, (byte) 165, (byte) 203, (byte) 44, + (byte) 53, (byte) 113, (byte) 147, (byte) 251, (byte) 29, (byte) 26, (byte) 38, (byte) 193, (byte) 11, + (byte) 223, (byte) 212, (byte) 114, (byte) 96, (byte) 162, (byte) 39, (byte) 48, (byte) 200, (byte) 172, + (byte) 182, (byte) 254, (byte) 180, (byte) 198, (byte) 11, (byte) 128, (byte) 75, (byte) 74, (byte) 93, + (byte) 226, (byte) 157, (byte) 80, (byte) 14, (byte) 9, (byte) 217, (byte) 236, (byte) 205, (byte) 153, + (byte) 35, (byte) 242, (byte) 130, (byte) 140, (byte) 25, (byte) 16, (byte) 156, (byte) 247, (byte) 230, + (byte) 5, (byte) 247, (byte) 0, (byte) 34, (byte) 196, (byte) 15, (byte) 118, (byte) 255, (byte) 185, + (byte) 199, (byte) 59, (byte) 99, (byte) 27, (byte) 187, (byte) 83, (byte) 81, (byte) 12, (byte) 71, + (byte) 69, (byte) 127, (byte) 130, (byte) 164, (byte) 97, (byte) 195, (byte) 216, (byte) 215, (byte) 61, + (byte) 29, (byte) 196, (byte) 62, (byte) 160, (byte) 188, (byte) 209, (byte) 173, (byte) 230, (byte) 0, + (byte) 204, (byte) 225, (byte) 1, (byte) 5, (byte) 42, (byte) 223, (byte) 232, (byte) 187, (byte) 190, + (byte) 67, (byte) 126, (byte) 235, (byte) 178, (byte) 218, (byte) 179, (byte) 46, (byte) 186, (byte) 156, + (byte) 186, (byte) 6, (byte) 191, (byte) 68, (byte) 239, (byte) 31, (byte) 16, (byte) 204, (byte) 24, + (byte) 68, (byte) 164, (byte) 88, (byte) 10, (byte) 174, (byte) 26, (byte) 54, (byte) 187, (byte) 149, + (byte) 132, (byte) 128, (byte) 173, (byte) 165, (byte) 8, (byte) 69, (byte) 96, (byte) 49, (byte) 57, + (byte) 223, (byte) 110, (byte) 29, (byte) 215, (byte) 98, (byte) 42, (byte) 15, (byte) 153, (byte) 228, + (byte) 216, (byte) 61, (byte) 160, (byte) 230, (byte) 34, (byte) 40, (byte) 232, (byte) 136, (byte) 139, + (byte) 140, (byte) 236, (byte) 251, (byte) 119, (byte) 242, (byte) 199, (byte) 167, (byte) 61, (byte) 141, + (byte) 89, (byte) 29, (byte) 82, (byte) 114, (byte) 229, (byte) 198, (byte) 27, (byte) 133, (byte) 87, + (byte) 0, (byte) 53, (byte) 69, (byte) 42, (byte) 91, (byte) 174, (byte) 82, (byte) 244, (byte) 160, + (byte) 82, (byte) 142, (byte) 221, (byte) 106, (byte) 151, (byte) 241, (byte) 214, (byte) 64, (byte) 14, + (byte) 28, (byte) 2, (byte) 3, (byte) 145, (byte) 143, (byte) 18, (byte) 165, (byte) 247, (byte) 178, + (byte) 211, (byte) 16, (byte) 222, (byte) 76, (byte) 60, (byte) 119, (byte) 130, (byte) 199, (byte) 230, + (byte) 229, (byte) 3, (byte) 22, (byte) 100, (byte) 135, (byte) 103, (byte) 60, (byte) 181, (byte) 191, + (byte) 56, (byte) 249, (byte) 181, (byte) 169, (byte) 210, (byte) 25, (byte) 152, (byte) 201, (byte) 226, + (byte) 119, (byte) 71, (byte) 204, (byte) 70, (byte) 220, (byte) 103, (byte) 46, (byte) 166, (byte) 125, + (byte) 40, (byte) 86, (byte) 208, (byte) 114, (byte) 138, (byte) 24, (byte) 27, (byte) 219, (byte) 123, + (byte) 161, (byte) 52, (byte) 14, (byte) 38, (byte) 244, (byte) 112, (byte) 238, (byte) 121, (byte) 90, + (byte) 34, (byte) 157, (byte) 131, (byte) 53, (byte) 245, (byte) 162, (byte) 89, (byte) 188, (byte) 6, + (byte) 202, (byte) 164, (byte) 130, (byte) 34, (byte) 232, (byte) 74, (byte) 45, (byte) 137, (byte) 164, + (byte) 200, (byte) 197, (byte) 247, (byte) 64, (byte) 110, (byte) 122, (byte) 49, (byte) 116, (byte) 137, + (byte) 253, (byte) 170, (byte) 232, (byte) 120, (byte) 26, (byte) 171, (byte) 228, (byte) 229, (byte) 49, + (byte) 56, (byte) 56, (byte) 106, (byte) 110, (byte) 12, (byte) 109, (byte) 93, (byte) 105, (byte) 241, + (byte) 196, (byte) 11, (byte) 18, (byte) 89, (byte) 108, (byte) 146, (byte) 224, (byte) 161, (byte) 181, + (byte) 236, (byte) 74, (byte) 128, (byte) 24, (byte) 239, (byte) 22, (byte) 146, (byte) 0, (byte) 69, + (byte) 182, (byte) 246, (byte) 43, (byte) 59, (byte) 208, (byte) 33, (byte) 48, (byte) 81, (byte) 0, + (byte) 70, (byte) 225, (byte) 222, (byte) 122, (byte) 178, (byte) 138, (byte) 12, (byte) 207, (byte) 233, + (byte) 164, (byte) 13, (byte) 176, (byte) 123, (byte) 95, (byte) 68, (byte) 238, (byte) 134, (byte) 66, + (byte) 95, (byte) 194, (byte) 192, (byte) 225, (byte) 244, (byte) 14, (byte) 78, (byte) 53, (byte) 189, + (byte) 217, (byte) 229, (byte) 203, (byte) 192, (byte) 34, (byte) 38, (byte) 169, (byte) 63, (byte) 239, + (byte) 128, (byte) 172, (byte) 143, (byte) 75, (byte) 7, (byte) 237, (byte) 125, (byte) 179, (byte) 235, + (byte) 229, (byte) 98, (byte) 8, (byte) 211, (byte) 237, (byte) 116, (byte) 75, (byte) 27, (byte) 211, + (byte) 131, (byte) 245, (byte) 89, (byte) 150, (byte) 35, (byte) 49, (byte) 207, (byte) 113, (byte) 237, + (byte) 114, (byte) 125, (byte) 134, (byte) 191, (byte) 110, (byte) 30, (byte) 119, (byte) 131, (byte) 175, + (byte) 166, (byte) 201, (byte) 255, (byte) 200, (byte) 1, (byte) 126, (byte) 163, (byte) 172, (byte) 52, + (byte) 118, (byte) 184, (byte) 221, (byte) 165, (byte) 167, (byte) 165, (byte) 20, (byte) 135, (byte) 32, + (byte) 222, (byte) 188, (byte) 250, (byte) 64, (byte) 161, (byte) 67, (byte) 236, (byte) 212, (byte) 131, + (byte) 44, (byte) 32, (byte) 70, (byte) 0, (byte) 24, (byte) 178, (byte) 83, (byte) 155, (byte) 145, + (byte) 136, (byte) 131, (byte) 120, (byte) 181, (byte) 164, (byte) 155, (byte) 172, (byte) 41, (byte) 213, + (byte) 164, (byte) 98, (byte) 169, (byte) 152, (byte) 184, (byte) 170, (byte) 107, (byte) 7, (byte) 21, + (byte) 228, (byte) 175, (byte) 192, (byte) 238, (byte) 68, (byte) 197, (byte) 119, (byte) 228, (byte) 225, + (byte) 156, (byte) 235, (byte) 241, (byte) 172, (byte) 171, (byte) 236, (byte) 128, (byte) 78, (byte) 117, + (byte) 152, (byte) 123, (byte) 93, (byte) 156, (byte) 57, (byte) 238, (byte) 211, (byte) 188, (byte) 47, + (byte) 62, (byte) 45, (byte) 127, (byte) 58, (byte) 38, (byte) 29, (byte) 131, (byte) 95, (byte) 85, + (byte) 149, (byte) 112, (byte) 215, (byte) 207, (byte) 41, (byte) 201, (byte) 30, (byte) 149, (byte) 73, + (byte) 245, (byte) 179, (byte) 176, (byte) 246, (byte) 203, (byte) 204, (byte) 252, (byte) 13, (byte) 98, + (byte) 151, (byte) 93, (byte) 87, (byte) 241, (byte) 166, (byte) 46, (byte) 249, (byte) 148, (byte) 49, + (byte) 141, (byte) 136, (byte) 49, (byte) 77, (byte) 250, (byte) 191, (byte) 157, (byte) 90, (byte) 84, + (byte) 51, (byte) 129, (byte) 133, (byte) 66, (byte) 253, (byte) 99, (byte) 243, (byte) 34, (byte) 142, + (byte) 197, (byte) 4, (byte) 126, (byte) 7, (byte) 217, (byte) 126, (byte) 205, (byte) 250, (byte) 141, + (byte) 231, (byte) 225, (byte) 203, (byte) 171, (byte) 246, (byte) 201, (byte) 48, (byte) 96, (byte) 207, + (byte) 74, (byte) 253, (byte) 120, (byte) 114, (byte) 163, (byte) 192, (byte) 24, (byte) 12, (byte) 10, + (byte) 210, (byte) 94, (byte) 136, (byte) 152, (byte) 185, (byte) 109, (byte) 87, (byte) 35, (byte) 159, + (byte) 238, (byte) 122, (byte) 200, (byte) 107, (byte) 103, (byte) 243, (byte) 250, (byte) 152, (byte) 68, + (byte) 66, (byte) 170, (byte) 0, (byte) 134, (byte) 229, (byte) 168, (byte) 182, (byte) 30, (byte) 89, + (byte) 240, (byte) 121, (byte) 106, (byte) 148, (byte) 142, (byte) 49, (byte) 242, (byte) 215, (byte) 233, + (byte) 57, (byte) 120, (byte) 204, (byte) 180, (byte) 239, (byte) 199, (byte) 133, (byte) 255, (byte) 71, + (byte) 3, (byte) 132, (byte) 228, (byte) 110, (byte) 66, (byte) 227, (byte) 122, (byte) 82, (byte) 118, + (byte) 173, (byte) 218, (byte) 54, (byte) 99, (byte) 167, (byte) 154, (byte) 3, (byte) 189, (byte) 25, + (byte) 123, (byte) 169, (byte) 42, (byte) 184, (byte) 59, (byte) 36, (byte) 131, (byte) 206, (byte) 248, + (byte) 90, (byte) 32, (byte) 183, (byte) 86, (byte) 62, (byte) 149, (byte) 107, (byte) 243, (byte) 71, + (byte) 197, (byte) 124, (byte) 155, (byte) 214, (byte) 91, (byte) 29, (byte) 81, (byte) 28, (byte) 115, + (byte) 98, (byte) 130, (byte) 184, (byte) 135, (byte) 13, (byte) 191, (byte) 147, (byte) 43, (byte) 10, + (byte) 178, (byte) 99, (byte) 165, (byte) 210, (byte) 87, (byte) 87, (byte) 148, (byte) 31, (byte) 198, + (byte) 129, (byte) 32, (byte) 181, (byte) 3, (byte) 144, (byte) 61, (byte) 5, (byte) 166, (byte) 252, + (byte) 73, (byte) 205, (byte) 230, (byte) 178, (byte) 162, (byte) 46, (byte) 56, (byte) 99, (byte) 77, + (byte) 97, (byte) 236, (byte) 121, (byte) 157, (byte) 139, (byte) 153, (byte) 217, (byte) 171, (byte) 19, + (byte) 68, (byte) 36, (byte) 14, (byte) 123, (byte) 249, (byte) 101, (byte) 127, (byte) 184, (byte) 123, + (byte) 7, (byte) 124, (byte) 68, (byte) 98, (byte) 34, (byte) 139, (byte) 224, (byte) 173, (byte) 246, + (byte) 196, (byte) 180, (byte) 70, (byte) 207, (byte) 168, (byte) 211, (byte) 255, (byte) 84, (byte) 0, + (byte) 174, (byte) 11, (byte) 160, (byte) 155, (byte) 127, (byte) 228, (byte) 81, (byte) 226, (byte) 115, + (byte) 142, (byte) 200, (byte) 107, (byte) 4, (byte) 204, (byte) 219, (byte) 192, (byte) 189, (byte) 56, + (byte) 127, (byte) 184, (byte) 187, (byte) 161, (byte) 106, (byte) 62, (byte) 225, (byte) 211, (byte) 115, + (byte) 30, (byte) 172, (byte) 191, (byte) 66, (byte) 25, (byte) 66, (byte) 235, (byte) 107, (byte) 41, + (byte) 186, (byte) 40, (byte) 239, (byte) 173, (byte) 11, (byte) 247, (byte) 89, (byte) 79, (byte) 135, + (byte) 86, (byte) 73, (byte) 77, (byte) 164, (byte) 34, (byte) 109, (byte) 236, (byte) 56, (byte) 198, + (byte) 141, (byte) 87, (byte) 74, (byte) 172, (byte) 56, (byte) 24, (byte) 150, (byte) 233, (byte) 233, + (byte) 165, (byte) 122, (byte) 201, (byte) 112, (byte) 232, (byte) 23, (byte) 12, (byte) 166, (byte) 128, + (byte) 114, (byte) 139, (byte) 207, (byte) 233, (byte) 47, (byte) 220, (byte) 172, (byte) 175, (byte) 40, + (byte) 109, (byte) 82, (byte) 142, (byte) 130, (byte) 177, (byte) 50, (byte) 127, (byte) 196, (byte) 106, + (byte) 172, (byte) 178, (byte) 71, (byte) 178, (byte) 204, (byte) 99, (byte) 113, (byte) 33, (byte) 189, + (byte) 188, (byte) 168, (byte) 76, (byte) 92, (byte) 230, (byte) 211, (byte) 239, (byte) 75, (byte) 71, + (byte) 64, (byte) 197, (byte) 26, (byte) 222, (byte) 19, (byte) 213, (byte) 161, (byte) 144, (byte) 20, + (byte) 126, (byte) 192, (byte) 156, (byte) 15, (byte) 113, (byte) 64, (byte) 73, (byte) 7, (byte) 241, + (byte) 217, (byte) 127, (byte) 171, (byte) 199, (byte) 66, (byte) 32, (byte) 179, (byte) 4, (byte) 181, + (byte) 93, (byte) 121, (byte) 193, (byte) 10, (byte) 169, (byte) 255, (byte) 152, (byte) 199, (byte) 95, + (byte) 177, (byte) 227, (byte) 135, (byte) 21, (byte) 64, (byte) 203, (byte) 9, (byte) 79, (byte) 243, + (byte) 114, (byte) 2, (byte) 201, (byte) 157, (byte) 180, (byte) 52, (byte) 193, (byte) 66, (byte) 34, + (byte) 155, (byte) 52, (byte) 35, (byte) 93, (byte) 31, (byte) 96, (byte) 77, (byte) 12, (byte) 80, + (byte) 195, (byte) 96, (byte) 247, (byte) 251, (byte) 237, (byte) 36, (byte) 170, (byte) 7, (byte) 3, + (byte) 251, (byte) 243, (byte) 47, (byte) 180, (byte) 98, (byte) 207, (byte) 176, (byte) 106, (byte) 237, + (byte) 114, (byte) 91, (byte) 229, (byte) 56, (byte) 94, (byte) 154, (byte) 32, (byte) 62, (byte) 240, + (byte) 132, (byte) 4, (byte) 144, (byte) 227, (byte) 140, (byte) 137, (byte) 76, (byte) 15, (byte) 117, + (byte) 82, (byte) 223, (byte) 168, (byte) 135, (byte) 33, (byte) 91, (byte) 173, (byte) 4, (byte) 245, + (byte) 192, (byte) 95, (byte) 135, (byte) 22, (byte) 138, (byte) 89, (byte) 1, (byte) 14, (byte) 230, + (byte) 143, (byte) 195, (byte) 93, (byte) 133, (byte) 194, (byte) 252, (byte) 188, (byte) 31, (byte) 39, + (byte) 162, (byte) 59, (byte) 148, (byte) 219, (byte) 213, (byte) 179, (byte) 195, (byte) 165, (byte) 67, + (byte) 68, (byte) 39, (byte) 178, (byte) 143, (byte) 192, (byte) 177, (byte) 221, (byte) 236, (byte) 63, + (byte) 40, (byte) 205, (byte) 26, (byte) 81, (byte) 127, (byte) 5, (byte) 213, (byte) 192, (byte) 22, + (byte) 147, (byte) 98, (byte) 207, (byte) 153, (byte) 8, (byte) 108, (byte) 75, (byte) 182, (byte) 148, + (byte) 0, (byte) 151, (byte) 15, (byte) 178, (byte) 98, (byte) 145, (byte) 255, (byte) 213, (byte) 142, + (byte) 63, (byte) 247, (byte) 42, (byte) 161, (byte) 246, (byte) 21, (byte) 128, (byte) 47, (byte) 248, + (byte) 217, (byte) 70, (byte) 195, (byte) 151, (byte) 236, (byte) 73, (byte) 153, (byte) 230, (byte) 152, + (byte) 217, (byte) 12, (byte) 189, (byte) 65, (byte) 85, (byte) 189, (byte) 204, (byte) 212, (byte) 161, + (byte) 210, (byte) 217, (byte) 74, (byte) 75, (byte) 186, (byte) 122, (byte) 167, (byte) 149, (byte) 178, + (byte) 202, (byte) 205, (byte) 246, (byte) 225, (byte) 225, (byte) 190, (byte) 56, (byte) 42, (byte) 162, + (byte) 215, (byte) 107, (byte) 45, (byte) 121, (byte) 235, (byte) 195, (byte) 219, (byte) 22, (byte) 0, + (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 5, (byte) 88, (byte) 46, (byte) 53, (byte) 48, (byte) 57, + (byte) 0, (byte) 0, (byte) 2, (byte) 211, (byte) 48, (byte) 130, (byte) 2, (byte) 207, (byte) 48, + (byte) 130, (byte) 1, (byte) 183, (byte) 160, (byte) 3, (byte) 2, (byte) 1, (byte) 2, (byte) 2, (byte) 4, + (byte) 58, (byte) 247, (byte) 71, (byte) 185, (byte) 48, (byte) 13, (byte) 6, (byte) 9, (byte) 42, + (byte) 134, (byte) 72, (byte) 134, (byte) 247, (byte) 13, (byte) 1, (byte) 1, (byte) 11, (byte) 5, (byte) 0, + (byte) 48, (byte) 23, (byte) 49, (byte) 21, (byte) 48, (byte) 19, (byte) 6, (byte) 3, (byte) 85, (byte) 4, + (byte) 3, (byte) 19, (byte) 12, (byte) 115, (byte) 101, (byte) 99, (byte) 117, (byte) 114, (byte) 101, + (byte) 115, (byte) 111, (byte) 99, (byte) 107, (byte) 101, (byte) 116, (byte) 48, (byte) 32, (byte) 23, + (byte) 13, (byte) 49, (byte) 52, (byte) 48, (byte) 53, (byte) 49, (byte) 48, (byte) 50, (byte) 48, + (byte) 49, (byte) 56, (byte) 52, (byte) 48, (byte) 90, (byte) 24, (byte) 15, (byte) 50, (byte) 49, + (byte) 49, (byte) 52, (byte) 48, (byte) 52, (byte) 49, (byte) 54, (byte) 50, (byte) 48, (byte) 49, + (byte) 56, (byte) 52, (byte) 48, (byte) 90, (byte) 48, (byte) 23, (byte) 49, (byte) 21, (byte) 48, + (byte) 19, (byte) 6, (byte) 3, (byte) 85, (byte) 4, (byte) 3, (byte) 19, (byte) 12, (byte) 115, (byte) 101, + (byte) 99, (byte) 117, (byte) 114, (byte) 101, (byte) 115, (byte) 111, (byte) 99, (byte) 107, (byte) 101, + (byte) 116, (byte) 48, (byte) 130, (byte) 1, (byte) 34, (byte) 48, (byte) 13, (byte) 6, (byte) 9, (byte) 42, + (byte) 134, (byte) 72, (byte) 134, (byte) 247, (byte) 13, (byte) 1, (byte) 1, (byte) 1, (byte) 5, (byte) 0, + (byte) 3, (byte) 130, (byte) 1, (byte) 15, (byte) 0, (byte) 48, (byte) 130, (byte) 1, (byte) 10, (byte) 2, + (byte) 130, (byte) 1, (byte) 1, (byte) 0, (byte) 153, (byte) 113, (byte) 7, (byte) 44, (byte) 219, + (byte) 76, (byte) 101, (byte) 226, (byte) 138, (byte) 96, (byte) 219, (byte) 60, (byte) 167, (byte) 138, + (byte) 222, (byte) 6, (byte) 78, (byte) 169, (byte) 64, (byte) 188, (byte) 156, (byte) 190, (byte) 119, + (byte) 16, (byte) 34, (byte) 228, (byte) 250, (byte) 253, (byte) 119, (byte) 75, (byte) 240, (byte) 60, + (byte) 242, (byte) 52, (byte) 137, (byte) 146, (byte) 20, (byte) 130, (byte) 202, (byte) 226, (byte) 125, + (byte) 19, (byte) 7, (byte) 34, (byte) 8, (byte) 61, (byte) 243, (byte) 202, (byte) 225, (byte) 206, + (byte) 223, (byte) 53, (byte) 74, (byte) 56, (byte) 222, (byte) 47, (byte) 99, (byte) 235, (byte) 57, + (byte) 73, (byte) 90, (byte) 198, (byte) 109, (byte) 104, (byte) 36, (byte) 255, (byte) 124, (byte) 57, + (byte) 155, (byte) 248, (byte) 120, (byte) 56, (byte) 56, (byte) 38, (byte) 41, (byte) 216, (byte) 1, + (byte) 216, (byte) 216, (byte) 100, (byte) 239, (byte) 79, (byte) 222, (byte) 34, (byte) 21, (byte) 182, + (byte) 112, (byte) 136, (byte) 137, (byte) 16, (byte) 141, (byte) 15, (byte) 83, (byte) 94, (byte) 245, + (byte) 36, (byte) 203, (byte) 178, (byte) 137, (byte) 159, (byte) 86, (byte) 220, (byte) 253, (byte) 112, + (byte) 200, (byte) 50, (byte) 135, (byte) 215, (byte) 190, (byte) 21, (byte) 186, (byte) 84, (byte) 21, + (byte) 96, (byte) 126, (byte) 253, (byte) 115, (byte) 209, (byte) 241, (byte) 94, (byte) 115, (byte) 219, + (byte) 0, (byte) 25, (byte) 253, (byte) 209, (byte) 182, (byte) 118, (byte) 230, (byte) 10, (byte) 50, + (byte) 131, (byte) 39, (byte) 249, (byte) 136, (byte) 11, (byte) 101, (byte) 192, (byte) 12, (byte) 210, + (byte) 179, (byte) 237, (byte) 213, (byte) 68, (byte) 101, (byte) 58, (byte) 187, (byte) 255, (byte) 240, + (byte) 164, (byte) 147, (byte) 72, (byte) 148, (byte) 227, (byte) 155, (byte) 88, (byte) 250, (byte) 101, + (byte) 253, (byte) 87, (byte) 140, (byte) 168, (byte) 39, (byte) 163, (byte) 133, (byte) 150, (byte) 252, + (byte) 226, (byte) 234, (byte) 52, (byte) 88, (byte) 40, (byte) 56, (byte) 23, (byte) 105, (byte) 236, + (byte) 4, (byte) 113, (byte) 98, (byte) 4, (byte) 0, (byte) 117, (byte) 59, (byte) 77, (byte) 236, + (byte) 135, (byte) 93, (byte) 54, (byte) 30, (byte) 6, (byte) 126, (byte) 90, (byte) 15, (byte) 105, + (byte) 89, (byte) 216, (byte) 154, (byte) 72, (byte) 134, (byte) 209, (byte) 74, (byte) 197, (byte) 237, + (byte) 51, (byte) 37, (byte) 33, (byte) 106, (byte) 50, (byte) 71, (byte) 134, (byte) 169, (byte) 173, + (byte) 88, (byte) 111, (byte) 217, (byte) 117, (byte) 184, (byte) 97, (byte) 1, (byte) 38, (byte) 76, + (byte) 112, (byte) 170, (byte) 190, (byte) 250, (byte) 96, (byte) 17, (byte) 45, (byte) 117, (byte) 183, + (byte) 82, (byte) 155, (byte) 10, (byte) 53, (byte) 15, (byte) 214, (byte) 36, (byte) 134, (byte) 249, + (byte) 146, (byte) 98, (byte) 99, (byte) 64, (byte) 158, (byte) 99, (byte) 227, (byte) 21, (byte) 92, + (byte) 98, (byte) 90, (byte) 202, (byte) 214, (byte) 134, (byte) 233, (byte) 212, (byte) 149, (byte) 2, + (byte) 3, (byte) 1, (byte) 0, (byte) 1, (byte) 163, (byte) 33, (byte) 48, (byte) 31, (byte) 48, (byte) 29, + (byte) 6, (byte) 3, (byte) 85, (byte) 29, (byte) 14, (byte) 4, (byte) 22, (byte) 4, (byte) 20, (byte) 115, + (byte) 110, (byte) 177, (byte) 165, (byte) 41, (byte) 26, (byte) 142, (byte) 198, (byte) 221, (byte) 63, + (byte) 79, (byte) 252, (byte) 219, (byte) 159, (byte) 68, (byte) 102, (byte) 76, (byte) 153, (byte) 128, + (byte) 164, (byte) 48, (byte) 13, (byte) 6, (byte) 9, (byte) 42, (byte) 134, (byte) 72, (byte) 134, + (byte) 247, (byte) 13, (byte) 1, (byte) 1, (byte) 11, (byte) 5, (byte) 0, (byte) 3, (byte) 130, (byte) 1, + (byte) 1, (byte) 0, (byte) 118, (byte) 55, (byte) 245, (byte) 122, (byte) 159, (byte) 155, (byte) 98, + (byte) 122, (byte) 229, (byte) 186, (byte) 23, (byte) 207, (byte) 109, (byte) 225, (byte) 220, (byte) 74, + (byte) 51, (byte) 218, (byte) 10, (byte) 115, (byte) 137, (byte) 103, (byte) 127, (byte) 28, (byte) 30, + (byte) 184, (byte) 149, (byte) 249, (byte) 193, (byte) 206, (byte) 208, (byte) 181, (byte) 191, (byte) 128, + (byte) 18, (byte) 208, (byte) 24, (byte) 132, (byte) 147, (byte) 184, (byte) 198, (byte) 82, (byte) 204, + (byte) 183, (byte) 127, (byte) 87, (byte) 234, (byte) 136, (byte) 197, (byte) 34, (byte) 232, (byte) 124, + (byte) 210, (byte) 2, (byte) 192, (byte) 69, (byte) 246, (byte) 25, (byte) 232, (byte) 162, (byte) 0, + (byte) 157, (byte) 216, (byte) 194, (byte) 26, (byte) 207, (byte) 225, (byte) 169, (byte) 59, (byte) 246, + (byte) 52, (byte) 51, (byte) 150, (byte) 210, (byte) 50, (byte) 118, (byte) 58, (byte) 154, (byte) 45, + (byte) 128, (byte) 138, (byte) 47, (byte) 174, (byte) 83, (byte) 117, (byte) 18, (byte) 224, (byte) 9, + (byte) 146, (byte) 180, (byte) 178, (byte) 22, (byte) 76, (byte) 82, (byte) 229, (byte) 16, (byte) 150, + (byte) 127, (byte) 13, (byte) 122, (byte) 218, (byte) 159, (byte) 195, (byte) 232, (byte) 168, (byte) 206, + (byte) 105, (byte) 82, (byte) 37, (byte) 252, (byte) 186, (byte) 223, (byte) 222, (byte) 7, (byte) 106, + (byte) 87, (byte) 218, (byte) 89, (byte) 22, (byte) 252, (byte) 7, (byte) 177, (byte) 52, (byte) 180, + (byte) 9, (byte) 16, (byte) 29, (byte) 57, (byte) 192, (byte) 209, (byte) 225, (byte) 155, (byte) 16, + (byte) 219, (byte) 38, (byte) 90, (byte) 174, (byte) 152, (byte) 140, (byte) 252, (byte) 114, (byte) 133, + (byte) 106, (byte) 24, (byte) 107, (byte) 227, (byte) 80, (byte) 166, (byte) 63, (byte) 47, (byte) 16, + (byte) 15, (byte) 89, (byte) 242, (byte) 19, (byte) 87, (byte) 193, (byte) 250, (byte) 222, (byte) 223, + (byte) 183, (byte) 61, (byte) 91, (byte) 17, (byte) 92, (byte) 35, (byte) 142, (byte) 44, (byte) 153, + (byte) 135, (byte) 86, (byte) 97, (byte) 70, (byte) 205, (byte) 38, (byte) 192, (byte) 18, (byte) 244, + (byte) 61, (byte) 46, (byte) 21, (byte) 145, (byte) 99, (byte) 72, (byte) 142, (byte) 37, (byte) 19, + (byte) 219, (byte) 167, (byte) 62, (byte) 71, (byte) 197, (byte) 86, (byte) 152, (byte) 139, (byte) 122, + (byte) 231, (byte) 122, (byte) 206, (byte) 42, (byte) 142, (byte) 164, (byte) 237, (byte) 19, (byte) 60, + (byte) 95, (byte) 239, (byte) 191, (byte) 64, (byte) 188, (byte) 94, (byte) 154, (byte) 199, (byte) 252, + (byte) 62, (byte) 26, (byte) 181, (byte) 194, (byte) 141, (byte) 13, (byte) 1, (byte) 112, (byte) 161, + (byte) 195, (byte) 149, (byte) 116, (byte) 57, (byte) 118, (byte) 114, (byte) 248, (byte) 235, (byte) 54, + (byte) 229, (byte) 48, (byte) 53, (byte) 30, (byte) 145, (byte) 199, (byte) 207, (byte) 49, (byte) 175, + (byte) 44, (byte) 172, (byte) 120, (byte) 254, (byte) 181, (byte) 100, (byte) 113, (byte) 191, (byte) 64, + (byte) 131, (byte) 125, (byte) 80, (byte) 180, (byte) 229, (byte) 109, (byte) 97, (byte) 8, (byte) 166, + (byte) 155, (byte) 72, (byte) 252, (byte) 84, (byte) 62, (byte) 97, (byte) 80, (byte) 26, (byte) 17, + (byte) 143, (byte) 96, (byte) 16, (byte) 204, (byte) 86, (byte) 61, (byte) 226, (byte) 149 }; + + private SslKeyStore() { + + } + + public static KeyStore getKeyStore() { + KeyStore ks = null; + try { + ks = KeyStore.getInstance("JKS"); + ks.load(new ByteArrayInputStream(JKS_CERT_BYTES), getKeyStorePassword()); + } catch (Exception ex) { + throw new RuntimeException("Failed to load SSL key store.", ex); + } + return ks; + } + + public static InputStream asInputStream() { + return new ByteArrayInputStream(JKS_CERT_BYTES); + } + + public static char[] getCertificatePassword() { + return "chatchrome123".toCharArray(); + } + + public static char[] getKeyStorePassword() { + return "mu$chatchrome123".toCharArray(); + } + + public static String getCertificatePasswordString() { + return "chatchrome123"; + } + + public static String getKeyStorePasswordString() { + return "chatchrome123"; + } + +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/ssl/StreamReader.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/ssl/StreamReader.java new file mode 100755 index 0000000..2d9fb4f --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/ssl/StreamReader.java @@ -0,0 +1,39 @@ +package com.akaxin.site.connector.ssl; + +import java.io.InputStream; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * + * + */ +public class StreamReader { + private static final Logger logger = LoggerFactory.getLogger(StreamReader.class); + +// public String toByteArray(InputStream is) { +// int i = 0; +// StringBuilder buf = new StringBuilder(); +// try { +// while ((i = is.read()) != -1) { +// if (buf.length() > 0) +// buf.append(","); +// buf.append("(byte)"); +// buf.append(i); +// } +// +// } catch (Throwable e) { +// logger.error("trun to byte array from inputStream error", e); +// } +// +// return buf.toString(); +// } + + public static void main(String[] args) { + // StreamReader reader = new StreamReader(); + // System.out.println(reader.toByteArray(StreamReader.class.getResourceAsStream("/securesocket.jks"))); + + } + +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/utils/HexUtils.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/utils/HexUtils.java new file mode 100755 index 0000000..0a0e630 --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/utils/HexUtils.java @@ -0,0 +1,17 @@ +package com.akaxin.site.connector.utils; + +public class HexUtils { + + public static String printHexString(byte[] b) { + StringBuffer returnValue = new StringBuffer(); + for (int i = 0; i < b.length; i++) { + String hex = Integer.toHexString(b[i] & 0xFF); + if (hex.length() == 1) { + hex = '0' + hex; + } + returnValue.append(hex.toUpperCase() + " "); + } + + return "[" + returnValue.toString() + "]"; + } +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/ws/WsServer.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/ws/WsServer.java new file mode 100755 index 0000000..631f98f --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/ws/WsServer.java @@ -0,0 +1,114 @@ +package com.akaxin.site.connector.ws; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.executor.AbstracteExecutor; +import com.akaxin.common.executor.SimpleExecutor; +import com.akaxin.site.connector.constant.AkxProject; +import com.akaxin.site.connector.ws.handler.WsServerHandler; + +import io.netty.bootstrap.ServerBootstrap; +import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelInitializer; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.socket.SocketChannel; +import io.netty.channel.socket.nio.NioServerSocketChannel; +import io.netty.handler.codec.http.HttpObjectAggregator; +import io.netty.handler.codec.http.HttpServerCodec; +import io.netty.handler.stream.ChunkedWriteHandler; +import io.netty.handler.timeout.IdleStateHandler; +import io.netty.util.concurrent.Future; +import io.netty.util.concurrent.GenericFutureListener; + +/** + * WebSocket服务启动静态类 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-05-02 15:15:21 + */ +public abstract class WsServer { + private static Logger logger = LoggerFactory.getLogger(WsServer.class); + + private AbstracteExecutor executor; + private ServerBootstrap bootstrap; + private EventLoopGroup parentGroup; + private EventLoopGroup childGroup; + + public WsServer() { + executor = new SimpleExecutor(); + loadExecutor(executor); + // 负责对外连接线程 + parentGroup = new NioEventLoopGroup(); + // 负责对内分发业务的线程 + childGroup = new NioEventLoopGroup(); + bootstrap = new ServerBootstrap(); + bootstrap.group(parentGroup, childGroup); + bootstrap.channel(NioServerSocketChannel.class); + bootstrap.childHandler(new ChannelInitializer() { + + @Override + protected void initChannel(SocketChannel ch) throws Exception { + // 30秒空闲时间设置 + ch.pipeline().addLast(new IdleStateHandler(30, 0, 60)); + // HttpServerCodec:将请求和应答消息解码为HTTP消息 + ch.pipeline().addLast(new HttpServerCodec()); + // 针对大文件上传时,把 HttpMessage 和 HttpContent 聚合成一个 + // FullHttpRequest,并定义可以接受的数据大小64M(可以支持params+multipart) + ch.pipeline().addLast(new HttpObjectAggregator(64 * 1024)); + // 针对大文件下发,分块写数据 + ch.pipeline().addLast(new ChunkedWriteHandler()); + // WebSocket 访问地址 + // ch.pipeline().addLast(new WebSocketServerProtocolHandler("/akaxin/ws")); + // 自定义handler + ch.pipeline().addLast(new WsServerHandler(executor)); + } + }); + + } + + // 启动websocket服务 + public void start(String address, int port) throws Exception { + try { + if (bootstrap != null) { + ChannelFuture channelFuture = bootstrap.bind(address, port).sync(); + channelFuture.channel().closeFuture().addListener(new GenericFutureListener>() { + + @Override + public void operationComplete(Future future) throws Exception { + closeGracefully(); + } + }); + } else { + throw new Exception(); + } + } catch (Exception e) { + closeGracefully(); + throw new Exception("start websocket server error", e); + } + } + + private void closeGracefully() { + try { + if (parentGroup != null) { + // terminate all threads + parentGroup.shutdownGracefully(); + // wait for all threads terminated + parentGroup.terminationFuture().sync(); + } + if (childGroup != null) { + // terminate all threads + childGroup.shutdownGracefully(); + // wait for all threads terminated + childGroup.terminationFuture().sync(); + } + } catch (Exception es) { + logger.error(AkxProject.PLN + " shutdown netty gracefully error.", es); + } + } + + public abstract void loadExecutor(AbstracteExecutor executor); +} diff --git a/openzaly-connector/src/main/java/com/akaxin/site/connector/ws/handler/WsServerHandler.java b/openzaly-connector/src/main/java/com/akaxin/site/connector/ws/handler/WsServerHandler.java new file mode 100755 index 0000000..8720f33 --- /dev/null +++ b/openzaly-connector/src/main/java/com/akaxin/site/connector/ws/handler/WsServerHandler.java @@ -0,0 +1,183 @@ +package com.akaxin.site.connector.ws.handler; + +import java.io.UnsupportedEncodingException; +import java.net.InetSocketAddress; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.channel.ChannelSession; +import com.akaxin.common.channel.WebChannelManager; +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CharsetCoding; +import com.akaxin.common.executor.AbstracteExecutor; +import com.akaxin.site.business.cache.WebSessionCache; +import com.akaxin.site.connector.codec.parser.ChannelConst; + +import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.SimpleChannelInboundHandler; +import io.netty.handler.codec.http.FullHttpRequest; +import io.netty.handler.codec.http.HttpHeaderNames; +import io.netty.handler.codec.http.HttpMethod; +import io.netty.handler.codec.http.QueryStringDecoder; +import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame; +import io.netty.handler.codec.http.websocketx.PingWebSocketFrame; +import io.netty.handler.codec.http.websocketx.PongWebSocketFrame; +import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; +import io.netty.handler.codec.http.websocketx.WebSocketFrame; +import io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker; +import io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory; + +/** + * 接受客户端发送的消息,客户端发送的消息组装成TextWebSocketFrame格式 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-05-02 15:01:08 + */ +public class WsServerHandler extends SimpleChannelInboundHandler { + private static Logger logger = LoggerFactory.getLogger(WsServerHandler.class); + + private static final String AKAXIN_WS_PATH = "/akaxin/ws"; + // ws 握手 + private WebSocketServerHandshaker wsHandshaker; + + private AbstracteExecutor executor; + + public WsServerHandler(AbstracteExecutor executor) { + this.executor = executor; + } + + @Override + public void handlerAdded(ChannelHandlerContext ctx) throws Exception { + System.out.println("ChannelId" + ctx.channel().id().asLongText()); + } + + // 客户端连接上服务端 + @Override + public void channelActive(ChannelHandlerContext ctx) throws Exception { + System.out.println("channel active clientIp" + ctx.channel().remoteAddress().toString()); + ctx.channel().attr(ChannelConst.CHANNELSESSION).set(new ChannelSession(ctx.channel())); + } + + // 从客户端读取消息 + @Override + protected void channelRead0(ChannelHandlerContext ctx, Object msg) throws Exception { + if (msg instanceof FullHttpRequest) { + // http 请求握手 + doHttpRequest(ctx, (FullHttpRequest) msg); + } else if (msg instanceof WebSocketFrame) { + // websocket 请求 + doWSRequest(ctx, (WebSocketFrame) msg); + } else { + // 错误请求,关闭连接 + ctx.close(); + } + + } + + // 处理http请求,ws握手使用http请求 + private void doHttpRequest(ChannelHandlerContext ctx, FullHttpRequest request) { + if (request.decoderResult().isFailure()) { + ctx.close(); + return; + } + + // 握手使用get方法,所以我们控制只接受get方法 + if (HttpMethod.GET != request.method()) { + ctx.close(); + return; + } + + String wsUrl = "ws://" + request.headers().get(HttpHeaderNames.HOST) + AKAXIN_WS_PATH; + + WebSocketServerHandshakerFactory webSocketFactory = new WebSocketServerHandshakerFactory(wsUrl, null, true); + wsHandshaker = webSocketFactory.newHandshaker(request); + if (wsHandshaker != null) { + // + ChannelFuture channelFuture = wsHandshaker.handshake(ctx.channel(), request); + if (channelFuture.isSuccess()) { + // 握手并且验证用户webSessionId + QueryStringDecoder queryDecoder = new QueryStringDecoder(request.uri()); + List sessionIds = queryDecoder.parameters().get("sessionId"); + if (sessionIds != null && sessionIds.size() > 0) { + String sessionId = sessionIds.get(0); + String siteUserId = WebSessionCache.getSiteUserId(sessionId); + // test siteUserId + siteUserId = "77151873-0fc7-4cf1-8bd6-67d00190fcf6"; + if (StringUtils.isNotBlank(siteUserId)) { + ChannelSession channelSession = ctx.channel().attr(ChannelConst.CHANNELSESSION).get(); + // siteUserId && sessionId 放入Channel缓存中 + channelSession.setUserId(siteUserId); + WebChannelManager.addChannelSession(siteUserId, channelSession); + } else { + // cant get authed message ,so close the channel + // ctx.close(); + } + } else { + ctx.close(); + } + System.out.println("client handshaker success parm=" + queryDecoder.parameters()); + + } + } else { + WebSocketServerHandshakerFactory.sendUnsupportedVersionResponse(ctx.channel()); + } + + } + + // 处理ws请求 + private void doWSRequest(ChannelHandlerContext ctx, WebSocketFrame wsFrame) { + InetSocketAddress socketAddress = (InetSocketAddress) ctx.channel().remoteAddress(); + String clientIp = socketAddress.getAddress().getHostAddress(); + ChannelSession channelSession = ctx.channel().attr(ChannelConst.CHANNELSESSION).get(); + + Command command = new Command(); + command.setSiteUserId(channelSession.getUserId()); + command.setClientIp(clientIp); + command.setStartTime(System.currentTimeMillis()); + + if (wsFrame instanceof TextWebSocketFrame) { + TextWebSocketFrame textWsFrame = (TextWebSocketFrame) wsFrame; + String webText = textWsFrame.text(); + try { + command.setParams(webText.getBytes(CharsetCoding.UTF_8)); + } catch (UnsupportedEncodingException e) { + logger.error("web message text=" + webText + " Charset code error"); + } + TextWebSocketFrame resFrame = new TextWebSocketFrame(textWsFrame.text()); + ctx.channel().writeAndFlush(resFrame); + + executor.execute("WS-ACTION", command); + } else if (wsFrame instanceof PingWebSocketFrame) { + // ping/pong + ctx.channel().writeAndFlush(new PongWebSocketFrame(wsFrame.content().retain())); + logger.info("ws client siteUserId={} ping to server", command.getSiteUserId()); + } else if (wsFrame instanceof CloseWebSocketFrame) { + // close channel + wsHandshaker.close(ctx.channel(), (CloseWebSocketFrame) wsFrame.retain()); + WebChannelManager.delChannelSession(command.getSiteUserId()); + } + } + + @Override + public void channelReadComplete(ChannelHandlerContext ctx) throws Exception { + ctx.flush(); + } + + @Override + public void channelInactive(ChannelHandlerContext ctx) throws Exception { + ChannelSession channelSession = ctx.channel().attr(ChannelConst.CHANNELSESSION).get(); + WebChannelManager.delChannelSession(channelSession.getUserId()); + } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { + // ctx.close(); + logger.error("ws channel exception happen", cause); + } + +} diff --git a/openzaly-connector/src/main/resources/chatchrome1.jks b/openzaly-connector/src/main/resources/chatchrome1.jks new file mode 100755 index 0000000..516d11a Binary files /dev/null and b/openzaly-connector/src/main/resources/chatchrome1.jks differ diff --git a/openzaly-connector/src/test/java/com/zaly/test/HttpClient.java b/openzaly-connector/src/test/java/com/zaly/test/HttpClient.java new file mode 100755 index 0000000..2e68f80 --- /dev/null +++ b/openzaly-connector/src/test/java/com/zaly/test/HttpClient.java @@ -0,0 +1,60 @@ +package com.zaly.test; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +import com.akaxin.common.http.ZalyHttpClient; +import com.akaxin.common.utils.GsonUtils; +import com.squareup.okhttp.FormEncodingBuilder; +import com.squareup.okhttp.MediaType; +import com.squareup.okhttp.OkHttpClient; +import com.squareup.okhttp.Request; +import com.squareup.okhttp.RequestBody; +import com.squareup.okhttp.Response; + +public class HttpClient { + private static OkHttpClient client = new OkHttpClient(); + + public static void main(String args[]) throws Exception { + Map map = new HashMap(); + map.put("test", "aaaaa"); + byte[] body = ZalyHttpClient.getInstance().postString("http://119.27.185.209:516/siteMember/applyAddFriend", "hello"); + System.out.println("body=" + new String(body)); + + String url = "http://119.27.185.209:516/siteMember/applyAddFriend"; + postKV(url); + + postJson(url, GsonUtils.toJson(map)); + postJson(url, map.toString()); + } + + static String postJson(String url, String json) throws IOException { + MediaType JSON = MediaType.parse("application/json; charset=utf-8"); + RequestBody postBody = RequestBody.create(JSON, json); + Request request = new Request.Builder().url(url).post(postBody).build(); + Response response = client.newCall(request).execute(); + System.out.println("post postJson response =" + response.isSuccessful()); + if (response.isSuccessful()) { + return response.body().toString(); + } else { + System.out.println("http post failed"); + throw new IOException("post json Unexpected code " + response); + } + } + + static String postKV(String url) throws IOException { + + RequestBody formBody = new FormEncodingBuilder().add("platform", "android").add("name", "bug").build(); + + Request request = new Request.Builder().url(url).post(formBody).build(); + + Response response = client.newCall(request).execute(); + System.out.println("post KV response =" + response.isSuccessful()); + if (response.isSuccessful()) { + return response.body().string(); + } else { + throw new IOException("Unexpected code " + response); + } + } +} \ No newline at end of file diff --git a/openzaly-connector/src/test/java/com/zaly/test/HttpTestPost.java b/openzaly-connector/src/test/java/com/zaly/test/HttpTestPost.java new file mode 100755 index 0000000..66d9ec9 --- /dev/null +++ b/openzaly-connector/src/test/java/com/zaly/test/HttpTestPost.java @@ -0,0 +1,36 @@ +package com.zaly.test; + +import java.io.IOException; + +import com.squareup.okhttp.MediaType; +import com.squareup.okhttp.OkHttpClient; +import com.squareup.okhttp.Request; +import com.squareup.okhttp.RequestBody; +import com.squareup.okhttp.Response; + +public class HttpTestPost { + public static final MediaType JSON = MediaType.parse("application/json; charset=utf-8"); + static OkHttpClient client = new OkHttpClient(); + + static String post(String url, String json) throws IOException { + RequestBody body = RequestBody.create(JSON, json); + Request request = new Request.Builder().url(url).post(body).build(); + Response response = client.newCall(request).execute(); + System.out.println("response = " + response.isSuccessful()); + if (response.isSuccessful()) { + return response.body().string(); + } else { + throw new IOException("Unexpected code " + response); + } + } + + public static void main(String args[]) { + String url = "http://119.27.185.209:516/siteMember/applyAddFriend"; + try { + post(url, "hello"); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } +} diff --git a/openzaly-connector/src/test/java/com/zaly/test/WSTest.java b/openzaly-connector/src/test/java/com/zaly/test/WSTest.java new file mode 100755 index 0000000..e69de29 diff --git a/openzaly-message/.gitignore b/openzaly-message/.gitignore new file mode 100755 index 0000000..b83d222 --- /dev/null +++ b/openzaly-message/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/openzaly-message/pom.xml b/openzaly-message/pom.xml new file mode 100755 index 0000000..aced0d8 --- /dev/null +++ b/openzaly-message/pom.xml @@ -0,0 +1,67 @@ + + + 4.0.0 + + com.akaxin + openzaly-parent + 0.0.1 + + com.akaxin.site + openzaly-message + 0.0.1-RELEASE + + + 1.6 + 1.6 + + + + + com.akaxin.common + openzaly-common + 0.0.1-RELEASE + + + + com.akaxin.proto + openzaly-protobuf + 0.0.1-RELEASE + + + + com.akaxin.site + openzaly-storage + 0.0.1-RELEASE + + + + org.json + json + 20090211 + + + + org.apache.httpcomponents + httpclient + + + + + + commons-logging + commons-logging + 1.2 + + + + + + \ No newline at end of file diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/api/IMessageService.java b/openzaly-message/src/main/java/com/akaxin/site/message/api/IMessageService.java new file mode 100755 index 0000000..54d1998 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/api/IMessageService.java @@ -0,0 +1,7 @@ +package com.akaxin.site.message.api; + +import com.akaxin.common.command.Command; + +public interface IMessageService { + public boolean execute(Command command); +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/bean/WebBean.java b/openzaly-message/src/main/java/com/akaxin/site/message/bean/WebBean.java new file mode 100755 index 0000000..3992271 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/bean/WebBean.java @@ -0,0 +1,46 @@ +package com.akaxin.site.message.bean; + +import com.akaxin.common.utils.GsonUtils; + +public class WebBean { + private String webCode; + private int width; + private int height; + private String hrefUrl;// 点击跳转链接 + + public String getWebCode() { + return webCode; + } + + public void setWebCode(String webCode) { + this.webCode = webCode; + } + + public int getWidth() { + return width; + } + + public void setWidth(int width) { + this.width = width; + } + + public int getHeight() { + return height; + } + + public void setHeight(int height) { + this.height = height; + } + + public String getHrefUrl() { + return hrefUrl; + } + + public void setHrefUrl(String hrefUrl) { + this.hrefUrl = hrefUrl; + } + + public String toString() { + return GsonUtils.toJson(this); + } +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/dao/ImUserFriendDao.java b/openzaly-message/src/main/java/com/akaxin/site/message/dao/ImUserFriendDao.java new file mode 100755 index 0000000..756824d --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/dao/ImUserFriendDao.java @@ -0,0 +1,67 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.dao; + +import java.sql.SQLException; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.site.storage.api.IUserFriendDao; +import com.akaxin.site.storage.service.UserFriendDaoService; + +/** + * IM消息通信过程,判断用户之间的关系操作 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-12-20 11:51:17 + */ +public class ImUserFriendDao { + private static final Logger logger = LoggerFactory.getLogger(ImUserFriendDao.class); + private static ImUserFriendDao instance = new ImUserFriendDao(); + private IUserFriendDao userFriendDao = new UserFriendDaoService(); + + public static ImUserFriendDao getInstance() { + return instance; + } + + public boolean isFriend(String siteUserId, String siteFriendId) { + return isFriend(siteUserId, siteFriendId, false); + } + + public boolean isFriend(String siteUserId, String siteFriendId, boolean isMaster) { + try { + return userFriendDao.queryIsFriendRelation(siteUserId, siteFriendId, isMaster); + } catch (SQLException e) { + logger.error("query is friend relation error.", e); + } + return false; + } + + /** + * 是否设置了消息免打扰功能,默认是静音状态 + * + * @return + */ + public boolean isMesageMute(String siteUserId, String siteFriendId) { + try { + return userFriendDao.isMute(siteUserId, siteFriendId); + } catch (SQLException e) { + logger.error("query message mutet status error", e); + } + return true; + } +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/dao/ImUserGroupDao.java b/openzaly-message/src/main/java/com/akaxin/site/message/dao/ImUserGroupDao.java new file mode 100755 index 0000000..67551e2 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/dao/ImUserGroupDao.java @@ -0,0 +1,87 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.dao; + +import java.sql.SQLException; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.site.storage.api.IGroupDao; +import com.akaxin.site.storage.api.IUserGroupDao; +import com.akaxin.site.storage.bean.GroupMemberBean; +import com.akaxin.site.storage.bean.GroupProfileBean; +import com.akaxin.site.storage.service.GroupDaoService; +import com.akaxin.site.storage.service.UserGroupDaoService; + +public class ImUserGroupDao { + private static final Logger logger = LoggerFactory.getLogger(ImUserGroupDao.class); + private IGroupDao groupDao = new GroupDaoService(); + private IUserGroupDao userGroupDao = new UserGroupDaoService(); + + private ImUserGroupDao() { + } + + static class SingletonHolder { + private static ImUserGroupDao instance = new ImUserGroupDao(); + } + + public static ImUserGroupDao getInstance() { + return SingletonHolder.instance; + + } + + public boolean isGroupMember(String siteUserId, String groupId) { + try { + GroupMemberBean bean = groupDao.getGroupMember(siteUserId, groupId); + if (bean != null && StringUtils.isNotEmpty(bean.getUserId())) { + return true; + } + } catch (SQLException e) { + logger.error("is group member error.", e); + } + return false; + } + + public GroupProfileBean getGroupProfile(String groupId) { + try { + return groupDao.queryGroupProfile(groupId); + } catch (SQLException e) { + logger.error("get group profile error."); + } + return null; + } + + public GroupProfileBean getSimpleGroupProfile(String groupId) { + try { + return groupDao.querySimpleGroupProfile(groupId); + } catch (SQLException e) { + logger.error("get group profile error."); + } + return null; + } + + public boolean isMesageMute(String siteUserId, String siteGroupId) { + try { + return userGroupDao.isMute(siteUserId, siteGroupId); + } catch (SQLException e) { + logger.error("query message mutet status error", e); + } + return true; + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/dao/ImUserProfileDao.java b/openzaly-message/src/main/java/com/akaxin/site/message/dao/ImUserProfileDao.java new file mode 100755 index 0000000..aff1e04 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/dao/ImUserProfileDao.java @@ -0,0 +1,90 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.dao; + +import java.sql.SQLException; +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.site.storage.api.IUserDeviceDao; +import com.akaxin.site.storage.api.IUserProfileDao; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.service.DeviceDaoService; +import com.akaxin.site.storage.service.UserProfileDaoService; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-26 18:26:24 + */ +public class ImUserProfileDao { + private static final Logger logger = LoggerFactory.getLogger(ImUserProfileDao.class); + private IUserProfileDao userProfileDao = new UserProfileDaoService(); + private IUserDeviceDao deviceProfileDao = new DeviceDaoService(); + + private ImUserProfileDao() { + } + + static class SingletonHolder { + private static ImUserProfileDao instance = new ImUserProfileDao(); + } + + public static ImUserProfileDao getInstance() { + return SingletonHolder.instance; + } + + public SimpleUserBean getSimpleUserProfile(String siteUserId) { + return getSimpleUserProfile(siteUserId, false); + } + + public SimpleUserBean getSimpleUserProfile(String siteUserId, boolean isMaster) { + try { + return userProfileDao.getSimpleProfileById(siteUserId, isMaster); + } catch (SQLException e) { + logger.error("get simple user profile by siteUserId error", e); + } + return null; + } + + public List getUserToken(String siteUserId) { + try { + return deviceProfileDao.getUserTokens(siteUserId); + } catch (SQLException e) { + logger.error("get user token error.", e); + } + return null; + } + + public String getGlobalUserId(String siteUserId) { + try { + return userProfileDao.getGlobalUserIdBySiteUserId(siteUserId); + } catch (SQLException e) { + logger.error("get user globalUserId error.", e); + } + return null; + } + + public boolean isMute(String siteUserId) throws SQLException { + try { + return userProfileDao.isMute(siteUserId); + } catch (Exception e) { + logger.error("get user mute error", e); + } + return true; + } +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/dao/ImUserSessionDao.java b/openzaly-message/src/main/java/com/akaxin/site/message/dao/ImUserSessionDao.java new file mode 100755 index 0000000..0b03866 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/dao/ImUserSessionDao.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.dao; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.site.storage.api.IUserSessionDao; +import com.akaxin.site.storage.service.UserSessionDaoService; + +public class ImUserSessionDao { + private static final Logger logger = LoggerFactory.getLogger(ImUserSessionDao.class); + private static ImUserSessionDao instance = new ImUserSessionDao(); + private IUserSessionDao userSessionDao = new UserSessionDaoService(); + + public static ImUserSessionDao getInstance() { + return instance; + } + + public List getSessionDevices(String siteUserId) { + List sessionDevices = new ArrayList(); + try { + sessionDevices = userSessionDao.getSessionDeivceIds(siteUserId); + } catch (SQLException e) { + logger.error("get session devices error.", e); + } + return sessionDevices; + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/dao/SessionDeviceDao.java b/openzaly-message/src/main/java/com/akaxin/site/message/dao/SessionDeviceDao.java new file mode 100755 index 0000000..3f9ec93 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/dao/SessionDeviceDao.java @@ -0,0 +1,54 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.dao; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.site.storage.api.IUserSessionDao; +import com.akaxin.site.storage.service.UserSessionDaoService; + +/** + * + * 从session表中,获取在先的设备 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-03 19:12:44 + */ +public class SessionDeviceDao { + private static final Logger logger = LoggerFactory.getLogger(SessionDeviceDao.class); + private static SessionDeviceDao instance = new SessionDeviceDao(); + private IUserSessionDao userSessionDao = new UserSessionDaoService(); + + public static SessionDeviceDao getInstance() { + return instance; + } + + public List getSessionDevices(String siteUserId) { + List sessionDevices = new ArrayList(); + try { + sessionDevices = userSessionDao.getSessionDeivceIds(siteUserId); + } catch (SQLException e) { + logger.error("get devices from session error.siteUserId={}", siteUserId); + } + return sessionDevices; + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/dao/SiteConfigDao.java b/openzaly-message/src/main/java/com/akaxin/site/message/dao/SiteConfigDao.java new file mode 100755 index 0000000..2a3f656 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/dao/SiteConfigDao.java @@ -0,0 +1,58 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.dao; + +import java.sql.SQLException; +import java.util.Map; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.site.storage.api.ISiteConfigDao; +import com.akaxin.site.storage.service.SiteConfigDaoService; + +/** + * 站点配置相关操作 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-24 19:16:06 + */ +public class SiteConfigDao { + private static final Logger logger = LoggerFactory.getLogger(SiteConfigDao.class); + + private SiteConfigDao() { + } + + public static SiteConfigDao getInstance() { + return SingletonHolder.instance; + } + + static class SingletonHolder { + private static SiteConfigDao instance = new SiteConfigDao(); + } + + private ISiteConfigDao siteConfigDao = new SiteConfigDaoService(); + + public Map getSiteConfig() { + try { + return siteConfigDao.getSiteConfig(); + } catch (SQLException e) { + logger.error("get site profile error.", e); + } + return null; + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/executor/MessageExecutor.java b/openzaly-message/src/main/java/com/akaxin/site/message/executor/MessageExecutor.java new file mode 100755 index 0000000..124764a --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/executor/MessageExecutor.java @@ -0,0 +1,112 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.executor; + +import com.akaxin.common.command.Command; +import com.akaxin.common.constant.RequestAction; +import com.akaxin.common.executor.AbstracteExecutor; +import com.akaxin.common.executor.SimpleExecutor; +import com.akaxin.common.executor.chain.AbstractHandlerChain; +import com.akaxin.common.executor.chain.SimpleHandlerChain; +import com.akaxin.site.message.group.handler.GroupDetectionHandler; +import com.akaxin.site.message.group.handler.GroupMessageImageHandler; +import com.akaxin.site.message.group.handler.GroupMessageNoticeHandler; +import com.akaxin.site.message.group.handler.GroupMessageTextHandler; +import com.akaxin.site.message.group.handler.GroupMessageVoiceHandler; +import com.akaxin.site.message.group.handler.GroupMessageWebHandler; +import com.akaxin.site.message.group.handler.GroupMessageWebNoticeHandler; +import com.akaxin.site.message.group.handler.GroupPsnHandler; +import com.akaxin.site.message.group.handler.GroupPushHandler; +import com.akaxin.site.message.notice.handler.NoticeHandler; +import com.akaxin.site.message.notice.handler.NoticePushHandler; +import com.akaxin.site.message.sync.handler.SyncFinishHandler; +import com.akaxin.site.message.sync.handler.SyncGroupMessageHandler; +import com.akaxin.site.message.sync.handler.SyncMsgStatusHandler; +import com.akaxin.site.message.sync.handler.SyncU2MessageHandler; +import com.akaxin.site.message.user2.handler.U2MessageImageHandler; +import com.akaxin.site.message.user2.handler.U2MessageImageSecretHandler; +import com.akaxin.site.message.user2.handler.U2MessageNoticeHandler; +import com.akaxin.site.message.user2.handler.U2MessageTextHandler; +import com.akaxin.site.message.user2.handler.U2MessageTextSecretHandler; +import com.akaxin.site.message.user2.handler.U2MessageVoiceHandler; +import com.akaxin.site.message.user2.handler.U2MessageVoiceSecretHandler; +import com.akaxin.site.message.user2.handler.U2MessageWebHandler; +import com.akaxin.site.message.user2.handler.U2MessageWebNoticeHandler; +import com.akaxin.site.message.user2.handler.UserDetectionHandler; +import com.akaxin.site.message.user2.handler.UserPsnHandler; +import com.akaxin.site.message.user2.handler.UserPushHandler; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-02-05 11:48:39 + */ +public class MessageExecutor { + private static AbstracteExecutor executor = new SimpleExecutor(); + + static { + AbstractHandlerChain u2MessageChain = new SimpleHandlerChain(); + u2MessageChain.addHandler(new UserDetectionHandler()); + u2MessageChain.addHandler(new U2MessageTextHandler()); + u2MessageChain.addHandler(new U2MessageTextSecretHandler()); + u2MessageChain.addHandler(new U2MessageImageHandler()); + u2MessageChain.addHandler(new U2MessageImageSecretHandler()); + u2MessageChain.addHandler(new U2MessageVoiceHandler()); + u2MessageChain.addHandler(new U2MessageVoiceSecretHandler()); + u2MessageChain.addHandler(new U2MessageNoticeHandler()); + u2MessageChain.addHandler(new U2MessageWebHandler()); + u2MessageChain.addHandler(new U2MessageWebNoticeHandler()); + u2MessageChain.addHandler(new UserPsnHandler()); + u2MessageChain.addHandler(new UserPushHandler()); + + AbstractHandlerChain groupMessageChain = new SimpleHandlerChain(); + groupMessageChain.addHandler(new GroupDetectionHandler()); + groupMessageChain.addHandler(new GroupMessageTextHandler()); + groupMessageChain.addHandler(new GroupMessageImageHandler()); + groupMessageChain.addHandler(new GroupMessageVoiceHandler()); + groupMessageChain.addHandler(new GroupMessageNoticeHandler()); + groupMessageChain.addHandler(new GroupMessageWebHandler()); + groupMessageChain.addHandler(new GroupMessageWebNoticeHandler()); + groupMessageChain.addHandler(new GroupPsnHandler()); + groupMessageChain.addHandler(new GroupPushHandler()); + + AbstractHandlerChain syncMessageChain = new SimpleHandlerChain(); + syncMessageChain.addHandler(new SyncU2MessageHandler()); + syncMessageChain.addHandler(new SyncGroupMessageHandler()); + + AbstractHandlerChain noticeChain = new SimpleHandlerChain(); + noticeChain.addHandler(new NoticeHandler()); + noticeChain.addHandler(new NoticePushHandler()); + + // "im.cts.message.u2" + executor.addChain(RequestAction.IM_CTS_MESSAGE_U2.getName(), u2MessageChain); + // "im.cts.message.group" + executor.addChain(RequestAction.IM_CTS_MESSAGE_GROUP.getName(), groupMessageChain); + // "im.sync.message" + executor.addChain(RequestAction.IM_SYNC_MESSAGE.getName(), syncMessageChain); + // "im.sync.finish" + executor.addChain(RequestAction.IM_SYNC_FINISH.getName(), new SyncFinishHandler()); + // "im.sync.msgStatus" + executor.addChain(RequestAction.IM_SYNC_MSGSTATUS.getName(), new SyncMsgStatusHandler()); + // "im.stc.notice" + executor.addChain(RequestAction.IM_STC_NOTICE.getName(), noticeChain); + } + + public static AbstracteExecutor getExecutor() { + return executor; + } + +} \ No newline at end of file diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/AbstractGroupHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/AbstractGroupHandler.java new file mode 100755 index 0000000..ff3c582 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/AbstractGroupHandler.java @@ -0,0 +1,80 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.group.handler; + +import org.apache.commons.lang3.StringUtils; + +import com.akaxin.common.channel.ChannelWriter; +import com.akaxin.common.command.Command; +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.executor.chain.handler.IHandler; +import com.akaxin.proto.client.ImStcMessageProto; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.CoreProto.MsgType; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-02-05 11:50:15 + * @param + */ +public abstract class AbstractGroupHandler implements IHandler { + + protected void msgStatusResponse(Command command, String msgId, long msgTime, boolean success) { + if (command == null || StringUtils.isEmpty(command.getDeviceId())) { + return; + } + + int statusValue = success ? 1 : 0; + CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) + .setMsgStatus(statusValue).build(); + + ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.MSG_STATUS).setStatus(status).build(); + + ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() + .addList(statusMsg).build(); + + CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() + .setData(request.toByteString()).build(); + + ChannelWriter.writeByDeviceId(command.getDeviceId(), new RedisCommand().add(CommandConst.PROTOCOL_VERSION) + .add(CommandConst.IM_MSG_TOCLIENT).add(data.toByteArray())); + + } + + protected void msgStatusResponse(Command command, String msgId, long msgTime, int statusValue) { + if (command == null || StringUtils.isEmpty(command.getDeviceId())) { + return; + } + + CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgStatus(statusValue) + .setMsgServerTime(msgTime).build(); + + ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.MSG_STATUS).setStatus(status).build(); + + ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() + .addList(statusMsg).build(); + + CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() + .setData(request.toByteString()).build(); + + ChannelWriter.writeByDeviceId(command.getDeviceId(), new RedisCommand().add(CommandConst.PROTOCOL_VERSION) + .add(CommandConst.IM_MSG_TOCLIENT).add(data.toByteArray())); + } +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupDetectionHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupDetectionHandler.java new file mode 100755 index 0000000..c99207f --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupDetectionHandler.java @@ -0,0 +1,179 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.group.handler; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.UserProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.message.dao.ImUserGroupDao; +import com.akaxin.site.message.dao.ImUserProfileDao; +import com.akaxin.site.storage.bean.GroupProfileBean; +import com.akaxin.site.storage.bean.SimpleUserBean; + +/** + *
+ * 检测群消息发送,是否满足条件
+ * 	1.群成员
+ * 	2.用户是否被seal up
+ * 	3.群是否存在或群状态
+ * 	4.设置command中必要参数
+ * 
+ * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-02-05 11:47:47 + */ +public class GroupDetectionHandler extends AbstractGroupHandler { + private static final Logger logger = LoggerFactory.getLogger(GroupDetectionHandler.class); + + public Boolean handle(Command command) { + try { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + int type = request.getType().getNumber(); + command.setMsgType(type); + + String siteUserId = command.getSiteUserId(); + String siteGroupId = null; + String gmsgId = null; + + switch (type) { + case CoreProto.MsgType.GROUP_TEXT_VALUE: + if (command.isProxy()) { + siteUserId = request.getGroupText().getSiteUserId(); + } + gmsgId = request.getGroupText().getMsgId(); + siteGroupId = request.getGroupText().getSiteGroupId(); + case CoreProto.MsgType.GROUP_SECRET_TEXT_VALUE: + break; + case CoreProto.MsgType.GROUP_IMAGE_VALUE: + if (command.isProxy()) { + siteUserId = request.getGroupImage().getSiteUserId(); + } + gmsgId = request.getGroupImage().getMsgId(); + siteGroupId = request.getGroupImage().getSiteGroupId(); + break; + case CoreProto.MsgType.GROUP_SECRET_IMAGE_VALUE: + break; + case CoreProto.MsgType.GROUP_VOICE_VALUE: + if (command.isProxy()) { + siteUserId = request.getGroupVoice().getSiteUserId(); + } + gmsgId = request.getGroupVoice().getMsgId(); + siteGroupId = request.getGroupVoice().getSiteGroupId(); + break; + case CoreProto.MsgType.GROUP_SECRET_VOICE_VALUE: + break; + case CoreProto.MsgType.GROUP_NOTICE_VALUE: + if (command.isProxy()) { + siteUserId = request.getGroupMsgNotice().getSiteUserId(); + } + siteGroupId = request.getGroupMsgNotice().getSiteGroupId(); + command.setSiteGroupId(siteGroupId); + // 系统下发的消息,直接return true; + return true; + case CoreProto.MsgType.GROUP_WEB_VALUE: + if (command.isProxy()) { + siteUserId = request.getGroupWeb().getSiteUserId(); + } + siteGroupId = request.getGroupWeb().getSiteGroupId(); + command.setProxySiteUserId(siteUserId); + command.setSiteGroupId(siteGroupId); + // 系统下发的消息,直接return true; + return true; + case CoreProto.MsgType.GROUP_WEB_NOTICE_VALUE: + if (command.isProxy()) { + siteUserId = request.getGroupWebNotice().getSiteUserId(); + } + siteGroupId = request.getGroupWebNotice().getSiteGroupId(); + command.setProxySiteUserId(siteUserId); + command.setSiteGroupId(siteGroupId); + // 系统下发的消息,直接return true; + return true; + default: + break; + } + + command.setProxySiteUserId(siteUserId); + // 群消息设置siteGroupId + command.setSiteGroupId(siteGroupId); + + // check parameters + if (StringUtils.isAnyEmpty(siteUserId, siteGroupId)) { + return false; + } + + // check is member of group + if (check(siteUserId, siteGroupId)) { + return true; + } else { + logger.warn("client={} siteUserId={} is not group={} member", command.getClientIp(), siteUserId, + siteGroupId); + int statusValue = -2; + msgStatusResponse(command, gmsgId, System.currentTimeMillis(), statusValue); + } + + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, GroupDetectionHandler.class, e); + } + + return false; + } + + private boolean check(String siteUserId, String siteGroupId) { + return checkUser(siteUserId) && checkGroupStatus(siteGroupId) && isGroupMember(siteUserId, siteGroupId); + } + + // 1.检测用户状态是否正常(被封禁用户) + private boolean checkUser(String siteUserId) { + // 检测发送者的状态 + SimpleUserBean userBean = ImUserProfileDao.getInstance().getSimpleUserProfile(siteUserId); + if (userBean != null) { + if (userBean.getUserStatus() != UserProto.UserStatus.NORMAL_VALUE) { + return false; + } + } else { + return false; + } + + return true; + } + + // 2.检测群状态,是否为被删除群 + private boolean checkGroupStatus(String groupId) { + try { + GroupProfileBean bean = ImUserGroupDao.getInstance().getGroupProfile(groupId); + if (bean != null && StringUtils.isNotBlank(bean.getGroupId())) { + if (bean.getGroupStatus() != 0) { + return true; + } + } + } catch (Exception e) { + logger.error("check group status error", e); + } + return false; + } + + // 3.检测是否为群成员,可以发送群消息 + private boolean isGroupMember(String siteUserId, String groupId) { + return ImUserGroupDao.getInstance().isGroupMember(siteUserId, groupId); + } +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageImageHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageImageHandler.java new file mode 100755 index 0000000..9e7ed62 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageImageHandler.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.group.handler; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.GroupMessageBean; +import com.akaxin.site.storage.service.MessageDaoService; + +/** + * 群图片消息 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-02-05 11:50:30 + */ +public class GroupMessageImageHandler extends AbstractGroupHandler { + private static final Logger logger = LoggerFactory.getLogger(GroupMessageImageHandler.class); + private IMessageDao messageDao = new MessageDaoService(); + + public Boolean handle(Command command) { + try { + int type = command.getMsgType(); + + if (CoreProto.MsgType.GROUP_IMAGE_VALUE == type) { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String deviceId = command.getDeviceId(); + String proxySiteUserId = request.getGroupImage().getSiteUserId(); + String gmsgId = request.getGroupImage().getMsgId(); + String groupId = request.getGroupImage().getSiteGroupId(); + String groupImageId = request.getGroupImage().getImageId(); + + long msgTime = System.currentTimeMillis(); + GroupMessageBean gmsgBean = new GroupMessageBean(); + gmsgBean.setMsgId(gmsgId); + gmsgBean.setSendUserId(command.isProxy() ? proxySiteUserId : siteUserId); + // gmsgBean.setSendUserId(siteUserId); + gmsgBean.setSendDeviceId(deviceId); + gmsgBean.setSiteGroupId(groupId); + gmsgBean.setContent(groupImageId); + gmsgBean.setMsgType(type); + gmsgBean.setMsgTime(msgTime); + + LogUtils.requestDebugLog(logger, command, gmsgBean.toString()); + + boolean success = messageDao.saveGroupMessage(gmsgBean); + msgStatusResponse(command, gmsgId, msgTime, success); + return success; + } + return true; + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + + return false; + } + + // private void msgResponse(Channel channel, Command command, String from, + // String to, String msgId, long msgTime) { + // CoreProto.MsgStatus status = + // CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) + // .setMsgStatus(1).build(); + // + // ImStcMessageProto.MsgWithPointer statusMsg = + // ImStcMessageProto.MsgWithPointer.newBuilder() + // .setType(MsgType.MSG_STATUS).setStatus(status).build(); + // + // ImStcMessageProto.ImStcMessageRequest request = + // ImStcMessageProto.ImStcMessageRequest.newBuilder() + // .addList(0, statusMsg).build(); + // + // CoreProto.TransportPackageData data = + // CoreProto.TransportPackageData.newBuilder() + // .setData(request.toByteString()).build(); + // + // channel.writeAndFlush(new + // RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) + // .add(data.toByteArray())); + // + // } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageImageSecretHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageImageSecretHandler.java new file mode 100755 index 0000000..008a5c0 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageImageSecretHandler.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.group.handler; + +import com.akaxin.common.channel.ChannelSession; +import com.akaxin.common.command.Command; +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.proto.client.ImStcMessageProto; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.CoreProto.MsgType; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.GroupMessageBean; +import com.akaxin.site.storage.service.MessageDaoService; + +import io.netty.channel.Channel; + +/** + * 群加密图片消息(暂不支持) + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-26 15:12:59 + */ +@Deprecated +public class GroupMessageImageSecretHandler extends AbstractGroupHandler { + + private IMessageDao messageDao = new MessageDaoService(); + + public Boolean handle(Command command) { + ChannelSession channelSession = command.getChannelSession(); + + try { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + + int type = request.getType().getNumber(); + + if (CoreProto.MsgType.GROUP_SECRET_TEXT_VALUE == type) { + String siteUserId = command.getSiteUserId(); + String deviceId = command.getDeviceId(); + // String group_user_id = request.getGroupSecretText().getSiteUserId(); + String gmsg_id = request.getGroupSecretText().getMsgId(); + String group_id = request.getGroupSecretText().getSiteGroupId(); + String group_text = request.getGroupSecretText().getText().toStringUtf8(); + + command.setSiteGroupId(group_id); + // command.setField("group_id", group_id); + + System.out.println( + "GroupMsg = id=" + gmsg_id + "," + siteUserId + "," + group_id + "," + group_text + ","); + + long msgTime = System.currentTimeMillis(); + GroupMessageBean gmsgBean = new GroupMessageBean(); + gmsgBean.setSendDeviceId(deviceId); + gmsgBean.setMsgTime(msgTime); + messageDao.saveGroupMessage(gmsgBean); + + msgResponse(channelSession.getChannel(), command, siteUserId, group_id, gmsg_id, msgTime); + + return true; + } + return true; + } catch (Exception e) { + e.printStackTrace(); + } + + return false; + } + + private void msgResponse(Channel channel, Command command, String from, String to, String msgId, long msgTime) { + CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) + .setMsgStatus(1).build(); + + ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.MSG_STATUS).setStatus(status).build(); + + ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() + .addList(0, statusMsg).build(); + + CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() + .setData(request.toByteString()).build(); + + channel.writeAndFlush(new RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) + .add(data.toByteArray())); + + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageNoticeHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageNoticeHandler.java new file mode 100755 index 0000000..99eea4a --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageNoticeHandler.java @@ -0,0 +1,76 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.group.handler; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.GroupMessageBean; +import com.akaxin.site.storage.service.MessageDaoService; + +/** + * 群通知消息 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-26 15:13:24 + */ +public class GroupMessageNoticeHandler extends AbstractGroupHandler { + private static final Logger logger = LoggerFactory.getLogger(GroupMessageNoticeHandler.class); + private IMessageDao messageDao = new MessageDaoService(); + + @Override + public Boolean handle(Command command) { + try { + int type = command.getMsgType(); + + if (CoreProto.MsgType.GROUP_NOTICE_VALUE == type) { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String deviceId = command.getDeviceId(); + + String proxySiteUserId = request.getGroupMsgNotice().getSiteUserId(); + String groupId = request.getGroupMsgNotice().getSiteGroupId(); + String groupNoticeText = request.getGroupMsgNotice().getText().toStringUtf8(); + String msgId = request.getGroupMsgNotice().getMsgId(); + + GroupMessageBean bean = new GroupMessageBean(); + bean.setMsgId(msgId); + // bean.setSendUserId(siteUserId); + bean.setSendUserId(command.isProxy() ? proxySiteUserId : siteUserId); + bean.setSendDeviceId(deviceId); + bean.setSiteGroupId(groupId); + bean.setContent(groupNoticeText); + bean.setMsgType(type); + bean.setMsgTime(System.currentTimeMillis()); + + LogUtils.requestDebugLog(logger, command, bean.toString()); + + return messageDao.saveGroupMessage(bean); + } + return true; + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + return false; + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageTextHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageTextHandler.java new file mode 100755 index 0000000..929d0e8 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageTextHandler.java @@ -0,0 +1,103 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.group.handler; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.GroupMessageBean; +import com.akaxin.site.storage.service.MessageDaoService; + +/** + * 群文本消息 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-26 15:13:53 + */ +public class GroupMessageTextHandler extends AbstractGroupHandler { + private static final Logger logger = LoggerFactory.getLogger(GroupMessageTextHandler.class); + private IMessageDao messageDao = new MessageDaoService(); + + public Boolean handle(Command command) { + try { + int type = command.getMsgType(); + + if (CoreProto.MsgType.GROUP_TEXT_VALUE == type) { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String deviceId = command.getDeviceId(); + + String proxySiteUserId = request.getGroupText().getSiteUserId(); + String gmsgId = request.getGroupText().getMsgId(); + String groupId = request.getGroupText().getSiteGroupId(); + String groupText = request.getGroupText().getText().toStringUtf8(); + + long msgTime = System.currentTimeMillis(); + GroupMessageBean gmsgBean = new GroupMessageBean(); + gmsgBean.setMsgId(gmsgId); + gmsgBean.setSendUserId(siteUserId); + gmsgBean.setSendUserId(command.isProxy() ? proxySiteUserId : siteUserId); + gmsgBean.setSendDeviceId(deviceId); + gmsgBean.setSiteGroupId(groupId); + gmsgBean.setContent(groupText); + gmsgBean.setMsgType(type); + gmsgBean.setMsgTime(msgTime); + + LogUtils.requestDebugLog(logger, command, gmsgBean.toString()); + + boolean success = messageDao.saveGroupMessage(gmsgBean); + msgStatusResponse(command, gmsgId, msgTime, success); + return success; + } + return true; + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + + return false; + } + + // private void msgResponse(Channel channel, Command command, String from, + // String to, String msgId, long msgTime) { + // CoreProto.MsgStatus status = + // CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) + // .setMsgStatus(1).build(); + // + // ImStcMessageProto.MsgWithPointer statusMsg = + // ImStcMessageProto.MsgWithPointer.newBuilder() + // .setType(MsgType.MSG_STATUS).setStatus(status).build(); + // + // ImStcMessageProto.ImStcMessageRequest request = + // ImStcMessageProto.ImStcMessageRequest.newBuilder() + // .addList(statusMsg).build(); + // + // CoreProto.TransportPackageData data = + // CoreProto.TransportPackageData.newBuilder() + // .setData(request.toByteString()).build(); + // + // channel.writeAndFlush(new + // RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) + // .add(data.toByteArray())); + // + // } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageTextSecretHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageTextSecretHandler.java new file mode 100755 index 0000000..581de73 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageTextSecretHandler.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.group.handler; + +import com.akaxin.common.channel.ChannelSession; +import com.akaxin.common.command.Command; +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.proto.client.ImStcMessageProto; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.CoreProto.MsgType; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.GroupMessageBean; +import com.akaxin.site.storage.service.MessageDaoService; + +import io.netty.channel.Channel; + +/** + * 群加密文本消息(暂不支持) + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-26 15:15:01 + */ +@Deprecated +public class GroupMessageTextSecretHandler extends AbstractGroupHandler { + + private IMessageDao messageDao = new MessageDaoService(); + + public Boolean handle(Command command) { + ChannelSession channelSession = command.getChannelSession(); + + try { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + + int type = request.getType().getNumber(); + + if (CoreProto.MsgType.GROUP_SECRET_TEXT_VALUE == type) { + + String gmsg_id = request.getGroupSecretText().getMsgId(); + String group_user_id = request.getGroupSecretText().getSiteUserId(); + String group_id = request.getGroupSecretText().getSiteGroupId(); + String group_text = request.getGroupSecretText().getText().toStringUtf8(); + + command.setSiteGroupId(group_id); + // command.setField("group_id", group_id); + + System.out.println( + "GroupMsg = id=" + gmsg_id + "," + group_user_id + "," + group_id + "," + group_text + ","); + + long msgTime = System.currentTimeMillis(); + GroupMessageBean gmsgBean = new GroupMessageBean(); + gmsgBean.setMsgTime(msgTime); + messageDao.saveGroupMessage(gmsgBean); + + msgResponse(channelSession.getChannel(), command, group_user_id, group_id, gmsg_id, msgTime); + + return true; + } + return true; + } catch (Exception e) { + e.printStackTrace(); + } + + return false; + } + + private void msgResponse(Channel channel, Command command, String from, String to, String msgId, long msgTime) { + CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) + .setMsgStatus(1).build(); + + ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.MSG_STATUS).setStatus(status).build(); + + ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() + .addList(0, statusMsg).build(); + + CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() + .setData(request.toByteString()).build(); + + channel.writeAndFlush(new RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) + .add(data.toByteArray())); + + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageVoiceHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageVoiceHandler.java new file mode 100755 index 0000000..40b132c --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageVoiceHandler.java @@ -0,0 +1,103 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.group.handler; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.GroupMessageBean; +import com.akaxin.site.storage.service.MessageDaoService; + +/** + * 群语音消息 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-26 15:15:17 + */ +public class GroupMessageVoiceHandler extends AbstractGroupHandler { + private static final Logger logger = LoggerFactory.getLogger(GroupMessageVoiceHandler.class); + private IMessageDao messageDao = new MessageDaoService(); + + public Boolean handle(Command command) { + try { + int type = command.getMsgType(); + + if (CoreProto.MsgType.GROUP_VOICE_VALUE == type) { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String deviceId = command.getDeviceId(); + + String proxySiteUserId = request.getGroupVoice().getSiteUserId(); + String gmsgId = request.getGroupVoice().getMsgId(); + String groupId = request.getGroupVoice().getSiteGroupId(); + String groupVoiceId = request.getGroupVoice().getVoiceId(); + + long msgTime = System.currentTimeMillis(); + GroupMessageBean gmsgBean = new GroupMessageBean(); + gmsgBean.setMsgId(gmsgId); + gmsgBean.setSendUserId(siteUserId); + gmsgBean.setSendUserId(command.isProxy() ? proxySiteUserId : siteUserId); + gmsgBean.setSiteGroupId(groupId); + gmsgBean.setSendDeviceId(deviceId); + gmsgBean.setContent(groupVoiceId); + gmsgBean.setMsgType(type); + gmsgBean.setMsgTime(msgTime); + + LogUtils.requestDebugLog(logger, command, gmsgBean.toString()); + + boolean success = messageDao.saveGroupMessage(gmsgBean); + msgStatusResponse(command, gmsgId, msgTime, success); + return success; + } + return true; + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + + return false; + } + + // private void msgResponse(Channel channel, Command command, String from, + // String to, String msgId, long msgTime) { + // CoreProto.MsgStatus status = + // CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) + // .setMsgStatus(1).build(); + // + // ImStcMessageProto.MsgWithPointer statusMsg = + // ImStcMessageProto.MsgWithPointer.newBuilder() + // .setType(MsgType.MSG_STATUS).setStatus(status).build(); + // + // ImStcMessageProto.ImStcMessageRequest request = + // ImStcMessageProto.ImStcMessageRequest.newBuilder() + // .addList(0, statusMsg).build(); + // + // CoreProto.TransportPackageData data = + // CoreProto.TransportPackageData.newBuilder() + // .setData(request.toByteString()).build(); + // + // channel.writeAndFlush(new + // RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) + // .add(data.toByteArray())); + // + // } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageVoiceSecretHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageVoiceSecretHandler.java new file mode 100755 index 0000000..02fec74 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageVoiceSecretHandler.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.group.handler; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.proto.client.ImStcMessageProto; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.CoreProto.MsgType; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.service.MessageDaoService; + +import io.netty.channel.Channel; + +/** + * 群加密语音消息(暂不支持) + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-26 15:15:54 + */ +@Deprecated +public class GroupMessageVoiceSecretHandler extends AbstractGroupHandler { + private static final Logger logger = LoggerFactory.getLogger(GroupMessageVoiceSecretHandler.class); + private IMessageDao messageDao = new MessageDaoService(); + + @Override + public Boolean handle(Command command) { + try { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + + int type = request.getType().getNumber(); + + if (CoreProto.MsgType.GROUP_SECRET_VOICE_VALUE == type) { + + // String gmsgId = request.getGroupSecretVoice().getMsgId(); + // String siteUserId = + // request.getGroupSecretVoice().getSiteUserId(); + // String groupId = + // request.getGroupSecretVoice().getSiteGroupId(); + // String groupVoiceId = + // request.getGroupSecretVoice().getVoicdId(); + // + // + // GroupMessageBean gmsgBean = new GroupMessageBean(); + // messageDao.saveGroupMessage(gmsgBean); + // + // msgResponse(channelSession.getChannel(), command, + // group_user_id, group_id, gmsg_id); + + return true; + } + return true; + } catch (Exception e) { + e.printStackTrace(); + } + + return false; + } + + private void msgResponse(Channel channel, Command command, String from, String to, String msgId) { + CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgStatus(1).build(); + + ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.MSG_STATUS).setStatus(status).build(); + + ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() + .addList(0, statusMsg).build(); + + CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() + .setData(request.toByteString()).build(); + + channel.writeAndFlush(new RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) + .add(data.toByteArray())); + + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageWebHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageWebHandler.java new file mode 100755 index 0000000..4d82054 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageWebHandler.java @@ -0,0 +1,113 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.group.handler; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.message.bean.WebBean; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.GroupMessageBean; +import com.akaxin.site.storage.service.MessageDaoService; + +/** + * 群web消息 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-24 20:32:13 + */ +public class GroupMessageWebHandler extends AbstractGroupHandler { + private static final Logger logger = LoggerFactory.getLogger(GroupMessageWebHandler.class); + private IMessageDao messageDao = new MessageDaoService(); + + public Boolean handle(Command command) { + try { + int type = command.getMsgType(); + + if (CoreProto.MsgType.GROUP_WEB_VALUE == type) { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String deviceId = command.getDeviceId(); + + String proxySiteUserId = request.getGroupWeb().getSiteUserId(); + String gmsgId = request.getGroupWeb().getMsgId(); + String groupId = request.getGroupWeb().getSiteGroupId(); + String webCode = request.getGroupWeb().getWebCode(); + int webWidth = request.getGroupWeb().getWidth(); + int webHeight = request.getGroupWeb().getHeight(); + String hrefUrl = request.getGroupWeb().getHrefUrl(); + long msgTime = System.currentTimeMillis(); + + WebBean webBean = new WebBean(); + webBean.setWebCode(webCode); + webBean.setHeight(webHeight); + webBean.setWidth(webWidth); + webBean.setHrefUrl(hrefUrl); + + GroupMessageBean gmsgBean = new GroupMessageBean(); + gmsgBean.setMsgId(gmsgId); + // gmsgBean.setSendUserId(siteUserId); + gmsgBean.setSendUserId(command.isProxy() ? proxySiteUserId : siteUserId); + gmsgBean.setSendDeviceId(deviceId); + gmsgBean.setSiteGroupId(groupId); + gmsgBean.setContent(webBean.toString()); + gmsgBean.setMsgType(type); + gmsgBean.setMsgTime(msgTime); + + LogUtils.requestDebugLog(logger, command, gmsgBean.toString()); + + boolean success = messageDao.saveGroupMessage(gmsgBean); + msgStatusResponse(command, gmsgId, msgTime, success); + return success; + } + return true; + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + + return false; + } + + // private void msgResponse(Channel channel, Command command, String from, + // String to, String msgId, long msgTime) { + // CoreProto.MsgStatus status = + // CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) + // .setMsgStatus(1).build(); + // + // ImStcMessageProto.MsgWithPointer statusMsg = + // ImStcMessageProto.MsgWithPointer.newBuilder() + // .setType(MsgType.MSG_STATUS).setStatus(status).build(); + // + // ImStcMessageProto.ImStcMessageRequest request = + // ImStcMessageProto.ImStcMessageRequest.newBuilder() + // .addList(statusMsg).build(); + // + // CoreProto.TransportPackageData data = + // CoreProto.TransportPackageData.newBuilder() + // .setData(request.toByteString()).build(); + // + // channel.writeAndFlush(new + // RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) + // .add(data.toByteArray())); + // + // } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageWebNoticeHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageWebNoticeHandler.java new file mode 100755 index 0000000..93e0a28 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupMessageWebNoticeHandler.java @@ -0,0 +1,83 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.group.handler; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.message.bean.WebBean; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.GroupMessageBean; +import com.akaxin.site.storage.service.MessageDaoService; + +/** + * 群web通知消息 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-24 20:32:32 + */ +public class GroupMessageWebNoticeHandler extends AbstractGroupHandler { + private static final Logger logger = LoggerFactory.getLogger(GroupMessageWebNoticeHandler.class); + private IMessageDao messageDao = new MessageDaoService(); + + public Boolean handle(Command command) { + try { + int type = command.getMsgType(); + // group web notice + if (CoreProto.MsgType.GROUP_WEB_NOTICE_VALUE == type) { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String deviceId = command.getDeviceId(); + String proxySiteUserId = request.getGroupWebNotice().getSiteUserId(); + String gmsgId = request.getGroupWebNotice().getMsgId(); + String groupId = request.getGroupWebNotice().getSiteGroupId(); + + WebBean webBean = new WebBean(); + webBean.setWebCode(request.getGroupWebNotice().getWebCode()); + webBean.setHrefUrl(request.getGroupWebNotice().getHrefUrl()); + webBean.setHeight(request.getGroupWebNotice().getHeight()); + + long msgTime = System.currentTimeMillis(); + GroupMessageBean bean = new GroupMessageBean(); + bean.setMsgId(gmsgId); + // bean.setSendUserId(siteUserId); + bean.setSendUserId(command.isProxy() ? proxySiteUserId : siteUserId); + bean.setSendDeviceId(deviceId); + bean.setSiteGroupId(groupId); + bean.setContent(webBean.toString()); + bean.setMsgType(type); + bean.setMsgTime(msgTime); + + LogUtils.requestDebugLog(logger, command, bean.toString()); + + boolean success = messageDao.saveGroupMessage(bean); + msgStatusResponse(command, gmsgId, msgTime, success); + return success; + } + return true; + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + + return false; + } + +} \ No newline at end of file diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupPsnHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupPsnHandler.java new file mode 100755 index 0000000..a66602b --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupPsnHandler.java @@ -0,0 +1,75 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.group.handler; + +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.channel.ChannelWriter; +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.client.ImStcPsnProto; +import com.akaxin.site.message.dao.ImUserSessionDao; +import com.akaxin.site.storage.api.IGroupDao; +import com.akaxin.site.storage.service.GroupDaoService; + +public class GroupPsnHandler extends AbstractGroupHandler { + private static final Logger logger = LoggerFactory.getLogger(GroupPsnHandler.class); + private IGroupDao groupDao = new GroupDaoService(); + + public Boolean handle(Command command) { + try { + String siteGroupId = command.getSiteGroupId(); + String siteUserId = command.getSiteUserId(); + String siteDeviceId = command.getDeviceId(); + String siteFriendId = command.getSiteFriendId(); + + List groupMembers = groupDao.getGroupMembersId(siteGroupId); + for (String groupMemberUserId : groupMembers) { + List deivceIds = ImUserSessionDao.getInstance().getSessionDevices(groupMemberUserId); + for (String deviceId : deivceIds) { + if (StringUtils.isNotEmpty(deviceId) && !deviceId.equals(siteDeviceId)) { + writePSN(deviceId); + logger.debug("client={} siteUserId={} PSN to groupId={} siteFriendId={}, deviceId={}", + command.getClientIp(), siteUserId, siteGroupId, siteFriendId, deviceId); + } + } + + } + return true; + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + + return false; + } + + private void writePSN(String deviceId) { + CommandResponse commandResponse = new CommandResponse().setVersion(CommandConst.PROTOCOL_VERSION) + .setAction(CommandConst.IM_STC_PSN); + ImStcPsnProto.ImStcPsnRequest pshRequest = ImStcPsnProto.ImStcPsnRequest.newBuilder().build(); + commandResponse.setParams(pshRequest.toByteArray()); + commandResponse.setErrCode2(ErrorCode2.SUCCESS); + ChannelWriter.writeByDeviceId(deviceId, commandResponse); + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupPushHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupPushHandler.java new file mode 100755 index 0000000..c4bce7d --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/group/handler/GroupPushHandler.java @@ -0,0 +1,153 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.group.handler; + +import java.nio.charset.Charset; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.ConfigProto; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.PushProto; +import com.akaxin.proto.platform.ApiPushNotificationsProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.message.dao.ImUserGroupDao; +import com.akaxin.site.message.dao.ImUserProfileDao; +import com.akaxin.site.message.push.PushClient; +import com.akaxin.site.message.threads.MultiPushThreadExecutor; +import com.akaxin.site.message.utils.SiteConfigHelper; +import com.akaxin.site.storage.api.IGroupDao; +import com.akaxin.site.storage.bean.GroupProfileBean; +import com.akaxin.site.storage.service.GroupDaoService; +import com.google.protobuf.ByteString; + +/** + * 群push处理handler + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-20 21:46:15 + */ +public class GroupPushHandler extends AbstractGroupHandler { + private static final Logger logger = LoggerFactory.getLogger(GroupPushHandler.class); + private IGroupDao groupDao = new GroupDaoService(); + + public Boolean handle(Command command) { + // 1.检测当前站点是否开启PUSH开关,开启才支持PUSH功能 + ConfigProto.PushClientStatus pcs = SiteConfigHelper.getPushClientStatus(); + if (ConfigProto.PushClientStatus.PUSH_NO == pcs) { + logger.warn("push to client error. cause: pushClientStatus={}", ConfigProto.PushClientStatus.PUSH_NO); + return true; + } + + // 多线程处理push + MultiPushThreadExecutor.getExecutor().execute(new Runnable() { + + @Override + public void run() { + try { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + // String siteUserId = command.getSiteUserId(); + String fromSiteUserId = command.isProxy() ? command.getProxySiteUserId() : command.getSiteUserId(); // + String siteGroupId = command.getSiteGroupId(); + + GroupProfileBean groupBean = ImUserGroupDao.getInstance().getSimpleGroupProfile(siteGroupId); + if (groupBean == null || groupBean.getGroupId() == null) { + logger.error("send message with push to group={} error", groupBean); + return; + } + + String fromGlobalUserId = ImUserProfileDao.getInstance().getGlobalUserId(fromSiteUserId); + // Push Request + ApiPushNotificationsProto.ApiPushNotificationsRequest.Builder requestBuilder = ApiPushNotificationsProto.ApiPushNotificationsRequest + .newBuilder(); + // 1.set pushType + requestBuilder.setPushTypeValue(request.getType().getNumber()); + // 2.set notification + PushProto.Notifications.Builder notifications = PushProto.Notifications.newBuilder(); + String siteName = SiteConfigHelper.getConfig(ConfigProto.ConfigKey.SITE_NAME); + if (StringUtils.isNotBlank(siteName)) { + notifications.setPushTitle(siteName); + } + String address = SiteConfigHelper.getConfig(ConfigProto.ConfigKey.SITE_ADDRESS); + String port = SiteConfigHelper.getConfig(ConfigProto.ConfigKey.SITE_PORT); + notifications.setSiteServer(address + ":" + port); + // 条件1:站点是否支持push展示消息内容 + // 条件2:站点只支持文本消息展示消息内容 + if (ConfigProto.PushClientStatus.PUSH_DISPLAY_TEXT == pcs) { + if (CoreProto.MsgType.GROUP_TEXT == request.getType()) { + ByteString byteStr = request.getGroupText().getText(); + notifications.setPushAlert(byteStr.toString(Charset.forName("UTF-8"))); + } + } + requestBuilder.setNotifications(notifications.build()); + // 3.set pushFromUser + PushProto.PushFromUser pushFromUser = PushProto.PushFromUser.newBuilder() + .setGlobalUserId(fromGlobalUserId).setSiteUserId(fromSiteUserId) + .setPushFromName(groupBean.getGroupName()).build(); + requestBuilder.setPushFromUser(pushFromUser); + + // 4.set pushToUser + List groupMembers = groupDao.getGroupMembersId(siteGroupId); + for (String memberUserId : groupMembers) { + + if (StringUtils.isNotBlank(memberUserId) && !memberUserId.equals(fromSiteUserId)) { + // 一、用户是否对站点消息免打扰 + // 二、用户是否对该群消息免打扰 + if (ImUserProfileDao.getInstance().isMute(memberUserId) + || ImUserGroupDao.getInstance().isMesageMute(memberUserId, siteGroupId)) { + continue; + } + + String globalUserId = ImUserProfileDao.getInstance().getGlobalUserId(memberUserId); + logger.debug("push from groupid={} to siteUserId={} globalUserId={}.", siteGroupId, + memberUserId, globalUserId); + + PushProto.PushToUser.Builder pushToUser = PushProto.PushToUser.newBuilder(); + pushToUser.setGlobalUserId(globalUserId); + + List userTokens = ImUserProfileDao.getInstance().getUserToken(memberUserId); + if (userTokens != null && userTokens.size() > 0) { + pushToUser.addAllUserTokens(userTokens); + requestBuilder.addPushToUser(pushToUser.build()); + } else { + logger.error("siteUserId={} with no userToken", memberUserId); + } + + } + } + + logger.debug("client={} siteUserId={} push to groupId={} siteFriend={} content={}", + command.getClientIp(), command.getSiteUserId(), command.getSiteGroupId(), + command.getSiteFriendId(), requestBuilder.toString()); + PushClient.asyncWrite(CommandConst.API_PUSH_NOTIFICATIONS, requestBuilder.build().toByteArray()); + + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, GroupPushHandler.class, e); + } + } + }); + + return true; + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/notice/handler/AbstractNoticeHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/notice/handler/AbstractNoticeHandler.java new file mode 100755 index 0000000..2f5c52c --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/notice/handler/AbstractNoticeHandler.java @@ -0,0 +1,22 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.notice.handler; + +import com.akaxin.common.executor.chain.handler.IHandler; + +public abstract class AbstractNoticeHandler implements IHandler { + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/notice/handler/NoticeHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/notice/handler/NoticeHandler.java new file mode 100755 index 0000000..17cc822 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/notice/handler/NoticeHandler.java @@ -0,0 +1,68 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.notice.handler; + +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.channel.ChannelWriter; +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.client.ImStcNoticeProto; +import com.akaxin.site.message.dao.SessionDeviceDao; + +/** + * 在线给客户端下发通知命令 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-03 19:02:12 + */ +public class NoticeHandler extends AbstractNoticeHandler { + private static final Logger logger = LoggerFactory.getLogger(NoticeHandler.class); + + public Boolean handle(Command command) { + try { + ImStcNoticeProto.ImStcNoticeRequest request = ImStcNoticeProto.ImStcNoticeRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String siteFriendId = command.getSiteFriendId(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + List deviceList = SessionDeviceDao.getInstance().getSessionDevices(siteFriendId); + for (String deviceId : deviceList) { + CommandResponse commandResponse = new CommandResponse().setVersion(CommandConst.PROTOCOL_VERSION) + .setAction(CommandConst.IM_NOTICE); + commandResponse.setParams(request.toByteArray()); + commandResponse.setErrCode2(ErrorCode2.SUCCESS); + ChannelWriter.writeByDeviceId(deviceId, commandResponse); + logger.debug("siteUserId={} apply friend to siteFriendId={} deviceId={}", siteUserId, siteFriendId, + deviceId); + } + + return true; + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + + return false; + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/notice/handler/NoticePushHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/notice/handler/NoticePushHandler.java new file mode 100755 index 0000000..e2cb1f0 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/notice/handler/NoticePushHandler.java @@ -0,0 +1,112 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.notice.handler; + +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.client.ImStcNoticeProto; +import com.akaxin.proto.client.ImStcNoticeProto.NoticeType; +import com.akaxin.proto.core.ConfigProto; +import com.akaxin.proto.core.PushProto; +import com.akaxin.proto.platform.ApiPushNotificationProto; +import com.akaxin.site.message.dao.ImUserFriendDao; +import com.akaxin.site.message.dao.ImUserProfileDao; +import com.akaxin.site.message.push.PushClient; +import com.akaxin.site.message.threads.MultiPushThreadExecutor; +import com.akaxin.site.message.utils.SiteConfigHelper; + +public class NoticePushHandler extends AbstractNoticeHandler { + private static final Logger logger = LoggerFactory.getLogger(NoticePushHandler.class); + + public Boolean handle(Command command) { + // 1.判断站点是否开启PUSH发送功能 + ConfigProto.PushClientStatus pcs = SiteConfigHelper.getPushClientStatus(); + if (ConfigProto.PushClientStatus.PUSH_NO == pcs) { + logger.warn("push to client error. cause: pushClientStatus={}", ConfigProto.PushClientStatus.PUSH_NO); + return true; + } + + // 多线程处理push + MultiPushThreadExecutor.getExecutor().execute(new Runnable() { + + @Override + public void run() { + try { + ImStcNoticeProto.ImStcNoticeRequest request = ImStcNoticeProto.ImStcNoticeRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId();// 发送者 + String siteFriendId = command.getSiteFriendId();// 接受者 这里是用户生成的站点ID + String globalUserId = ImUserProfileDao.getInstance().getGlobalUserId(siteFriendId); + ImStcNoticeProto.NoticeType noticeType = request.getType(); + + LogUtils.requestDebugLog(logger, command, request.toString()); + + // 一、用户对站点是否消息免打扰 + // 二、用户对该好友是否消息免打扰 + if (ImUserProfileDao.getInstance().isMute(siteFriendId) + || ImUserFriendDao.getInstance().isMesageMute(siteFriendId, siteUserId)) { + return; + } + + ApiPushNotificationProto.ApiPushNotificationRequest.Builder requestBuilder = ApiPushNotificationProto.ApiPushNotificationRequest + .newBuilder(); + PushProto.Notification.Builder notification = PushProto.Notification.newBuilder(); + notification.setUserId(globalUserId); + notification.setPushBadge(1); + String siteName = SiteConfigHelper.getConfig(ConfigProto.ConfigKey.SITE_NAME); + if (StringUtils.isNotBlank(siteName)) { + notification.setPushTitle(siteName); + } + String address = SiteConfigHelper.getConfig(ConfigProto.ConfigKey.SITE_ADDRESS); + String port = SiteConfigHelper.getConfig(ConfigProto.ConfigKey.SITE_PORT); + notification.setSiteServer(address + ":" + port); + notification.setPushFromId(siteUserId); + // 条件1:站点是否支持push展示消息内容 + if (ConfigProto.PushClientStatus.PUSH_DISPLAY_TEXT == pcs) { + if (NoticeType.APPLY_FRIEND == noticeType) { + notification.setPushAlert("你收到一条好友添加请求"); + } + } + List userTokens = ImUserProfileDao.getInstance().getUserToken(siteFriendId); + + if (userTokens != null && userTokens.size() > 0) { + notification.addAllUserTokens(userTokens); + requestBuilder.setNotification(notification.build()); + requestBuilder.setPushType(PushProto.PushType.PUSH_APPLY_FRIEND_NOTICE); + + PushClient.asyncWrite(CommandConst.API_PUSH_NOTIFICATION, requestBuilder.build().toByteArray()); + logger.debug("client={} siteUserId={} push to siteFriend={} content={}", command.getClientIp(), + command.getSiteUserId(), command.getSiteFriendId(), requestBuilder.toString()); + } else { + logger.warn("client={} siteUserId={} push to siteFriend={} error as userToken={}", + command.getClientIp(), command.getSiteUserId(), command.getSiteFriendId(), userTokens); + } + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, NoticePushHandler.class, e); + } + } + }); + return true; + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/platform/PlatformClient.java b/openzaly-message/src/main/java/com/akaxin/site/message/platform/PlatformClient.java new file mode 100755 index 0000000..d5f7dfc --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/platform/PlatformClient.java @@ -0,0 +1,109 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.platform; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.netty.IRedisCommandResponse; +import com.akaxin.common.netty.PlatformSSLClient; +import com.akaxin.proto.core.CoreProto; +import com.google.protobuf.ByteString; + +import io.netty.util.concurrent.Future; + +/** + * 访问平台客户端 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-20 21:45:25 + */ +public class PlatformClient { + private static final Logger logger = LoggerFactory.getLogger(PlatformClient.class); + private static final String AKAXIN_PLATFROM_HOST = "platform.akaxin.com"; + private static final int AKAXIN_PLATFROM_PORT = 8443; + + private PlatformClient() { + } + + // 同步发送,获取结果 + public static byte[] syncWrite(String action, byte[] byteData) { + try { + CoreProto.TransportPackageData.Builder packageDataBuilder = CoreProto.TransportPackageData.newBuilder(); + Map header = new HashMap(); + header.put(CoreProto.HeaderKey.SITE_SERVER_VERSION_VALUE, CommandConst.SITE_VERSION); + packageDataBuilder.putAllHeader(header); + packageDataBuilder.setData(ByteString.copyFrom(byteData)); + PlatformSSLClient nettyClient = new PlatformSSLClient(); + nettyClient.connect(AKAXIN_PLATFROM_HOST, AKAXIN_PLATFROM_PORT); + Future future = nettyClient.sendRedisCommand(new RedisCommand() + .add(CommandConst.PROTOCOL_VERSION).add(action).add(packageDataBuilder.build().toByteArray())); + IRedisCommandResponse response = future.get(5, TimeUnit.SECONDS); + nettyClient.disconnect(); + if (response != null && response.isSuccess()) { + return getResponseBytes(response.getRedisCommand()); + } + logger.debug("sync write data to platform with response={}", response); + } catch (Exception e) { + logger.error("sync send package error ", e); + } + return null; + } + + // 异步发送 + public static void asyncWrite(String action, byte[] byteData) { + try { + CoreProto.TransportPackageData.Builder packageDataBuilder = CoreProto.TransportPackageData.newBuilder(); + Map header = new HashMap(); + header.put(CoreProto.HeaderKey.SITE_SERVER_VERSION_VALUE, CommandConst.SITE_VERSION); + packageDataBuilder.putAllHeader(header); + packageDataBuilder.setData(ByteString.copyFrom(byteData)); + PlatformSSLClient nettyClient = new PlatformSSLClient(); + nettyClient.connect(AKAXIN_PLATFROM_HOST, AKAXIN_PLATFROM_PORT); + nettyClient.sendRedisCommand(new RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(action) + .add(packageDataBuilder.build().toByteArray())); + logger.debug("async write push to platform finish "); + nettyClient.disconnect(); + } catch (Exception e) { + logger.error("async send package to platform error", e); + } + } + + private static byte[] getResponseBytes(RedisCommand redisCommand) { + try { + String version = redisCommand.getParameterByIndex(0); + String action = redisCommand.getParameterByIndex(1); + byte[] params = redisCommand.getBytesParamByIndex(2); + logger.debug("get package bytes from platform {},{},{}", version, action, params); + if (CommandConst.ACTION_RES.equals(action)) { + CoreProto.TransportPackageData packageData = CoreProto.TransportPackageData.parseFrom(params); + CoreProto.ErrorInfo error = packageData.getErr(); + if ("success".equals(error.getCode())) { + return packageData.getData().toByteArray(); + } + } + } catch (Exception e) { + logger.error("get package bytes eror,redisCommand={}", redisCommand.toString()); + } + return null; + } +} \ No newline at end of file diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/push/PushClient.java b/openzaly-message/src/main/java/com/akaxin/site/message/push/PushClient.java new file mode 100755 index 0000000..a858659 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/push/PushClient.java @@ -0,0 +1,109 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.push; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.netty.IRedisCommandResponse; +import com.akaxin.common.netty.PlatformSSLClient; +import com.akaxin.proto.core.CoreProto; +import com.google.protobuf.ByteString; + +import io.netty.util.concurrent.Future; + +/** + * 通过平台发送push客户端 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-20 21:45:07 + */ +public class PushClient { + private static final Logger logger = LoggerFactory.getLogger(PushClient.class); + + private static final String AKAXIN_PUSH_ADDRESS = "push.akaxin.com"; + private static final int AKAXIN_PUSH_PORT = 443; + + private PushClient() { + } + + public static byte[] syncWrite(String action, byte[] byteData) { + try { + CoreProto.TransportPackageData.Builder packageDataBuilder = CoreProto.TransportPackageData.newBuilder(); + Map header = new HashMap(); + header.put(CoreProto.HeaderKey.SITE_SERVER_VERSION_VALUE, CommandConst.SITE_VERSION); + packageDataBuilder.putAllHeader(header); + packageDataBuilder.setData(ByteString.copyFrom(byteData)); + PlatformSSLClient nettyClient = new PlatformSSLClient(); + nettyClient.connect(AKAXIN_PUSH_ADDRESS, AKAXIN_PUSH_PORT); + Future future = nettyClient.sendRedisCommand(new RedisCommand() + .add(CommandConst.PROTOCOL_VERSION).add(action).add(packageDataBuilder.build().toByteArray())); + IRedisCommandResponse response = future.get(5, TimeUnit.SECONDS); + nettyClient.disconnect(); + if (response != null && response.isSuccess()) { + return getResponseBytes(response.getRedisCommand()); + } + logger.debug("write push to platform finish response={}", response); + } catch (Exception e) { + logger.error("sync send package error ", e); + } + return null; + } + + public static void asyncWrite(String action, byte[] byteData) { + try { + CoreProto.TransportPackageData.Builder packageDataBuilder = CoreProto.TransportPackageData.newBuilder(); + Map header = new HashMap(); + header.put(CoreProto.HeaderKey.SITE_SERVER_VERSION_VALUE, CommandConst.SITE_VERSION); + packageDataBuilder.putAllHeader(header); + packageDataBuilder.setData(ByteString.copyFrom(byteData)); + PlatformSSLClient nettyClient = new PlatformSSLClient(); + nettyClient.connect(AKAXIN_PUSH_ADDRESS, AKAXIN_PUSH_PORT); + Future future = nettyClient.sendRedisCommand(new RedisCommand() + .add(CommandConst.PROTOCOL_VERSION).add(action).add(packageDataBuilder.build().toByteArray())); + IRedisCommandResponse response = future.get(5, TimeUnit.SECONDS); + logger.debug("write push to platform finish response={}", response); + nettyClient.disconnect(); + } catch (Exception e) { + logger.error("async send package to platform error", e); + } + } + + private static byte[] getResponseBytes(RedisCommand redisCommand) { + try { + String version = redisCommand.getParameterByIndex(0); + String action = redisCommand.getParameterByIndex(1); + byte[] params = redisCommand.getBytesParamByIndex(2); + logger.debug("get package bytes from platform {},{},{}", version, action, params); + if (CommandConst.ACTION_RES.equals(action)) { + CoreProto.TransportPackageData packageData = CoreProto.TransportPackageData.parseFrom(params); + CoreProto.ErrorInfo error = packageData.getErr(); + if ("success".equals(error.getCode())) { + return packageData.getData().toByteArray(); + } + } + } catch (Exception e) { + logger.error("get package bytes eror,redisCommand={}", redisCommand.toString()); + } + return null; + } +} \ No newline at end of file diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/service/ImMessageService.java b/openzaly-message/src/main/java/com/akaxin/site/message/service/ImMessageService.java new file mode 100755 index 0000000..18198b5 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/service/ImMessageService.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.service; + +import com.akaxin.common.command.Command; +import com.akaxin.site.message.api.IMessageService; + +/** + * 负责接受所有从connector下来的业务请求,请负责分发 + * + * @author Sam + * + */ +public class ImMessageService implements IMessageService { + + public boolean execute(Command command) { + return MessageDispatcher.dispatch(command); + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/service/MessageDispatcher.java b/openzaly-message/src/main/java/com/akaxin/site/message/service/MessageDispatcher.java new file mode 100755 index 0000000..4c061c0 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/service/MessageDispatcher.java @@ -0,0 +1,91 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.service; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.constant.RequestAction; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.message.executor.MessageExecutor; + +public class MessageDispatcher { + private static final Logger logger = LoggerFactory.getLogger(MessageDispatcher.class); + + public static boolean dispatch(Command command) { + String action = command.getAction(); + LogUtils.requestDebugLog(logger, command, ""); + + if (RequestAction.IM_CTS_MESSAGE.getName().equalsIgnoreCase(action)) { + try { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + + switch (request.getType().getNumber()) { + case CoreProto.MsgType.NOTICE_VALUE: + break; + case CoreProto.MsgType.TEXT_VALUE: + case CoreProto.MsgType.SECRET_TEXT_VALUE: + case CoreProto.MsgType.IMAGE_VALUE: + case CoreProto.MsgType.SECRET_IMAGE_VALUE: + case CoreProto.MsgType.VOICE_VALUE: + case CoreProto.MsgType.SECRET_VOICE_VALUE: + case CoreProto.MsgType.U2_MAP_VALUE: + case CoreProto.MsgType.U2_SECRET_MAP_VALUE: + case CoreProto.MsgType.U2_NOTICE_VALUE: + case CoreProto.MsgType.U2_WEB_VALUE: + case CoreProto.MsgType.U2_WEB_NOTICE_VALUE: + return MessageExecutor.getExecutor().execute("im.cts.message.u2", command); + case CoreProto.MsgType.GROUP_TEXT_VALUE: + case CoreProto.MsgType.GROUP_SECRET_TEXT_VALUE: + case CoreProto.MsgType.GROUP_IMAGE_VALUE: + case CoreProto.MsgType.GROUP_SECRET_IMAGE_VALUE: + case CoreProto.MsgType.GROUP_VOICE_VALUE: + case CoreProto.MsgType.GROUP_SECRET_VOICE_VALUE: + case CoreProto.MsgType.GROUP_MAP_VALUE: + case CoreProto.MsgType.GROUP_SECRET_MAP_VALUE: + case CoreProto.MsgType.GROUP_NOTICE_VALUE: + case CoreProto.MsgType.GROUP_WEB_VALUE: + case CoreProto.MsgType.GROUP_WEB_NOTICE_VALUE: + return MessageExecutor.getExecutor().execute("im.cts.message.group", command); + } + } catch (Exception e) { + logger.error(StringHelper.format("client={} siteUserId={} action={} im message dispatch error", + command.getClientIp(), command.getSiteUserId(), command.getAction()), e); + } + } else if (RequestAction.IM_SYNC_MESSAGE.getName().equalsIgnoreCase(action)) { + return MessageExecutor.getExecutor().execute(RequestAction.IM_SYNC_MESSAGE.getName(), command); +// return true; + } else if (RequestAction.IM_SYNC_FINISH.getName().equalsIgnoreCase(action)) { + return MessageExecutor.getExecutor().execute(RequestAction.IM_SYNC_FINISH.getName(), command); +// return true; + } else if (RequestAction.IM_SYNC_MSGSTATUS.getName().equalsIgnoreCase(action)) { + return MessageExecutor.getExecutor().execute(RequestAction.IM_SYNC_MSGSTATUS.getName(), command); +// return true; + } else if (RequestAction.IM_STC_NOTICE.getName().equalsIgnoreCase(action)) { + return MessageExecutor.getExecutor().execute(RequestAction.IM_STC_NOTICE.getName(), command); +// return true; + } + + logger.error("client={} siteUserId={} action={} im message with error command={}", command.getClientIp(), + command.getSiteUserId(), command.getAction(), command.toString()); + return false; + } +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/sync/handler/AbstractSyncHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/sync/handler/AbstractSyncHandler.java new file mode 100755 index 0000000..1c6de72 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/sync/handler/AbstractSyncHandler.java @@ -0,0 +1,82 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.sync.handler; + +import org.apache.commons.lang3.StringUtils; + +import com.akaxin.common.channel.ChannelWriter; +import com.akaxin.common.command.Command; +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.executor.chain.handler.IHandler; +import com.akaxin.proto.client.ImStcMessageProto; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.CoreProto.MsgType; + +public abstract class AbstractSyncHandler implements IHandler { + // do something fo all handlers + + /** + *
+	 * 	status=1:发送成功
+	 * 	status=0:默认发送失败状态
+	 * 	status=-1:非好友,不能发送
+	 * 	status=-2:非群成员,发送失败
+	 * 
+ */ + protected void msgStatusResponse(Command command, String msgId, long msgTime, boolean success) { + if (command == null || StringUtils.isEmpty(command.getDeviceId())) { + return; + } + int statusValue = success ? 1 : 0; + + CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) + .setMsgStatus(statusValue).build(); + + ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.MSG_STATUS).setStatus(status).build(); + + ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() + .addList(statusMsg).build(); + + CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() + .setData(request.toByteString()).build(); + + ChannelWriter.writeByDeviceId(command.getDeviceId(), new RedisCommand().add(CommandConst.PROTOCOL_VERSION) + .add(CommandConst.IM_MSG_TOCLIENT).add(data.toByteArray())); + + } + + protected void msgStatusResponse(Command command, String msgId, long msgTime, int statusValue) { + if (command == null || StringUtils.isEmpty(command.getDeviceId())) { + return; + } + CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgStatus(statusValue) + .setMsgServerTime(msgTime).build(); + + ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.MSG_STATUS).setStatus(status).build(); + + ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() + .addList(statusMsg).build(); + + CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() + .setData(request.toByteString()).build(); + + ChannelWriter.writeByDeviceId(command.getDeviceId(), new RedisCommand().add(CommandConst.PROTOCOL_VERSION) + .add(CommandConst.IM_MSG_TOCLIENT).add(data.toByteArray())); + } +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/sync/handler/SyncFinishHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/sync/handler/SyncFinishHandler.java new file mode 100755 index 0000000..305eb94 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/sync/handler/SyncFinishHandler.java @@ -0,0 +1,112 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.sync.handler; + +import java.util.Map; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.channel.ChannelWriter; +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.client.ImStcPsnProto; +import com.akaxin.proto.site.ImSyncFinishProto; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.service.MessageDaoService; + +/** + * 客户端同步消息完成结束标志 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-21 21:23:21 + */ +public class SyncFinishHandler extends AbstractSyncHandler { + private static Logger logger = LoggerFactory.getLogger(SyncFinishHandler.class); + private IMessageDao syncDao = new MessageDaoService(); + + public Boolean handle(Command command) { + try { + ImSyncFinishProto.ImSyncFinishRequest request = ImSyncFinishProto.ImSyncFinishRequest + .parseFrom(command.getParams()); + String deviceId = command.getDeviceId(); + String siteUserId = command.getSiteUserId(); + long u2Pointer = request.getU2Pointer(); + Map groupPointer = request.getGroupsPointerMap(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + boolean goOnPSN = false; + + long maxU2Pointer = syncDao.queryMaxU2Pointer(siteUserId);// 查从库 + if (u2Pointer < maxU2Pointer) { + u2Pointer = maxU2Pointer; + } + // 如果客户端上传的游标大于数据库里个人消息id的最大值,游标错误,使用消息最大id矫正 + long maxU2MessageId = syncDao.queryMaxU2MessageId(siteUserId);// 查主库 + if (u2Pointer > maxU2MessageId) { + u2Pointer = maxU2MessageId; + } else if (u2Pointer < maxU2MessageId) { + goOnPSN = true; + } + + syncDao.updateU2Pointer(siteUserId, deviceId, u2Pointer); + + // finish to group + for (Map.Entry gidEntry : groupPointer.entrySet()) { + String siteGroupId = gidEntry.getKey(); + long groupFinishPointer = gidEntry.getValue(); + + long maxUserGroupPointer = syncDao.queryMaxUserGroupPointer(siteGroupId, siteUserId);// 从库 + if (groupFinishPointer < maxUserGroupPointer) { + groupFinishPointer = maxUserGroupPointer; + } + + // 群游标结束值 > 用户群组的最大消息id,说明此值错误,使用最大消息id矫正 + long maxGroupMsgPointer = syncDao.queryMaxGroupPointer(siteGroupId);// 查主库 + if (groupFinishPointer > maxGroupMsgPointer) { + groupFinishPointer = maxGroupMsgPointer; + } else if (groupFinishPointer < maxGroupMsgPointer) { +// goOnPSN = true; + } + + syncDao.updateGroupPointer(siteGroupId, siteUserId, deviceId, groupFinishPointer); + } + + if (goOnPSN) { + logger.debug("go on psn dbMaxPointer={} request={}", maxU2MessageId, request.toString()); + writePsn(deviceId); + } + + return true;// 执行成功 + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, e); + } + return false; + } + + private void writePsn(String deviceId) { + CommandResponse commandResponse = new CommandResponse().setVersion(CommandConst.PROTOCOL_VERSION) + .setAction(CommandConst.IM_STC_PSN); + ImStcPsnProto.ImStcPsnRequest pshRequest = ImStcPsnProto.ImStcPsnRequest.newBuilder().build(); + commandResponse.setParams(pshRequest.toByteArray()); + commandResponse.setErrCode2(ErrorCode2.SUCCESS); + ChannelWriter.writeByDeviceId(deviceId, commandResponse); + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/sync/handler/SyncGroupMessageHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/sync/handler/SyncGroupMessageHandler.java new file mode 100755 index 0000000..988b5ae --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/sync/handler/SyncGroupMessageHandler.java @@ -0,0 +1,221 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.sync.handler; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.channel.ChannelSession; +import com.akaxin.common.command.Command; +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.GsonUtils; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.client.ImStcMessageProto; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.CoreProto.MsgType; +import com.akaxin.proto.site.ImSyncMessageProto; +import com.akaxin.site.message.bean.WebBean; +import com.akaxin.site.message.utils.NumUtils; +import com.akaxin.site.storage.api.IGroupDao; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.GroupMessageBean; +import com.akaxin.site.storage.service.GroupDaoService; +import com.akaxin.site.storage.service.MessageDaoService; +import com.google.protobuf.ByteString; + +import io.netty.channel.Channel; + +/** + * 同步群组消息 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-24 20:47:59 + */ +public class SyncGroupMessageHandler extends AbstractSyncHandler { + private static final Logger logger = LoggerFactory.getLogger(SyncGroupMessageHandler.class); + private static final int SYNC_MAX_MESSAGE_COUNT = 100; + private IGroupDao userGroupDao = new GroupDaoService(); + private IMessageDao syncDao = new MessageDaoService(); + + public Boolean handle(Command command) { + ChannelSession channelSession = command.getChannelSession(); + try { + ImSyncMessageProto.ImSyncMessageRequest syncRequest = ImSyncMessageProto.ImSyncMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String deviceId = command.getDeviceId(); + Map groupPointerMap = syncRequest.getGroupsPointerMap(); + + LogUtils.requestDebugLog(logger, command, syncRequest.toString()); + + int syncTotalCount = 0; + // 查找个人有多少群 + List userGroups = userGroupDao.getUserGroupsId(siteUserId); + if (userGroups != null) { + for (String groupId : userGroups) { + long clientGroupPointer = 0; + if (groupPointerMap != null && groupPointerMap.get(groupId) != null) { + clientGroupPointer = groupPointerMap.get(groupId); + } + // 校验群消息游标 + long maxGroupMessagePointer = syncDao.queryGroupMessagePointer(groupId, siteUserId, deviceId); + long startPointer = NumUtils.getMax(maxGroupMessagePointer, clientGroupPointer); + + while (true) { + List msgList = syncDao.queryGroupMessage(groupId, siteUserId, deviceId, + startPointer, SYNC_MAX_MESSAGE_COUNT); + + if (msgList != null && msgList.size() > 0) { + startPointer = groupMessageToClient(channelSession.getChannel(), siteUserId, msgList); + syncTotalCount += msgList.size(); + } + + if (msgList == null || msgList.size() < SYNC_MAX_MESSAGE_COUNT) { + break; + } + } + + } + } + + logger.debug("client={} siteUserId={} deviceId={} sync group-msg count={}", command.getClientIp(), + siteUserId, deviceId, syncTotalCount); + msgFinishToClient(channelSession.getChannel(), siteUserId, deviceId); + } catch (Exception e) { + logger.error("sync group message error.command=" + command, e); + } + + return true; + } + + private long groupMessageToClient(Channel channel, String userId, List groupMessageList) { + long nextPointer = 0; + ImStcMessageProto.ImStcMessageRequest.Builder requestBuilder = ImStcMessageProto.ImStcMessageRequest + .newBuilder(); + for (GroupMessageBean bean : groupMessageList) { + try { + nextPointer = NumUtils.getMax(nextPointer, bean.getId()); + + switch (bean.getMsgType()) { + case CoreProto.MsgType.GROUP_TEXT_VALUE: + CoreProto.GroupText groupText = CoreProto.GroupText.newBuilder().setMsgId(bean.getMsgId()) + .setSiteUserId(bean.getSendUserId()).setSiteGroupId(bean.getSiteGroupId()) + .setText(ByteString.copyFromUtf8(bean.getContent())).setTime(bean.getMsgTime()).build(); + ImStcMessageProto.MsgWithPointer gmsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.GROUP_TEXT).setPointer(bean.getId()).setGroupText(groupText).build(); + requestBuilder.addList(gmsg); + break; + + case CoreProto.MsgType.GROUP_SECRET_TEXT_VALUE: + // do nothing + break; + case CoreProto.MsgType.GROUP_IMAGE_VALUE: + CoreProto.GroupImage groupImage = CoreProto.GroupImage.newBuilder().setMsgId(bean.getMsgId()) + .setSiteUserId(bean.getSendUserId()).setSiteGroupId(bean.getSiteGroupId()) + .setImageId(bean.getContent()).setTime(bean.getMsgTime()).build(); + ImStcMessageProto.MsgWithPointer groupImageMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.GROUP_IMAGE).setPointer(bean.getId()).setGroupImage(groupImage).build(); + requestBuilder.addList(groupImageMsg); + break; + case CoreProto.MsgType.GROUP_SECRET_IMAGE_VALUE: + // do nothing + break; + case CoreProto.MsgType.GROUP_VOICE_VALUE: + CoreProto.GroupVoice groupVoice = CoreProto.GroupVoice.newBuilder().setMsgId(bean.getMsgId()) + .setSiteUserId(bean.getSendUserId()).setSiteGroupId(bean.getSiteGroupId()) + .setVoiceId(bean.getContent()).setTime(bean.getMsgTime()).build(); + ImStcMessageProto.MsgWithPointer groupVoiceMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.GROUP_VOICE).setPointer(bean.getId()).setGroupVoice(groupVoice).build(); + requestBuilder.addList(groupVoiceMsg); + break; + + case CoreProto.MsgType.GROUP_SECRET_VOICE_VALUE: + // do nothing + break; + + case CoreProto.MsgType.GROUP_NOTICE_VALUE: + CoreProto.GroupMsgNotice groupNotice = CoreProto.GroupMsgNotice.newBuilder() + .setMsgId(bean.getMsgId()).setSiteUserId(bean.getSendUserId()) + .setSiteGroupId(bean.getSiteGroupId()).setText(ByteString.copyFromUtf8((bean.getContent()))) + .setTime(bean.getMsgTime()).build(); + ImStcMessageProto.MsgWithPointer groupMsgNotice = ImStcMessageProto.MsgWithPointer.newBuilder() + .setPointer(bean.getId()).setType(MsgType.GROUP_NOTICE).setGroupMsgNotice(groupNotice) + .build(); + requestBuilder.addList(groupMsgNotice); + break; + case CoreProto.MsgType.GROUP_WEB_VALUE: + WebBean webBean = GsonUtils.fromJson(bean.getContent(), WebBean.class); + CoreProto.GroupWeb.Builder groupWeb = CoreProto.GroupWeb.newBuilder(); + groupWeb.setMsgId(bean.getMsgId()).setSiteUserId(bean.getSendUserId()) + .setSiteGroupId(bean.getSiteGroupId()).setWebCode(webBean.getWebCode()) + .setHeight(webBean.getHeight()).setWidth(webBean.getWidth()).setTime(bean.getMsgTime()); + if (StringUtils.isNotEmpty(webBean.getHrefUrl())) { + groupWeb.setHrefUrl(webBean.getHrefUrl()); + } + ImStcMessageProto.MsgWithPointer groupWebMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setPointer(bean.getId()).setType(MsgType.GROUP_WEB).setGroupWeb(groupWeb).build(); + requestBuilder.addList(groupWebMsg); + break; + case CoreProto.MsgType.GROUP_WEB_NOTICE_VALUE: + WebBean webNoticeBean = GsonUtils.fromJson(bean.getContent(), WebBean.class); + CoreProto.GroupWebNotice.Builder groupWebNotice = CoreProto.GroupWebNotice.newBuilder(); + groupWebNotice.setMsgId(bean.getMsgId()).setSiteUserId(bean.getSendUserId()) + .setSiteGroupId(bean.getSiteGroupId()).setWebCode(webNoticeBean.getWebCode()) + .setHeight(webNoticeBean.getHeight()).setTime(bean.getMsgTime()); + if (StringUtils.isNotEmpty(webNoticeBean.getHrefUrl())) { + groupWebNotice.setHrefUrl(webNoticeBean.getHrefUrl()); + } + ImStcMessageProto.MsgWithPointer groupWebNoticeMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setPointer(bean.getId()).setType(MsgType.GROUP_WEB_NOTICE) + .setGroupWebNotice(groupWebNotice).build(); + requestBuilder.addList(groupWebNoticeMsg); + break; + default: + break; + } + } catch (Exception e) { + logger.error(StringHelper.format("sync group message error bean={}", bean), e); + } + } + + Map header = new HashMap(); + header.put(CoreProto.HeaderKey.SITE_SERVER_VERSION_VALUE, CommandConst.SITE_VERSION); + ImStcMessageProto.ImStcMessageRequest request = requestBuilder.build(); + CoreProto.TransportPackageData datas = CoreProto.TransportPackageData.newBuilder().putAllHeader(header) + .setData(ByteString.copyFrom(request.toByteArray())).build(); + + channel.writeAndFlush(new RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) + .add(datas.toByteArray())); + + return nextPointer; + } + + private void msgFinishToClient(Channel channel, String siteUserId, String deviceId) { + Map header = new HashMap(); + header.put(CoreProto.HeaderKey.SITE_SERVER_VERSION_VALUE, CommandConst.SITE_VERSION); + CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder().putAllHeader(header).build(); + channel.writeAndFlush(new RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_FINISH) + .add(data.toByteArray())); + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/sync/handler/SyncMsgStatusHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/sync/handler/SyncMsgStatusHandler.java new file mode 100755 index 0000000..31ce9f8 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/sync/handler/SyncMsgStatusHandler.java @@ -0,0 +1,82 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.sync.handler; + +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.site.ImSyncMsgStatusProto; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.GroupMessageBean; +import com.akaxin.site.storage.bean.U2MessageBean; +import com.akaxin.site.storage.service.MessageDaoService; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-05-26 20:30:30 + */ +public class SyncMsgStatusHandler extends AbstractSyncHandler { + private static Logger logger = LoggerFactory.getLogger(SyncMsgStatusHandler.class); + private IMessageDao messageDao = new MessageDaoService(); + + public Boolean handle(Command command) { + try { + ImSyncMsgStatusProto.ImSyncMsgStatusRequest request = ImSyncMsgStatusProto.ImSyncMsgStatusRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + List u2MsgIds = request.getU2MsgIdList(); + List groupMsgIds = request.getGroupMsgIdList(); + LogUtils.requestDebugLog(logger, command, request.toString()); + + if (u2MsgIds != null && u2MsgIds.size() > 0) { + List u2msgList = messageDao.queryU2MessageByMsgId(u2MsgIds); + if (u2msgList != null) { + for (U2MessageBean bean : u2msgList) { + if (siteUserId.equals(bean.getSendUserId())) { + logger.info("im.sync.msgStatus siteUserId={} sendUserId={} deviceId={} msgId={}", + siteUserId, bean.getSendUserId(), command.getDeviceId(), bean.getMsgId()); + msgStatusResponse(command, bean.getMsgId(), bean.getMsgTime(), true); + } + } + } + } + + if (groupMsgIds != null && groupMsgIds.size() > 0) { + List gmsgList = messageDao.queryGroupMesageByMsgId(groupMsgIds); + if (gmsgList != null) { + for (GroupMessageBean bean : gmsgList) { + if (siteUserId.equals(bean.getSendUserId())) { + logger.info("im.sync.msgStatus siteUserId={} sendUserId={} deviceId={} msgId={}", + siteUserId, bean.getSendUserId(), command.getDeviceId(), bean.getMsgId()); + msgStatusResponse(command, bean.getMsgId(), bean.getMsgTime(), true); + } + } + } + } + + return true; + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, e); + } + return false; + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/sync/handler/SyncNoticeHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/sync/handler/SyncNoticeHandler.java new file mode 100755 index 0000000..e76cd7d --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/sync/handler/SyncNoticeHandler.java @@ -0,0 +1,199 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.sync.handler; + +import java.util.Base64; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.channel.ChannelSession; +import com.akaxin.common.command.Command; +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.client.ImStcMessageProto; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.CoreProto.MsgType; +import com.akaxin.proto.site.ImSyncMessageProto; +import com.akaxin.site.message.utils.NumUtils; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.U2MessageBean; +import com.akaxin.site.storage.service.MessageDaoService; +import com.google.protobuf.ByteString; + +import io.netty.channel.Channel; + +/** + * 同步下发给用户客户端的命令通知 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-03 18:25:36 + */ +public class SyncNoticeHandler extends AbstractSyncHandler { + private static final Logger logger = LoggerFactory.getLogger(SyncNoticeHandler.class); + private static final int SYNC_MAX_MESSAGE_COUNT = 100; + private IMessageDao syncDao = new MessageDaoService(); + + public Boolean handle(Command command) { + ChannelSession channelSession = command.getChannelSession(); + try { + ImSyncMessageProto.ImSyncMessageRequest syncRequest = ImSyncMessageProto.ImSyncMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String deviceId = command.getDeviceId(); + LogUtils.requestDebugLog(logger, command, syncRequest.toString()); + + // long clientU2Pointer = syncRequest.getU2Pointer(); + // long u2Pointer = syncDao.queryU2Pointer(siteUserId, deviceId); + // long startPointer = NumUtils.getMax(clientU2Pointer, u2Pointer); + // int syncTotalCount = 0; + // + // while (true) { + // // 批量一次查询100条U2消息 + // List u2MessageList = syncDao.queryU2Message(siteUserId, + // deviceId, startPointer, + // SYNC_MAX_MESSAGE_COUNT); + // // 有二人消息才会发送给客户端,同时返回最大的游标 + // if (u2MessageList != null && u2MessageList.size() > 0) { + // startPointer = u2MessageToClient(channelSession.getChannel(), u2MessageList); + // syncTotalCount += u2MessageList.size(); + // } + // // 判断跳出循环的条件 + // if (u2MessageList == null || u2MessageList.size() < SYNC_MAX_MESSAGE_COUNT) { + // break; + // } + // } + // + // logger.debug("client={} siteUserId={} deviceId={} sync u2-msg from pointer={} + // count={}.", + // command.getClientIp(), siteUserId, deviceId, startPointer, syncTotalCount); + } catch (Exception e) { + logger.error("sync u2 message error", e); + } + + return true; + } + + private long u2MessageToClient(Channel channel, List u2MessageList) { + long nextPointer = 0; + ImStcMessageProto.ImStcMessageRequest.Builder requestBuilder = ImStcMessageProto.ImStcMessageRequest + .newBuilder(); + + for (U2MessageBean bean : u2MessageList) { + try { + nextPointer = NumUtils.getMax(nextPointer, bean.getId()); + + switch (bean.getMsgType()) { + case CoreProto.MsgType.TEXT_VALUE: + CoreProto.MsgText MsgText = CoreProto.MsgText.newBuilder().setMsgId(bean.getMsgId()) + .setSiteUserId(bean.getSendUserId()).setSiteFriendId(bean.getSiteUserId()) + .setText(ByteString.copyFromUtf8(bean.getContent())).setTime(bean.getMsgTime()).build(); + ImStcMessageProto.MsgWithPointer textMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.TEXT).setPointer(bean.getId()).setText(MsgText).build(); + // logger.info("[Syncing U2] text message OK. bean={}", u2Bean); + requestBuilder.addList(textMsg); + break; + case CoreProto.MsgType.SECRET_TEXT_VALUE: + byte[] secretTexgt = Base64.getDecoder().decode(bean.getContent()); + CoreProto.MsgSecretText secretText = CoreProto.MsgSecretText.newBuilder().setMsgId(bean.getMsgId()) + .setSiteUserId(bean.getSendUserId()).setSiteFriendId(bean.getSiteUserId()) + .setText(ByteString.copyFrom(secretTexgt)).setToDeviceId(String.valueOf(bean.getDeviceId())) + .setBase64TsKey(bean.getTsKey()).setTime(bean.getMsgTime()).build(); + ImStcMessageProto.MsgWithPointer secretTextMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.SECRET_TEXT).setPointer(bean.getId()).setSecretText(secretText).build(); + // logger.info("[Syncing U2] secret text message OK. bean={}", + // u2Bean); + requestBuilder.addList(secretTextMsg); + break; + case CoreProto.MsgType.IMAGE_VALUE: + CoreProto.MsgImage msgImage = CoreProto.MsgImage.newBuilder().setImageId(bean.getContent()) + .setMsgId(bean.getMsgId()).setSiteUserId(bean.getSendUserId()) + .setSiteFriendId(bean.getSiteUserId()).setTime(bean.getMsgTime()) + .setImageId(bean.getContent()).build(); + ImStcMessageProto.MsgWithPointer imageMsgWithPointer = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.IMAGE).setPointer(bean.getId()).setImage(msgImage).build(); + // logger.info("[Syncing U2] image message OK. bean={}", u2Bean); + requestBuilder.addList(imageMsgWithPointer); + break; + case CoreProto.MsgType.SECRET_IMAGE_VALUE: + CoreProto.MsgSecretImage secretImage = CoreProto.MsgSecretImage.newBuilder() + .setMsgId(bean.getMsgId()).setSiteUserId(bean.getSendUserId()) + .setSiteFriendId(bean.getSiteUserId()).setImageId(bean.getContent()) + .setToDeviceId(String.valueOf(bean.getDeviceId())).setBase64TsKey(bean.getTsKey()) + .setTime(bean.getMsgTime()).build(); + ImStcMessageProto.MsgWithPointer secretImageMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.SECRET_IMAGE).setPointer(bean.getId()).setSecretImage(secretImage).build(); + // logger.info("[Syncing U2] secret image message OK. bean={}", + // u2Bean); + requestBuilder.addList(secretImageMsg); + break; + case CoreProto.MsgType.VOICE_VALUE: + CoreProto.MsgVoice voice = CoreProto.MsgVoice.newBuilder().setMsgId(bean.getMsgId()) + .setSiteUserId(bean.getSendUserId()).setSiteFriendId(bean.getSiteUserId()) + .setVoiceId(bean.getContent()).setTime(bean.getMsgTime()).build(); + ImStcMessageProto.MsgWithPointer voiceMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.VOICE).setPointer(bean.getId()).setVoice(voice).build(); + // logger.info("[Syncing U2] voice message OK. bean={0}", u2Bean); + requestBuilder.addList(voiceMsg); + break; + case CoreProto.MsgType.SECRET_VOICE_VALUE: + CoreProto.MsgSecretVoice secretVoice = CoreProto.MsgSecretVoice.newBuilder() + .setMsgId(bean.getMsgId()).setSiteUserId(bean.getSendUserId()) + .setSiteFriendId(bean.getSiteUserId()).setVoiceId(bean.getContent()) + .setToDeviceId(String.valueOf(bean.getDeviceId())).setBase64TsKey(bean.getTsKey()) + .setTime(bean.getMsgTime()).build(); + ImStcMessageProto.MsgWithPointer secretVoiceMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.SECRET_VOICE).setPointer(bean.getId()).setSecretVoice(secretVoice).build(); + // logger.info("[Syncing U2] secret voice message OK. bean={}", + // u2Bean); + requestBuilder.addList(secretVoiceMsg); + break; + case CoreProto.MsgType.U2_NOTICE_VALUE: + CoreProto.U2MsgNotice u2Notice = CoreProto.U2MsgNotice.newBuilder().setMsgId(bean.getMsgId()) + .setSiteUserId(bean.getSendUserId()).setSiteFriendId(bean.getSiteUserId()) + .setText(ByteString.copyFromUtf8(bean.getContent())).setTime(bean.getMsgTime()).build(); + ImStcMessageProto.MsgWithPointer u2NoticeMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setPointer(bean.getId()).setType(MsgType.U2_NOTICE).setU2MsgNotice(u2Notice).build(); + requestBuilder.addList(u2NoticeMsg); + break; + default: + logger.error("Message type error! when sync to client bean={}", bean); + break; + + } + } catch (Exception e) { + logger.error(StringHelper.format("sync u2 message error bean={}", bean), e); + } + + } + + Map header = new HashMap(); + header.put(CoreProto.HeaderKey.SITE_SERVER_VERSION_VALUE, CommandConst.SITE_VERSION); + ImStcMessageProto.ImStcMessageRequest request = requestBuilder.build(); + CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder().putAllHeader(header) + .setData(ByteString.copyFrom(request.toByteArray())).build(); + + channel.writeAndFlush(new RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) + .add(data.toByteArray())); + return nextPointer; + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/sync/handler/SyncU2MessageHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/sync/handler/SyncU2MessageHandler.java new file mode 100755 index 0000000..e5243f4 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/sync/handler/SyncU2MessageHandler.java @@ -0,0 +1,217 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.sync.handler; + +import java.util.Base64; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.channel.ChannelSession; +import com.akaxin.common.command.Command; +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.GsonUtils; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.client.ImStcMessageProto; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.CoreProto.MsgType; +import com.akaxin.proto.site.ImSyncMessageProto; +import com.akaxin.site.message.bean.WebBean; +import com.akaxin.site.message.utils.NumUtils; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.U2MessageBean; +import com.akaxin.site.storage.service.MessageDaoService; +import com.google.protobuf.ByteString; + +import io.netty.channel.Channel; + +/** + * 同步二人消息 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-02-08 17:08:47 + */ +public class SyncU2MessageHandler extends AbstractSyncHandler { + private static final Logger logger = LoggerFactory.getLogger(SyncU2MessageHandler.class); + private IMessageDao syncDao = new MessageDaoService(); + private static final int SYNC_MAX_MESSAGE_COUNT = 100; + + public Boolean handle(Command command) { + ChannelSession channelSession = command.getChannelSession(); + try { + ImSyncMessageProto.ImSyncMessageRequest syncRequest = ImSyncMessageProto.ImSyncMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String deviceId = command.getDeviceId(); + LogUtils.requestDebugLog(logger, command, syncRequest.toString()); + + long clientU2Pointer = syncRequest.getU2Pointer(); + long u2Pointer = syncDao.queryU2Pointer(siteUserId, deviceId); + long startPointer = NumUtils.getMax(clientU2Pointer, u2Pointer); + int syncTotalCount = 0; + while (true) { + // 批量一次查询100条U2消息 + List u2MessageList = syncDao.queryU2Message(siteUserId, deviceId, startPointer, + SYNC_MAX_MESSAGE_COUNT); + // 有二人消息才会发送给客户端,同时返回最大的游标 + if (u2MessageList != null && u2MessageList.size() > 0) { + startPointer = u2MessageToClient(channelSession.getChannel(), u2MessageList); + syncTotalCount += u2MessageList.size(); + } + // 判断跳出循环的条件 + if (u2MessageList == null || u2MessageList.size() < SYNC_MAX_MESSAGE_COUNT) { + break; + } + } + + logger.debug("client={} siteUserId={} deviceId={} sync u2-msg from pointer={} count={}.", + command.getClientIp(), siteUserId, deviceId, startPointer, syncTotalCount); + } catch (Exception e) { + logger.error("sync u2 message error", e); + } + + return true; + } + + private long u2MessageToClient(Channel channel, List u2MessageList) { + long nextPointer = 0; + ImStcMessageProto.ImStcMessageRequest.Builder requestBuilder = ImStcMessageProto.ImStcMessageRequest + .newBuilder(); + + for (U2MessageBean bean : u2MessageList) { + try { + nextPointer = NumUtils.getMax(nextPointer, bean.getId()); + + switch (bean.getMsgType()) { + case CoreProto.MsgType.TEXT_VALUE: + CoreProto.MsgText MsgText = CoreProto.MsgText.newBuilder().setMsgId(bean.getMsgId()) + .setSiteUserId(bean.getSendUserId()).setSiteFriendId(bean.getReceiveUserId()) + .setText(ByteString.copyFromUtf8(bean.getContent())).setTime(bean.getMsgTime()).build(); + ImStcMessageProto.MsgWithPointer textMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.TEXT).setPointer(bean.getId()).setText(MsgText).build(); + requestBuilder.addList(textMsg); + break; + case CoreProto.MsgType.SECRET_TEXT_VALUE: + byte[] secretTexgt = Base64.getDecoder().decode(bean.getContent()); + CoreProto.MsgSecretText secretText = CoreProto.MsgSecretText.newBuilder().setMsgId(bean.getMsgId()) + .setSiteUserId(bean.getSendUserId()).setSiteFriendId(bean.getReceiveUserId()) + .setText(ByteString.copyFrom(secretTexgt)).setToDeviceId(String.valueOf(bean.getDeviceId())) + .setBase64TsKey(bean.getTsKey()).setTime(bean.getMsgTime()).build(); + ImStcMessageProto.MsgWithPointer secretTextMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.SECRET_TEXT).setPointer(bean.getId()).setSecretText(secretText).build(); + requestBuilder.addList(secretTextMsg); + break; + case CoreProto.MsgType.IMAGE_VALUE: + CoreProto.MsgImage msgImage = CoreProto.MsgImage.newBuilder().setImageId(bean.getContent()) + .setMsgId(bean.getMsgId()).setSiteUserId(bean.getSendUserId()) + .setSiteFriendId(bean.getReceiveUserId()).setTime(bean.getMsgTime()) + .setImageId(bean.getContent()).build(); + ImStcMessageProto.MsgWithPointer imageMsgWithPointer = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.IMAGE).setPointer(bean.getId()).setImage(msgImage).build(); + requestBuilder.addList(imageMsgWithPointer); + break; + case CoreProto.MsgType.SECRET_IMAGE_VALUE: + CoreProto.MsgSecretImage secretImage = CoreProto.MsgSecretImage.newBuilder() + .setMsgId(bean.getMsgId()).setSiteUserId(bean.getSendUserId()) + .setSiteFriendId(bean.getReceiveUserId()).setImageId(bean.getContent()) + .setToDeviceId(bean.getDeviceId()).setBase64TsKey(bean.getTsKey()) + .setTime(bean.getMsgTime()).build(); + ImStcMessageProto.MsgWithPointer secretImageMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.SECRET_IMAGE).setPointer(bean.getId()).setSecretImage(secretImage).build(); + requestBuilder.addList(secretImageMsg); + break; + case CoreProto.MsgType.VOICE_VALUE: + CoreProto.MsgVoice voice = CoreProto.MsgVoice.newBuilder().setMsgId(bean.getMsgId()) + .setSiteUserId(bean.getSendUserId()).setSiteFriendId(bean.getReceiveUserId()) + .setVoiceId(bean.getContent()).setTime(bean.getMsgTime()).build(); + ImStcMessageProto.MsgWithPointer voiceMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.VOICE).setPointer(bean.getId()).setVoice(voice).build(); + requestBuilder.addList(voiceMsg); + break; + case CoreProto.MsgType.SECRET_VOICE_VALUE: + CoreProto.MsgSecretVoice secretVoice = CoreProto.MsgSecretVoice.newBuilder() + .setMsgId(bean.getMsgId()).setSiteUserId(bean.getSendUserId()) + .setSiteFriendId(bean.getReceiveUserId()).setVoiceId(bean.getContent()) + .setToDeviceId(String.valueOf(bean.getDeviceId())).setBase64TsKey(bean.getTsKey()) + .setTime(bean.getMsgTime()).build(); + ImStcMessageProto.MsgWithPointer secretVoiceMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.SECRET_VOICE).setPointer(bean.getId()).setSecretVoice(secretVoice).build(); + requestBuilder.addList(secretVoiceMsg); + break; + case CoreProto.MsgType.U2_NOTICE_VALUE: + CoreProto.U2MsgNotice u2Notice = CoreProto.U2MsgNotice.newBuilder().setMsgId(bean.getMsgId()) + .setSiteUserId(bean.getSendUserId()).setSiteFriendId(bean.getReceiveUserId()) + .setText(ByteString.copyFromUtf8(bean.getContent())).setTime(bean.getMsgTime()).build(); + ImStcMessageProto.MsgWithPointer u2NoticeMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setPointer(bean.getId()).setType(MsgType.U2_NOTICE).setU2MsgNotice(u2Notice).build(); + requestBuilder.addList(u2NoticeMsg); + break; + case CoreProto.MsgType.U2_WEB_VALUE: + WebBean webBean = GsonUtils.fromJson(bean.getContent(), WebBean.class); + CoreProto.U2Web.Builder u2Web = CoreProto.U2Web.newBuilder(); + u2Web.setMsgId(bean.getMsgId()).setSiteUserId(bean.getSendUserId()) + .setSiteFriendId(bean.getReceiveUserId()).setHeight(webBean.getHeight()) + .setWidth(webBean.getWidth()).setWebCode(webBean.getWebCode()).setTime(bean.getMsgTime()); + if (StringUtils.isNotEmpty(webBean.getHrefUrl())) { + u2Web.setHrefUrl(webBean.getHrefUrl()); + } + ImStcMessageProto.MsgWithPointer u2WebMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setPointer(bean.getId()).setType(MsgType.U2_WEB).setU2Web(u2Web).build(); + requestBuilder.addList(u2WebMsg); + break; + case CoreProto.MsgType.U2_WEB_NOTICE_VALUE: + WebBean webNoticeBean = GsonUtils.fromJson(bean.getContent(), WebBean.class); + CoreProto.U2WebNotice.Builder u2WebNotice = CoreProto.U2WebNotice.newBuilder(); + u2WebNotice.setMsgId(bean.getMsgId()).setSiteUserId(bean.getSendUserId()) + .setSiteFriendId(bean.getReceiveUserId()).setWebCode(webNoticeBean.getWebCode()) + .setHeight(webNoticeBean.getHeight()).setTime(bean.getMsgTime()); + if (StringUtils.isNotEmpty(webNoticeBean.getHrefUrl())) { + u2WebNotice.setHrefUrl(webNoticeBean.getHrefUrl()); + } + ImStcMessageProto.MsgWithPointer u2WebNoticeMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setPointer(bean.getId()).setType(MsgType.U2_WEB_NOTICE).setU2WebNotice(u2WebNotice) + .build(); + requestBuilder.addList(u2WebNoticeMsg); + break; + default: + logger.error("Message type error! when sync to client bean={}", bean); + break; + + } + } catch (Exception e) { + logger.error(StringHelper.format("sync u2 message error bean={}", bean), e); + } + + } + + Map header = new HashMap(); + header.put(CoreProto.HeaderKey.SITE_SERVER_VERSION_VALUE, CommandConst.SITE_VERSION); + ImStcMessageProto.ImStcMessageRequest request = requestBuilder.build(); + CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder().putAllHeader(header) + .setData(ByteString.copyFrom(request.toByteArray())).build(); + + channel.writeAndFlush(new RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) + .add(data.toByteArray())); + return nextPointer; + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/threads/MultiPushThreadExecutor.java b/openzaly-message/src/main/java/com/akaxin/site/message/threads/MultiPushThreadExecutor.java new file mode 100755 index 0000000..25aed63 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/threads/MultiPushThreadExecutor.java @@ -0,0 +1,49 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.threads; + +import java.util.concurrent.Executor; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; + +/** + * 多线程push发送处理器 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-27 20:34:25 + */ +public class MultiPushThreadExecutor { + /** + *
+	 * int corePoolSize = 5
+	 * int maximumPoolSize=(n+1)*5 
+	 * long keepAliveTime=10 
+	 * TimeUnit unit=S
+	 * BlockingQueue workQueue
+	 * 
+ */ + private static int maxThreadNum = (Runtime.getRuntime().availableProcessors() + 1) * 5; + private static Executor threadPoolExecutor = new ThreadPoolExecutor(5, maxThreadNum, 10, TimeUnit.SECONDS, + new LinkedBlockingQueue()); + + private MultiPushThreadExecutor() { + } + + public static Executor getExecutor() { + return threadPoolExecutor; + } +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/AbstractU2Handler.java b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/AbstractU2Handler.java new file mode 100755 index 0000000..11defb0 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/AbstractU2Handler.java @@ -0,0 +1,123 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.user2.handler; + +import org.apache.commons.lang3.StringUtils; + +import com.akaxin.common.channel.ChannelWriter; +import com.akaxin.common.command.Command; +import com.akaxin.common.command.RedisCommand; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.executor.chain.handler.IHandler; +import com.akaxin.proto.client.ImStcMessageProto; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.CoreProto.MsgType; + +import io.netty.channel.Channel; + +public abstract class AbstractU2Handler implements IHandler { + + /** + * 生成msgId + * + * @param siteUserid + * @return + */ + protected String buildU2MsgId(String siteUserid) { + StringBuilder sb = new StringBuilder("U2-"); + if (StringUtils.isNotEmpty(siteUserid)) { + int len = siteUserid.length(); + sb.append(siteUserid.substring(0, len >= 8 ? 8 : len)); + sb.append("-"); + } + sb.append(System.currentTimeMillis()); + return sb.toString(); + } + + /** + *
+	 * 	status=1:发送成功
+	 * 	status=0:默认发送失败状态
+	 * 	status=-1:非好友,不能发送
+	 * 	status=-2:非群成员,发送失败
+	 * 
+ */ + protected void msgStatusResponse(Command command, String msgId, long msgTime, boolean success) { + if (command == null || StringUtils.isEmpty(command.getDeviceId())) { + return; + } + int statusValue = success ? 1 : 0; + + CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) + .setMsgStatus(statusValue).build(); + + ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.MSG_STATUS).setStatus(status).build(); + + ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() + .addList(statusMsg).build(); + + CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() + .setData(request.toByteString()).build(); + + ChannelWriter.writeByDeviceId(command.getDeviceId(), new RedisCommand().add(CommandConst.PROTOCOL_VERSION) + .add(CommandConst.IM_MSG_TOCLIENT).add(data.toByteArray())); + + } + + protected void msgStatusResponse(Command command, String msgId, long msgTime, int statusValue) { + if (command == null || StringUtils.isAnyEmpty(command.getDeviceId(), msgId)) { + return; + } + CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgStatus(statusValue) + .setMsgServerTime(msgTime).build(); + + ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.MSG_STATUS).setStatus(status).build(); + + ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() + .addList(statusMsg).build(); + + CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() + .setData(request.toByteString()).build(); + + ChannelWriter.writeByDeviceId(command.getDeviceId(), new RedisCommand().add(CommandConst.PROTOCOL_VERSION) + .add(CommandConst.IM_MSG_TOCLIENT).add(data.toByteArray())); + } + + /** + * 通过channel回执消息状态 + */ + @Deprecated + protected void msgStatusResponse(Channel channel, Command command, String from, String to, String msgId, + long msgTime) { + CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) + .setMsgStatus(1).build(); + + ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() + .setType(MsgType.MSG_STATUS).setStatus(status).build(); + + ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() + .addList(statusMsg).build(); + + CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() + .setData(request.toByteString()).build(); + + channel.writeAndFlush(new RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) + .add(data.toByteArray())); + + } +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageImageHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageImageHandler.java new file mode 100755 index 0000000..f75a059 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageImageHandler.java @@ -0,0 +1,91 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.user2.handler; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.U2MessageBean; +import com.akaxin.site.storage.service.MessageDaoService; + +/** + * 二人图片消息处理 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-26 14:56:25 + */ +public class U2MessageImageHandler extends AbstractU2Handler { + private static final Logger logger = LoggerFactory.getLogger(U2MessageImageHandler.class); + private IMessageDao messageDao = new MessageDaoService(); + + public Boolean handle(Command command) { + try { + int type = command.getMsgType(); + // 二人图片消息类型 + if (CoreProto.MsgType.IMAGE_VALUE == type) { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String proxySiteUserId = request.getImage().getSiteUserId(); + String siteFriendId = request.getImage().getSiteFriendId(); + String msgId = request.getImage().getMsgId(); + String imageId = request.getImage().getImageId(); + + U2MessageBean u2Bean = new U2MessageBean(); + u2Bean.setMsgId(msgId); + u2Bean.setMsgType(type); + u2Bean.setSiteUserId(siteFriendId); + u2Bean.setSendUserId(command.isProxy() ? proxySiteUserId : siteUserId); + u2Bean.setReceiveUserId(siteFriendId); + u2Bean.setContent(imageId); + long msgTime = System.currentTimeMillis(); + u2Bean.setMsgTime(msgTime); + + LogUtils.requestDebugLog(logger, command, u2Bean.toString()); + + boolean success = messageDao.saveU2Message(u2Bean); + + if (success && command.isProxy()) { + U2MessageBean proxyBean = new U2MessageBean(); + proxyBean.setMsgId(buildU2MsgId(proxySiteUserId)); + proxyBean.setMsgType(type); + proxyBean.setSiteUserId(proxySiteUserId); + proxyBean.setSendUserId(proxySiteUserId); + proxyBean.setReceiveUserId(siteFriendId); + proxyBean.setContent(imageId); + proxyBean.setMsgTime(msgTime); + messageDao.saveU2Message(proxyBean); + } + + msgStatusResponse(command, msgId, msgTime, success); + + return success; + } + + return true; + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + + return false; + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageImageSecretHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageImageSecretHandler.java new file mode 100755 index 0000000..55bcf9c --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageImageSecretHandler.java @@ -0,0 +1,108 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.user2.handler; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.U2MessageBean; +import com.akaxin.site.storage.service.MessageDaoService; + +/** + * 加密二人图片 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-26 15:07:45 + */ +public class U2MessageImageSecretHandler extends AbstractU2Handler { + private static final Logger logger = LoggerFactory.getLogger(U2MessageImageSecretHandler.class); + private IMessageDao messageDao = new MessageDaoService(); + + public Boolean handle(Command command) { + + try { + int type = command.getMsgType(); + + if (CoreProto.MsgType.SECRET_IMAGE_VALUE == type) { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String proxySiteUserId = request.getSecretImage().getSiteUserId(); + String siteFriendId = request.getSecretImage().getSiteFriendId(); + String msgId = request.getSecretImage().getMsgId(); + String tsKey = request.getSecretImage().getBase64TsKey(); + String toDeviceId = request.getSecretImage().getToDeviceId(); + String imageId = request.getSecretImage().getImageId(); + + U2MessageBean u2Bean = new U2MessageBean(); + u2Bean.setMsgId(msgId); + u2Bean.setMsgType(type); + u2Bean.setSiteUserId(siteFriendId); + u2Bean.setSendUserId(command.isProxy() ? proxySiteUserId : siteUserId); + u2Bean.setReceiveUserId(siteFriendId); + u2Bean.setContent(imageId); + u2Bean.setTsKey(tsKey); + u2Bean.setDeviceId(toDeviceId); + long msgTime = System.currentTimeMillis(); + u2Bean.setMsgTime(System.currentTimeMillis()); + + LogUtils.requestDebugLog(logger, command, u2Bean.toString()); + + boolean success = messageDao.saveU2Message(u2Bean); + msgStatusResponse(command, msgId, msgTime, success); + + return success; + } + + return true; + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + + return false; + } + + // private void msgResponse(Channel channel, Command command, String from, + // String to, String msgId) { + // + // logger.info("response to client msgid:{} from:{} to:{}", msgId, from, to); + // + // CoreProto.MsgStatus status = + // CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgStatus(1).build(); + // + // ImStcMessageProto.MsgWithPointer statusMsg = + // ImStcMessageProto.MsgWithPointer.newBuilder() + // .setType(MsgType.MSG_STATUS).setStatus(status).build(); + // + // ImStcMessageProto.ImStcMessageRequest request = + // ImStcMessageProto.ImStcMessageRequest.newBuilder() + // .addList(0, statusMsg).build(); + // + // CoreProto.TransportPackageData data = + // CoreProto.TransportPackageData.newBuilder() + // .setData(request.toByteString()).build(); + // + // channel.writeAndFlush(new + // RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) + // .add(data.toByteArray())); + // + // } +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageNoticeHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageNoticeHandler.java new file mode 100755 index 0000000..2b7844d --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageNoticeHandler.java @@ -0,0 +1,88 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.user2.handler; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.message.group.handler.AbstractGroupHandler; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.U2MessageBean; +import com.akaxin.site.storage.service.MessageDaoService; + +/** + * 二人通知消息 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-26 15:08:51 + */ +public class U2MessageNoticeHandler extends AbstractGroupHandler { + private static final Logger logger = LoggerFactory.getLogger(U2MessageNoticeHandler.class); + private IMessageDao messageDao = new MessageDaoService(); + + @Override + public Boolean handle(Command command) { + try { + int type = command.getMsgType(); + + if (CoreProto.MsgType.U2_NOTICE_VALUE == type) { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String proxySiteUserId = request.getU2MsgNotice().getSiteUserId(); + String siteFriendId = request.getU2MsgNotice().getSiteFriendId(); + String text = request.getU2MsgNotice().getText().toStringUtf8(); + String msgId = request.getU2MsgNotice().getMsgId(); + + long msgTime = System.currentTimeMillis(); + U2MessageBean u2Bean = new U2MessageBean(); + u2Bean.setMsgId(msgId); + u2Bean.setMsgType(type); + u2Bean.setSiteUserId(siteFriendId); + u2Bean.setSendUserId(command.isProxy() ? proxySiteUserId : siteUserId); + u2Bean.setReceiveUserId(siteFriendId); + u2Bean.setContent(text); + u2Bean.setMsgTime(msgTime); + + LogUtils.requestDebugLog(logger, command, u2Bean.toString()); + + if (command.isProxy()) { + U2MessageBean proxyBean = new U2MessageBean(); + proxyBean.setMsgId(msgId); + proxyBean.setMsgType(type); + proxyBean.setSiteUserId(proxySiteUserId); + proxyBean.setSendUserId(proxySiteUserId); + proxyBean.setReceiveUserId(siteFriendId); + proxyBean.setContent(text); + proxyBean.setMsgTime(msgTime); + messageDao.saveU2Message(proxyBean); + } + + return messageDao.saveU2Message(u2Bean); + } + + return true; + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + return false; + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageTextHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageTextHandler.java new file mode 100755 index 0000000..5bd2fee --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageTextHandler.java @@ -0,0 +1,119 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.user2.handler; + +import java.nio.charset.Charset; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.U2MessageBean; +import com.akaxin.site.storage.service.MessageDaoService; +import com.google.protobuf.ByteString; + +/** + * 二人文本消息 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-26 15:09:37 + */ +public class U2MessageTextHandler extends AbstractU2Handler { + private static final Logger logger = LoggerFactory.getLogger(U2MessageTextHandler.class); + private IMessageDao messageDao = new MessageDaoService(); + + public Boolean handle(Command command) { + try { + int type = command.getMsgType(); + + if (CoreProto.MsgType.TEXT_VALUE == type) { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String proxySiteUserId = request.getText().getSiteUserId(); + String siteFriendId = request.getText().getSiteFriendId(); + String msgId = request.getText().getMsgId(); + ByteString byteStr = request.getText().getText(); + String msgText = byteStr.toString(Charset.forName("UTF-8")); + command.setSiteFriendId(siteFriendId); + + long msgTime = System.currentTimeMillis(); + U2MessageBean u2Bean = new U2MessageBean(); + u2Bean.setMsgId(msgId); + u2Bean.setMsgType(type); + u2Bean.setSiteUserId(siteFriendId); + u2Bean.setSendUserId(command.isProxy() ? proxySiteUserId : siteUserId); + u2Bean.setReceiveUserId(siteFriendId); + u2Bean.setContent(msgText); + u2Bean.setMsgTime(msgTime); + + LogUtils.requestDebugLog(logger, command, u2Bean.toString()); + + boolean success = messageDao.saveU2Message(u2Bean); + + if (success && command.isProxy()) { + U2MessageBean proxyBean = new U2MessageBean(); + proxyBean.setMsgId(buildU2MsgId(proxySiteUserId)); + proxyBean.setMsgType(type); + proxyBean.setSiteUserId(proxySiteUserId); + proxyBean.setSendUserId(proxySiteUserId); + proxyBean.setReceiveUserId(siteFriendId); + proxyBean.setContent(msgText); + proxyBean.setMsgTime(msgTime); + messageDao.saveU2Message(proxyBean); + } + + msgStatusResponse(command, msgId, msgTime, success); + + return success; + } + + return true; + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + + return false; + } + + // private void msgResponse(Channel channel, Command command, String from, + // String to, String msgId, long msgTime) { + // CoreProto.MsgStatus status = + // CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) + // .setMsgStatus(1).build(); + // + // ImStcMessageProto.MsgWithPointer statusMsg = + // ImStcMessageProto.MsgWithPointer.newBuilder() + // .setType(MsgType.MSG_STATUS).setStatus(status).build(); + // + // ImStcMessageProto.ImStcMessageRequest request = + // ImStcMessageProto.ImStcMessageRequest.newBuilder() + // .addList(statusMsg).build(); + // + // CoreProto.TransportPackageData data = + // CoreProto.TransportPackageData.newBuilder() + // .setData(request.toByteString()).build(); + // + // channel.writeAndFlush(new + // RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) + // .add(data.toByteArray())); + // + // } +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageTextSecretHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageTextSecretHandler.java new file mode 100755 index 0000000..93bc4c1 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageTextSecretHandler.java @@ -0,0 +1,108 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.user2.handler; + +import java.util.Base64; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.U2MessageBean; +import com.akaxin.site.storage.service.MessageDaoService; +import com.google.protobuf.ByteString; + +/** + * 二人加密文本 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-26 15:09:53 + */ +public class U2MessageTextSecretHandler extends AbstractU2Handler { + private static final Logger logger = LoggerFactory.getLogger(U2MessageTextSecretHandler.class); + private IMessageDao messageDao = new MessageDaoService(); + + public Boolean handle(Command command) { + try { + int type = command.getMsgType(); + + if (CoreProto.MsgType.SECRET_TEXT_VALUE == type) { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String proxySiteUserId = request.getSecretText().getSiteUserId(); + String siteFriendId = request.getSecretText().getSiteFriendId(); + String msgId = request.getSecretText().getMsgId(); + String tsKey = request.getSecretText().getBase64TsKey(); + String toDeviceId = request.getSecretText().getToDeviceId(); + ByteString textBytes = request.getSecretText().getText(); + String msgText = Base64.getEncoder().encodeToString(textBytes.toByteArray()); + + long msgTime = System.currentTimeMillis(); + U2MessageBean u2Bean = new U2MessageBean(); + u2Bean.setMsgId(msgId); + u2Bean.setMsgType(type); + u2Bean.setSiteUserId(siteFriendId); + u2Bean.setSendUserId(command.isProxy() ? proxySiteUserId : siteUserId); + u2Bean.setReceiveUserId(siteFriendId); + u2Bean.setContent(msgText); + u2Bean.setTsKey(tsKey); + u2Bean.setDeviceId(toDeviceId); + u2Bean.setMsgTime(msgTime); + + LogUtils.requestDebugLog(logger, command, u2Bean.toString()); + + boolean success = messageDao.saveU2Message(u2Bean); + msgStatusResponse(command, msgId, msgTime, success); + + return success; + } + return true; + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + + return false; + } + + // private void msgResponse(Channel channel, Command command, String from, + // String to, String msgId, long msgTime) { + // CoreProto.MsgStatus status = + // CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) + // .setMsgStatus(1).build(); + // + // ImStcMessageProto.MsgWithPointer statusMsg = + // ImStcMessageProto.MsgWithPointer.newBuilder() + // .setType(MsgType.MSG_STATUS).setStatus(status).build(); + // + // ImStcMessageProto.ImStcMessageRequest request = + // ImStcMessageProto.ImStcMessageRequest.newBuilder() + // .addList(statusMsg).build(); + // + // CoreProto.TransportPackageData data = + // CoreProto.TransportPackageData.newBuilder() + // .setData(request.toByteString()).build(); + // + // channel.writeAndFlush(new + // RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) + // .add(data.toByteArray())); + // + // } +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageVoiceHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageVoiceHandler.java new file mode 100755 index 0000000..f3de5cd --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageVoiceHandler.java @@ -0,0 +1,116 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.user2.handler; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.U2MessageBean; +import com.akaxin.site.storage.service.MessageDaoService; + +/** + * 二人语音消息 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-26 15:10:20 + */ +public class U2MessageVoiceHandler extends AbstractU2Handler { + private static final Logger logger = LoggerFactory.getLogger(U2MessageVoiceHandler.class); + private IMessageDao messageDao = new MessageDaoService(); + + public Boolean handle(Command command) { + try { + int type = command.getMsgType(); + + if (CoreProto.MsgType.VOICE_VALUE == type) { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String proxySiteUserId = request.getVoice().getSiteUserId(); + String siteFriendId = request.getVoice().getSiteFriendId(); + String msgId = request.getVoice().getMsgId(); + String voiceId = request.getVoice().getVoiceId(); + + U2MessageBean u2Bean = new U2MessageBean(); + u2Bean.setMsgId(msgId); + u2Bean.setMsgType(type); + u2Bean.setSiteUserId(siteFriendId); + u2Bean.setSendUserId(command.isProxy() ? proxySiteUserId : siteUserId); + u2Bean.setReceiveUserId(siteFriendId); + u2Bean.setContent(voiceId); + long msgTime = System.currentTimeMillis(); + u2Bean.setMsgTime(msgTime); + + LogUtils.requestDebugLog(logger, command, u2Bean.toString()); + + boolean success = messageDao.saveU2Message(u2Bean); + + if (success && command.isProxy()) { + U2MessageBean proxyBean = new U2MessageBean(); + proxyBean.setMsgId(buildU2MsgId(proxySiteUserId)); + proxyBean.setMsgType(type); + proxyBean.setSiteUserId(proxySiteUserId); + proxyBean.setSendUserId(proxySiteUserId); + proxyBean.setReceiveUserId(siteFriendId); + proxyBean.setContent(voiceId); + proxyBean.setMsgTime(msgTime); + messageDao.saveU2Message(proxyBean); + } + + msgStatusResponse(command, msgId, msgTime, success); + return success; + } + + return true; + } catch (Exception e) { + logger.error("U2 Message Voice error!", e); + } + + return false; + } + + // private void msgResponse(Channel channel, Command command, String from, + // String to, String msgId, long msgTime) { + // + // logger.info("response to client msgId:{} from:{} to:{}", msgId, from, to); + // + // CoreProto.MsgStatus status = + // CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) + // .setMsgStatus(1).build(); + // + // ImStcMessageProto.MsgWithPointer statusMsg = + // ImStcMessageProto.MsgWithPointer.newBuilder() + // .setType(MsgType.MSG_STATUS).setStatus(status).build(); + // + // ImStcMessageProto.ImStcMessageRequest request = + // ImStcMessageProto.ImStcMessageRequest.newBuilder() + // .addList(0, statusMsg).build(); + // + // CoreProto.TransportPackageData data = + // CoreProto.TransportPackageData.newBuilder() + // .setData(request.toByteString()).build(); + // + // channel.writeAndFlush(new + // RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) + // .add(data.toByteArray())); + // + // } +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageVoiceSecretHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageVoiceSecretHandler.java new file mode 100755 index 0000000..22f7133 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageVoiceSecretHandler.java @@ -0,0 +1,105 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.user2.handler; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.U2MessageBean; +import com.akaxin.site.storage.service.MessageDaoService; + +/** + * 二人加密语音 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-04-26 15:11:42 + */ +public class U2MessageVoiceSecretHandler extends AbstractU2Handler { + private static final Logger logger = LoggerFactory.getLogger(U2MessageVoiceSecretHandler.class); + private IMessageDao messageDao = new MessageDaoService(); + + public Boolean handle(Command command) { + try { + int type = command.getMsgType(); + + if (CoreProto.MsgType.SECRET_VOICE_VALUE == type) { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String proxySiteUserId = request.getSecretVoice().getSiteUserId(); + String siteFriendId = request.getSecretVoice().getSiteFriendId(); + + String msgId = request.getSecretVoice().getMsgId(); + String tsKey = request.getSecretVoice().getBase64TsKey(); + String toDeviceId = request.getSecretVoice().getToDeviceId(); + String secretVoiceId = request.getSecretVoice().getVoiceId(); + + long msgTime = System.currentTimeMillis(); + U2MessageBean u2Bean = new U2MessageBean(); + u2Bean.setMsgId(msgId); + u2Bean.setMsgType(type); + u2Bean.setSiteUserId(siteFriendId); + u2Bean.setSendUserId(command.isProxy() ? proxySiteUserId : siteUserId); + u2Bean.setReceiveUserId(siteFriendId); + u2Bean.setContent(secretVoiceId); + u2Bean.setTsKey(tsKey); + u2Bean.setDeviceId(toDeviceId); + u2Bean.setMsgTime(msgTime); + + LogUtils.requestDebugLog(logger, command, u2Bean.toString()); + + boolean success = messageDao.saveU2Message(u2Bean); + msgStatusResponse(command, msgId, msgTime, success); + return success; + } + + return true; + } catch (Exception e) { + logger.error("U2 Message Secret Voice error!", e); + } + + return false; + } + + // private void msgResponse(Channel channel, Command command, String from, + // String to, String msgId, long msgTime) { + // CoreProto.MsgStatus status = + // CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) + // .setMsgStatus(1).build(); + // + // ImStcMessageProto.MsgWithPointer statusMsg = + // ImStcMessageProto.MsgWithPointer.newBuilder() + // .setType(MsgType.MSG_STATUS).setStatus(status).build(); + // + // ImStcMessageProto.ImStcMessageRequest request = + // ImStcMessageProto.ImStcMessageRequest.newBuilder() + // .addList(0, statusMsg).build(); + // + // CoreProto.TransportPackageData data = + // CoreProto.TransportPackageData.newBuilder() + // .setData(request.toByteString()).build(); + // + // channel.writeAndFlush(new + // RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) + // .add(data.toByteArray())); + // + // } +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageWebHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageWebHandler.java new file mode 100755 index 0000000..bf1e201 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageWebHandler.java @@ -0,0 +1,103 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.user2.handler; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.message.bean.WebBean; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.U2MessageBean; +import com.akaxin.site.storage.service.MessageDaoService; + +public class U2MessageWebHandler extends AbstractU2Handler { + private static final Logger logger = LoggerFactory.getLogger(U2MessageWebHandler.class); + private IMessageDao messageDao = new MessageDaoService(); + + public Boolean handle(Command command) { + try { + int type = command.getMsgType(); + // 获取是否web消息类型 + if (CoreProto.MsgType.U2_WEB_VALUE == type) { + + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String proxySiteUserId = request.getU2Web().getSiteUserId(); + String siteFriendId = request.getU2Web().getSiteFriendId(); + String msgId = request.getU2Web().getMsgId(); + String webCode = request.getU2Web().getWebCode(); + int webWidth = request.getU2Web().getWidth(); + int webHeight = request.getU2Web().getHeight(); + String hrefUrl = request.getU2Web().getHrefUrl(); + long msgTime = System.currentTimeMillis(); + + WebBean webBean = new WebBean(); + webBean.setWebCode(webCode); + webBean.setHeight(webHeight); + webBean.setWidth(webWidth); + webBean.setHrefUrl(hrefUrl); + + U2MessageBean bean = new U2MessageBean(); + bean.setMsgId(msgId); + bean.setMsgType(type); + bean.setSiteUserId(siteFriendId); + bean.setSendUserId(command.isProxy() ? proxySiteUserId : siteUserId); + bean.setReceiveUserId(siteFriendId); + bean.setContent(webBean.toString()); + bean.setMsgTime(msgTime); + + LogUtils.requestDebugLog(logger, command, bean.toString()); + + boolean success = messageDao.saveU2Message(bean); + + if (success && command.isProxy()) { + U2MessageBean proxyBean = new U2MessageBean(); + proxyBean.setMsgId(buildU2MsgId(proxySiteUserId)); + proxyBean.setMsgType(type); + proxyBean.setSiteUserId(proxySiteUserId); + proxyBean.setSendUserId(proxySiteUserId); + proxyBean.setReceiveUserId(siteFriendId); + // 这里兼容一个客户端的chatSessionId Bug + if (hrefUrl.contains("page=plugin_for_u2_chat&site_user_id")) { + String oldPar = "plugin_for_u2_chat&site_user_id=" + proxySiteUserId; + String newPar = "plugin_for_u2_chat&site_user_id=" + siteFriendId; + String hrefUrl2 = hrefUrl.replace(oldPar, newPar); + webBean.setHrefUrl(hrefUrl2); + } + proxyBean.setContent(webBean.toString()); + proxyBean.setMsgTime(msgTime); + messageDao.saveU2Message(proxyBean); + } + + msgStatusResponse(command, msgId, msgTime, success); + + return success; + } + + return true; + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + + return false; + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageWebNoticeHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageWebNoticeHandler.java new file mode 100755 index 0000000..647b22e --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/U2MessageWebNoticeHandler.java @@ -0,0 +1,98 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.user2.handler; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.message.bean.WebBean; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.U2MessageBean; +import com.akaxin.site.storage.service.MessageDaoService; + +public class U2MessageWebNoticeHandler extends AbstractU2Handler { + private static final Logger logger = LoggerFactory.getLogger(U2MessageWebNoticeHandler.class); + private IMessageDao messageDao = new MessageDaoService(); + + public Boolean handle(Command command) { + try { + int type = command.getMsgType(); + // web notice  + if (CoreProto.MsgType.U2_WEB_NOTICE_VALUE == type) { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String proxySiteUserId = request.getU2WebNotice().getSiteUserId(); + String siteFriendId = request.getU2WebNotice().getSiteFriendId(); + String msgId = request.getU2WebNotice().getMsgId(); + + WebBean webBean = new WebBean(); + webBean.setWebCode(request.getU2WebNotice().getWebCode()); + webBean.setHrefUrl(request.getU2WebNotice().getHrefUrl()); + webBean.setHeight(request.getU2WebNotice().getHeight()); + + long msgTime = System.currentTimeMillis(); + U2MessageBean bean = new U2MessageBean(); + bean.setMsgId(msgId); + bean.setMsgType(type); + bean.setSiteUserId(siteFriendId); + bean.setSendUserId(command.isProxy() ? proxySiteUserId : siteUserId); + bean.setReceiveUserId(siteFriendId); + bean.setContent(webBean.toString()); + bean.setMsgTime(msgTime); + + LogUtils.requestDebugLog(logger, command, bean.toString()); + + boolean success = messageDao.saveU2Message(bean); + // 代理消息同时发送发送者 + if (success && command.isProxy()) { + U2MessageBean proxyBean = new U2MessageBean(); + proxyBean.setMsgId(buildU2MsgId(proxySiteUserId)); + proxyBean.setMsgType(type); + proxyBean.setSiteUserId(proxySiteUserId); + proxyBean.setSendUserId(proxySiteUserId); + proxyBean.setReceiveUserId(siteFriendId); + // 这里兼容一个客户端的chatSessionId Bug + String hrefUrl = request.getU2WebNotice().getHrefUrl(); + if (hrefUrl.contains("page=plugin_for_u2_chat&site_user_id")) { + String oldPar = "plugin_for_u2_chat&site_user_id=" + proxySiteUserId; + String newPar = "plugin_for_u2_chat&site_user_id=" + siteFriendId; + String hrefUrl2 = hrefUrl.replace(oldPar, newPar); + webBean.setHrefUrl(hrefUrl2); + } + proxyBean.setContent(webBean.toString()); + proxyBean.setMsgTime(msgTime); + messageDao.saveU2Message(proxyBean); + } + + msgStatusResponse(command, msgId, msgTime, success); + + return success; + } + + return true; + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + + return false; + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/UserDetectionHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/UserDetectionHandler.java new file mode 100755 index 0000000..e80f533 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/UserDetectionHandler.java @@ -0,0 +1,186 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.user2.handler; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.UserProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.message.dao.ImUserFriendDao; +import com.akaxin.site.message.dao.ImUserProfileDao; +import com.akaxin.site.storage.bean.SimpleUserBean; + +/** + *
+ * 	U2消息发送之前的检测: 
+ * 		1.支持消息属于代发类型
+ * 		2.发送者和接受者是否为正常状态用户
+ * 		3.如果用户之间不是好友,消息发送不出去
+ * 
+ * + * @author Sam + * @since 2017.11.02 + */ +public class UserDetectionHandler extends AbstractU2Handler { + private static final Logger logger = LoggerFactory.getLogger(UserDetectionHandler.class); + + @Override + public Boolean handle(Command command) { + try { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String siteFriendId = null; + String msgId = null; + int type = request.getType().getNumber(); + command.setMsgType(type); + + switch (type) { + case CoreProto.MsgType.TEXT_VALUE: + if (command.isProxy()) { + siteUserId = request.getText().getSiteUserId(); + } + siteFriendId = request.getText().getSiteFriendId(); + msgId = request.getText().getMsgId(); + break; + case CoreProto.MsgType.SECRET_TEXT_VALUE: + if (command.isProxy()) { + siteUserId = request.getSecretText().getSiteUserId(); + } + siteFriendId = request.getSecretText().getSiteFriendId(); + msgId = request.getSecretText().getMsgId(); + break; + case CoreProto.MsgType.IMAGE_VALUE: + if (command.isProxy()) { + siteUserId = request.getImage().getSiteUserId(); + } + siteFriendId = request.getImage().getSiteFriendId(); + msgId = request.getImage().getMsgId(); + break; + case CoreProto.MsgType.SECRET_IMAGE_VALUE: + if (command.isProxy()) { + siteUserId = request.getSecretImage().getSiteUserId(); + } + siteFriendId = request.getSecretImage().getSiteFriendId(); + msgId = request.getSecretImage().getMsgId(); + break; + case CoreProto.MsgType.VOICE_VALUE: + if (command.isProxy()) { + siteUserId = request.getVoice().getSiteUserId(); + } + siteFriendId = request.getVoice().getSiteFriendId(); + msgId = request.getVoice().getMsgId(); + break; + case CoreProto.MsgType.SECRET_VOICE_VALUE: + if (command.isProxy()) { + siteUserId = request.getSecretVoice().getSiteUserId(); + } + siteFriendId = request.getSecretVoice().getSiteFriendId(); + msgId = request.getSecretVoice().getMsgId(); + break; + case CoreProto.MsgType.U2_NOTICE_VALUE: + // 通知消息不需要返回response + command.setMsgType(type); + return true; + case CoreProto.MsgType.U2_WEB_VALUE: + if (command.isProxy()) { + siteUserId = request.getU2Web().getSiteUserId(); + } + siteFriendId = request.getU2Web().getSiteFriendId(); + command.setProxySiteUserId(siteUserId); + command.setSiteFriendId(siteFriendId); + return true; + case CoreProto.MsgType.U2_WEB_NOTICE_VALUE: + if (command.isProxy()) { + siteUserId = request.getU2WebNotice().getSiteUserId(); + siteFriendId = request.getU2WebNotice().getSiteFriendId(); + command.setProxySiteUserId(siteUserId); + command.setSiteFriendId(siteFriendId); + } + return true; + default: + logger.error("error message type cmd={} request={}", command.toString(), request.toString()); + return false; + } + command.setProxySiteUserId(siteUserId); + command.setSiteFriendId(siteFriendId); + + if (checkUser(siteUserId, siteFriendId, command.isMasterDB())) { + return true; + } else { + logger.warn("users arent friend relation.siteUserId:{},siteFriendId:{}", siteUserId, siteFriendId); + int statusValue = -1;// 非好友关系,返回状态值 + msgStatusResponse(command, msgId, System.currentTimeMillis(), statusValue); + } + + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + return false; + } + + /** + *
+	 * 检测消息是否可以发送:
+	 * 		1.消息发送者是否为正常用户
+	 * 		2.消息接受者是否为正常用户
+	 * 		3.二者是否为好友关系
+	 * 
+ * + * @param siteUserId + * @param siteFriendId + * @return + */ + private boolean checkUser(String siteUserId, String siteFriendId, boolean isMaster) { + try { + // 检测发送者的状态 + SimpleUserBean userBean = ImUserProfileDao.getInstance().getSimpleUserProfile(siteUserId, isMaster); + if (userBean != null) { + if (userBean.getUserStatus() != UserProto.UserStatus.NORMAL_VALUE) { + return false; + } + } else { + return false; + } + + // 检测接受者的状态 + SimpleUserBean friendBean = ImUserProfileDao.getInstance().getSimpleUserProfile(siteFriendId, isMaster); + if (friendBean != null) { + if (friendBean.getUserStatus() != UserProto.UserStatus.NORMAL_VALUE) { + return false; + } + } else { + return false; + } + + // 检测是否为好友关系 + if (!ImUserFriendDao.getInstance().isFriend(siteUserId, siteFriendId, isMaster)) { + return false; + } + return true; + } catch (Exception e) { + logger.error(StringHelper.format("check siteUserid={} siteFriendId={} error.", siteUserId, siteFriendId), + e); + } + return false; + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/UserPsnHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/UserPsnHandler.java new file mode 100755 index 0000000..05ed7f6 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/UserPsnHandler.java @@ -0,0 +1,79 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.user2.handler; + +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.channel.ChannelWriter; +import com.akaxin.common.command.Command; +import com.akaxin.common.command.CommandResponse; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.constant.ErrorCode2; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.client.ImStcPsnProto; +import com.akaxin.site.message.dao.ImUserSessionDao; + +public class UserPsnHandler extends AbstractU2Handler { + private static final Logger logger = LoggerFactory.getLogger(UserPsnHandler.class); + + public Boolean handle(Command command) { + try { + String siteUserId = command.getSiteUserId(); + String siteFriendId = command.getSiteFriendId(); + + // 查找对方的设备信息,发送psh + List deviceIdList = ImUserSessionDao.getInstance().getSessionDevices(siteFriendId); + command.setField("deviceIdList", deviceIdList); + sendPsnToUserDevices(deviceIdList); + + // 如果是代发消息,则需要给发送方发送一个psn + if (command.isProxy()) { + List proxyDeviceList = ImUserSessionDao.getInstance() + .getSessionDevices(command.getProxySiteUserId()); + sendPsnToUserDevices(proxyDeviceList); + } + + return true; + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + return false; + } + + private void sendPsnToUserDevices(List deviceIdList) { + if (deviceIdList == null || deviceIdList.size() == 0) { + return; + } + for (String deviceId : deviceIdList) { + if (deviceId != null) { + writePsn(deviceId); + } + } + } + + private void writePsn(String deviceId) { + CommandResponse commandResponse = new CommandResponse().setVersion(CommandConst.PROTOCOL_VERSION) + .setAction(CommandConst.IM_STC_PSN); + ImStcPsnProto.ImStcPsnRequest pshRequest = ImStcPsnProto.ImStcPsnRequest.newBuilder().build(); + commandResponse.setParams(pshRequest.toByteArray()); + commandResponse.setErrCode2(ErrorCode2.SUCCESS); + ChannelWriter.writeByDeviceId(deviceId, commandResponse); + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/UserPushHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/UserPushHandler.java new file mode 100755 index 0000000..4817b21 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/user2/handler/UserPushHandler.java @@ -0,0 +1,118 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.user2.handler; + +import java.nio.charset.Charset; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.constant.CommandConst; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.ConfigProto; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.PushProto; +import com.akaxin.proto.platform.ApiPushNotificationProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.message.dao.ImUserFriendDao; +import com.akaxin.site.message.dao.ImUserProfileDao; +import com.akaxin.site.message.push.PushClient; +import com.akaxin.site.message.threads.MultiPushThreadExecutor; +import com.akaxin.site.message.utils.SiteConfigHelper; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.google.protobuf.ByteString; + +public class UserPushHandler extends AbstractU2Handler { + private static final Logger logger = LoggerFactory.getLogger(UserPushHandler.class); + + public Boolean handle(Command command) { + // 1.判断站点是否开启PUSH发送功能 + ConfigProto.PushClientStatus pcs = SiteConfigHelper.getPushClientStatus(); + if (ConfigProto.PushClientStatus.PUSH_NO == pcs) { + logger.warn("push to client error. cause: pushClientStatus={}", ConfigProto.PushClientStatus.PUSH_NO); + return true; + } + + // 多线程处理push + MultiPushThreadExecutor.getExecutor().execute(new Runnable() { + + @Override + public void run() { + try { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + // String siteUserId = command.getSiteUserId();// 发送者 + String fromSiteUserId = command.isProxy() ? command.getProxySiteUserId() : command.getSiteUserId(); // + String toSiteUserId = command.getSiteFriendId();// 接受者 这里是用户生成的站点ID + String toGlobalUserId = ImUserProfileDao.getInstance().getGlobalUserId(toSiteUserId); + LogUtils.requestDebugLog(logger, command, request.toString()); + + // 一、用户对站点是否消息免打扰 + // 二、用户对该好友是否消息免打扰 + if (StringUtils.isEmpty(toGlobalUserId) || ImUserProfileDao.getInstance().isMute(toSiteUserId) + || ImUserFriendDao.getInstance().isMesageMute(toSiteUserId, fromSiteUserId)) { + return; + } + + ApiPushNotificationProto.ApiPushNotificationRequest.Builder requestBuilder = ApiPushNotificationProto.ApiPushNotificationRequest + .newBuilder(); + PushProto.Notification.Builder notification = PushProto.Notification.newBuilder(); + notification.setUserId(toGlobalUserId); + notification.setPushBadge(1); + String siteName = SiteConfigHelper.getConfig(ConfigProto.ConfigKey.SITE_NAME); + if (StringUtils.isNotBlank(siteName)) { + notification.setPushTitle(siteName); + } + String address = SiteConfigHelper.getConfig(ConfigProto.ConfigKey.SITE_ADDRESS); + String port = SiteConfigHelper.getConfig(ConfigProto.ConfigKey.SITE_PORT); + notification.setSiteServer(address + ":" + port); + notification.setPushFromId(fromSiteUserId); + // 条件1:站点是否支持push展示消息内容 + // 条件2:站点只支持文本消息展示消息内容 + if (ConfigProto.PushClientStatus.PUSH_DISPLAY_TEXT == pcs + && CoreProto.MsgType.TEXT == request.getType()) { + ByteString byteStr = request.getText().getText(); + notification.setPushAlert(byteStr.toString(Charset.forName("UTF-8"))); + SimpleUserBean bean = ImUserProfileDao.getInstance().getSimpleUserProfile(fromSiteUserId); + if (bean != null && StringUtils.isNotEmpty(bean.getUserName())) { + notification.setPushFromName(bean.getUserName()); + } + } + List userTokens = ImUserProfileDao.getInstance().getUserToken(toSiteUserId); + if (userTokens != null && userTokens.size() > 0) { + notification.addAllUserTokens(userTokens); + requestBuilder.setNotification(notification.build()); + requestBuilder.setPushTypeValue(request.getType().getNumber()); + + PushClient.asyncWrite(CommandConst.API_PUSH_NOTIFICATION, requestBuilder.build().toByteArray()); + logger.debug("client={} siteUserId={} push to siteFriend={} content={}", command.getClientIp(), + command.getSiteUserId(), command.getSiteFriendId(), requestBuilder.toString()); + } else { + logger.warn("client={} siteUserId={} push to siteFriend={} error as userToken={}", + command.getClientIp(), command.getSiteUserId(), command.getSiteFriendId(), userTokens); + } + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, UserPushHandler.class, e); + } + } + }); + return true; + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/utils/HexUtils.java b/openzaly-message/src/main/java/com/akaxin/site/message/utils/HexUtils.java new file mode 100755 index 0000000..09d5dcc --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/utils/HexUtils.java @@ -0,0 +1,32 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.utils; + +public class HexUtils { + + public static String printHexString(byte[] b) { + StringBuffer returnValue = new StringBuffer(); + for (int i = 0; i < b.length; i++) { + String hex = Integer.toHexString(b[i] & 0xFF); + if (hex.length() == 1) { + hex = '0' + hex; + } + returnValue.append(hex.toUpperCase() + " "); + } + + return "[" + returnValue.toString() + "]"; + } +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/utils/NumUtils.java b/openzaly-message/src/main/java/com/akaxin/site/message/utils/NumUtils.java new file mode 100755 index 0000000..b4d5406 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/utils/NumUtils.java @@ -0,0 +1,13 @@ +package com.akaxin.site.message.utils; + +public class NumUtils { + + public static long getMax(long num1, long num2) { + return num1 > num2 ? num1 : num2; + } + + public static long getMax(int num1, int num2) { + return num1 > num2 ? num1 : num2; + } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/utils/SiteConfigHelper.java b/openzaly-message/src/main/java/com/akaxin/site/message/utils/SiteConfigHelper.java new file mode 100755 index 0000000..9e9f047 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/utils/SiteConfigHelper.java @@ -0,0 +1,88 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.utils; + +import java.util.Map; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.proto.core.ConfigProto; +import com.akaxin.site.message.dao.SiteConfigDao; + +/** + * 管理站点配置相关信息 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-14 21:18:49 + */ +public class SiteConfigHelper { + private static final Logger logger = LoggerFactory.getLogger(SiteConfigHelper.class); + + private static volatile Map configMap; + + private SiteConfigHelper() { + } + + public static Map getConfigMap() { + if (configMap == null) { + configMap = SiteConfigDao.getInstance().getSiteConfig(); + } + return configMap; + } + + public static Map updateConfig() { + try { + configMap = SiteConfigDao.getInstance().getSiteConfig(); + } catch (Exception e) { + logger.error("update im site config error.", e); + } + return configMap; + } + + public static String getConfig(ConfigProto.ConfigKey configKey) { + try { + return getConfigMap().get(configKey.getNumber()); + } catch (Exception e) { + logger.error("get config value error", e); + } + return null; + } + + /** + *
+	 * 站点发送PUSH的状态值
+	 * 		PUSH_NO
+	 * 		PUSH_HIDDEN_TEXT
+	 * 		PUSH_HIDDEN_TEXT
+	 * 
+	 * 
+ * + * @return + */ + public static ConfigProto.PushClientStatus getPushClientStatus() { + try { + String status = getConfig(ConfigProto.ConfigKey.PUSH_CLIENT_STATUS); + if (status != null) { + return ConfigProto.PushClientStatus.forNumber(Integer.valueOf(status)); + } + } catch (Exception e) { + logger.error("get push client status error.", e); + } + return ConfigProto.PushClientStatus.PUSH_HIDDEN_TEXT; + } + +} \ No newline at end of file diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/web/bean/WebGroupTextBean.java b/openzaly-message/src/main/java/com/akaxin/site/message/web/bean/WebGroupTextBean.java new file mode 100755 index 0000000..9c602fd --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/web/bean/WebGroupTextBean.java @@ -0,0 +1,5 @@ +package com.akaxin.site.message.web.bean; + +public class WebGroupTextBean { + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/web/bean/WebResponseBean.java b/openzaly-message/src/main/java/com/akaxin/site/message/web/bean/WebResponseBean.java new file mode 100755 index 0000000..14ab954 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/web/bean/WebResponseBean.java @@ -0,0 +1,5 @@ +package com.akaxin.site.message.web.bean; + +public class WebResponseBean { + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/web/bean/WebU2TextBean.java b/openzaly-message/src/main/java/com/akaxin/site/message/web/bean/WebU2TextBean.java new file mode 100755 index 0000000..4d43edd --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/web/bean/WebU2TextBean.java @@ -0,0 +1,5 @@ +package com.akaxin.site.message.web.bean; + +public class WebU2TextBean { + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/web/chat/WebChatReceiveMessageHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/web/chat/WebChatReceiveMessageHandler.java new file mode 100755 index 0000000..f7377f0 --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/web/chat/WebChatReceiveMessageHandler.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.web.chat; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.GroupMessageBean; +import com.akaxin.site.storage.service.MessageDaoService; + +/** + * web群聊文本消息 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-05-08 18:30:07 + */ +public class WebChatReceiveMessageHandler { + private static final Logger logger = LoggerFactory.getLogger(WebChatReceiveMessageHandler.class); + private IMessageDao messageDao = new MessageDaoService(); + + public Boolean handle(Command command) { + try { + int type = command.getMsgType(); + + if (CoreProto.MsgType.GROUP_TEXT_VALUE == type) { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String deviceId = command.getDeviceId(); + String gmsgId = request.getGroupText().getMsgId(); + String groupId = request.getGroupText().getSiteGroupId(); + String groupText = request.getGroupText().getText().toStringUtf8(); + + long msgTime = System.currentTimeMillis(); + GroupMessageBean gmsgBean = new GroupMessageBean(); + gmsgBean.setMsgId(gmsgId); + gmsgBean.setSendUserId(siteUserId); + gmsgBean.setSendDeviceId(deviceId); + gmsgBean.setSiteGroupId(groupId); + gmsgBean.setContent(groupText); + gmsgBean.setMsgType(type); + gmsgBean.setMsgTime(msgTime); + + LogUtils.requestDebugLog(logger, command, gmsgBean.toString()); + + boolean success = messageDao.saveGroupMessage(gmsgBean); + // msgStatusResponse(command, gmsgId, msgTime, success); + return success; + } + return true; + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + + return false; + } + + // private void msgResponse(Channel channel, Command command, String from, + // String to, String msgId, long msgTime) { + // CoreProto.MsgStatus status = + // CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) + // .setMsgStatus(1).build(); + // + // ImStcMessageProto.MsgWithPointer statusMsg = + // ImStcMessageProto.MsgWithPointer.newBuilder() + // .setType(MsgType.MSG_STATUS).setStatus(status).build(); + // + // ImStcMessageProto.ImStcMessageRequest request = + // ImStcMessageProto.ImStcMessageRequest.newBuilder() + // .addList(statusMsg).build(); + // + // CoreProto.TransportPackageData data = + // CoreProto.TransportPackageData.newBuilder() + // .setData(request.toByteString()).build(); + // + // channel.writeAndFlush(new + // RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) + // .add(data.toByteArray())); + // + // } + +} diff --git a/openzaly-message/src/main/java/com/akaxin/site/message/web/chat/WebChatSendMessageHandler.java b/openzaly-message/src/main/java/com/akaxin/site/message/web/chat/WebChatSendMessageHandler.java new file mode 100755 index 0000000..66bc85e --- /dev/null +++ b/openzaly-message/src/main/java/com/akaxin/site/message/web/chat/WebChatSendMessageHandler.java @@ -0,0 +1,150 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.message.web.chat; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.command.Command; +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.core.CoreProto; +import com.akaxin.proto.core.UserProto; +import com.akaxin.proto.site.ImCtsMessageProto; +import com.akaxin.site.message.dao.ImUserFriendDao; +import com.akaxin.site.message.dao.ImUserProfileDao; +import com.akaxin.site.storage.bean.SimpleUserBean; + +/** + * web消息检测 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-05-08 18:34:00 + */ +public class WebChatSendMessageHandler { + private static final Logger logger = LoggerFactory.getLogger(WebChatSendMessageHandler.class); + + public Boolean handle(Command command) { + try { + ImCtsMessageProto.ImCtsMessageRequest request = ImCtsMessageProto.ImCtsMessageRequest + .parseFrom(command.getParams()); + String siteUserId = command.getSiteUserId(); + String siteFriendId = null; + String msgId = null; + int type = request.getType().getNumber(); + command.setMsgType(type); + + switch (type) { + case CoreProto.MsgType.TEXT_VALUE: + siteFriendId = request.getText().getSiteFriendId(); + msgId = request.getText().getMsgId(); + break; + case CoreProto.MsgType.SECRET_TEXT_VALUE: + siteFriendId = request.getSecretText().getSiteFriendId(); + msgId = request.getSecretText().getMsgId(); + break; + case CoreProto.MsgType.IMAGE_VALUE: + siteFriendId = request.getImage().getSiteFriendId(); + msgId = request.getImage().getMsgId(); + break; + case CoreProto.MsgType.SECRET_IMAGE_VALUE: + siteFriendId = request.getSecretImage().getSiteFriendId(); + msgId = request.getSecretImage().getMsgId(); + break; + case CoreProto.MsgType.VOICE_VALUE: + siteFriendId = request.getVoice().getSiteFriendId(); + msgId = request.getVoice().getMsgId(); + break; + case CoreProto.MsgType.SECRET_VOICE_VALUE: + siteFriendId = request.getSecretVoice().getSiteFriendId(); + msgId = request.getSecretVoice().getMsgId(); + break; + case CoreProto.MsgType.U2_NOTICE_VALUE: + // 通知消息不需要返回response + command.setMsgType(type); + return true; + case CoreProto.MsgType.U2_WEB_VALUE: + return true; + case CoreProto.MsgType.U2_WEB_NOTICE_VALUE: + return true; + default: + logger.error("it's a unsupport type message cmd={} request={}", command.toString(), request.toString()); + return false; + } + + command.setSiteFriendId(siteFriendId); + + if (checkUser(siteUserId, siteFriendId)) { + return true; + } else { + logger.warn("user2 are not friend.user:{},friend:{}", siteUserId, siteFriendId); + int statusValue = -1;// 非好友关系,返回状态值 + // msgStatusResponse(command, msgId, System.currentTimeMillis(), statusValue); + } + + } catch (Exception e) { + LogUtils.requestErrorLog(logger, command, this.getClass(), e); + } + return false; + } + + /** + *
+	 * 检测消息是否可以发送:
+	 * 		1.消息发送者是否为正常用户
+	 * 		2.消息接受者是否为正常用户
+	 * 		3.二者是否为好友关系
+	 * 
+ * + * @param siteUserId + * @param siteFriendId + * @return + */ + private boolean checkUser(String siteUserId, String siteFriendId) { + try { + // 检测发送者的状态 + SimpleUserBean userBean = ImUserProfileDao.getInstance().getSimpleUserProfile(siteUserId); + if (userBean != null) { + if (userBean.getUserStatus() != UserProto.UserStatus.NORMAL_VALUE) { + return false; + } + } else { + return false; + } + + // 检测接受者的状态 + SimpleUserBean friendBean = ImUserProfileDao.getInstance().getSimpleUserProfile(siteFriendId); + if (friendBean != null) { + if (friendBean.getUserStatus() != UserProto.UserStatus.NORMAL_VALUE) { + return false; + } + } else { + return false; + } + + // 检测是否为好友关系 + if (!ImUserFriendDao.getInstance().isFriend(siteUserId, siteFriendId)) { + return false; + } + return true; + } catch (Exception e) { + logger.error(StringHelper.format("check siteUserid={} siteFriendId={} error.", siteUserId, siteFriendId), + e); + } + return false; + } + +} diff --git a/openzaly-message/src/main/resources/chatchrome1.jks b/openzaly-message/src/main/resources/chatchrome1.jks new file mode 100755 index 0000000..516d11a Binary files /dev/null and b/openzaly-message/src/main/resources/chatchrome1.jks differ diff --git a/openzaly-protobuf/.gitignore b/openzaly-protobuf/.gitignore new file mode 100755 index 0000000..b83d222 --- /dev/null +++ b/openzaly-protobuf/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/openzaly-protobuf/pom.xml b/openzaly-protobuf/pom.xml new file mode 100755 index 0000000..34a10cc --- /dev/null +++ b/openzaly-protobuf/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + + com.akaxin + openzaly-parent + 0.0.1 + + com.akaxin.proto + openzaly-protobuf + 0.0.1-RELEASE + + + UTF-8 + 3.4.0 + + 1.8 + 1.8 + + + + + com.google.protobuf + protobuf-java + ${protobuf.version} + + + + \ No newline at end of file diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImMsgFinishProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImMsgFinishProto.java new file mode 100755 index 0000000..f354eff --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImMsgFinishProto.java @@ -0,0 +1,445 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: client/im_msg.finish.proto + +package com.akaxin.proto.client; + +public final class ImMsgFinishProto { + private ImMsgFinishProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ImMsgFinishRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:client.ImMsgFinishRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code client.ImMsgFinishRequest} + */ + public static final class ImMsgFinishRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:client.ImMsgFinishRequest) + ImMsgFinishRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImMsgFinishRequest.newBuilder() to construct. + private ImMsgFinishRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImMsgFinishRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImMsgFinishRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.client.ImMsgFinishProto.internal_static_client_ImMsgFinishRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.client.ImMsgFinishProto.internal_static_client_ImMsgFinishRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest.class, com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest)) { + return super.equals(obj); + } + com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest other = (com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code client.ImMsgFinishRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:client.ImMsgFinishRequest) + com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.client.ImMsgFinishProto.internal_static_client_ImMsgFinishRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.client.ImMsgFinishProto.internal_static_client_ImMsgFinishRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest.class, com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest.Builder.class); + } + + // Construct using com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.client.ImMsgFinishProto.internal_static_client_ImMsgFinishRequest_descriptor; + } + + public com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest getDefaultInstanceForType() { + return com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest.getDefaultInstance(); + } + + public com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest build() { + com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest buildPartial() { + com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest result = new com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest) { + return mergeFrom((com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest other) { + if (other == com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:client.ImMsgFinishRequest) + } + + // @@protoc_insertion_point(class_scope:client.ImMsgFinishRequest) + private static final com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest(); + } + + public static com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImMsgFinishRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImMsgFinishRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.client.ImMsgFinishProto.ImMsgFinishRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_client_ImMsgFinishRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_client_ImMsgFinishRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032client/im_msg.finish.proto\022\006client\032\017co" + + "re/core.proto\"\024\n\022ImMsgFinishRequest2O\n\023I" + + "mMsgFinishhService\0228\n\006finish\022\032.client.Im" + + "MsgFinishRequest\032\022.core.NoneResponseB+\n\027" + + "com.akaxin.proto.clientB\020ImMsgFinishProt" + + "ob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.CoreProto.getDescriptor(), + }, assigner); + internal_static_client_ImMsgFinishRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_client_ImMsgFinishRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_client_ImMsgFinishRequest_descriptor, + new java.lang.String[] { }); + com.akaxin.proto.core.CoreProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImPtcPongProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImPtcPongProto.java new file mode 100755 index 0000000..acf0b0c --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImPtcPongProto.java @@ -0,0 +1,452 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: client/im_ptc_pong.proto + +package com.akaxin.proto.client; + +public final class ImPtcPongProto { + private ImPtcPongProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ImPtcPongRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:client.ImPtcPongRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   *pong操作不需要request实体
+   * 
+ * + * Protobuf type {@code client.ImPtcPongRequest} + */ + public static final class ImPtcPongRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:client.ImPtcPongRequest) + ImPtcPongRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImPtcPongRequest.newBuilder() to construct. + private ImPtcPongRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImPtcPongRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImPtcPongRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.client.ImPtcPongProto.internal_static_client_ImPtcPongRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.client.ImPtcPongProto.internal_static_client_ImPtcPongRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest.class, com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest)) { + return super.equals(obj); + } + com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest other = (com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *pong操作不需要request实体
+     * 
+ * + * Protobuf type {@code client.ImPtcPongRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:client.ImPtcPongRequest) + com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.client.ImPtcPongProto.internal_static_client_ImPtcPongRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.client.ImPtcPongProto.internal_static_client_ImPtcPongRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest.class, com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest.Builder.class); + } + + // Construct using com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.client.ImPtcPongProto.internal_static_client_ImPtcPongRequest_descriptor; + } + + public com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest getDefaultInstanceForType() { + return com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest.getDefaultInstance(); + } + + public com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest build() { + com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest buildPartial() { + com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest result = new com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest) { + return mergeFrom((com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest other) { + if (other == com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:client.ImPtcPongRequest) + } + + // @@protoc_insertion_point(class_scope:client.ImPtcPongRequest) + private static final com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest(); + } + + public static com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImPtcPongRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImPtcPongRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.client.ImPtcPongProto.ImPtcPongRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_client_ImPtcPongRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_client_ImPtcPongRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\030client/im_ptc_pong.proto\022\006client\032\017core" + + "/core.proto\"\022\n\020ImPtcPongRequest2H\n\020ImPtc" + + "PongService\0224\n\004pong\022\030.client.ImPtcPongRe" + + "quest\032\022.core.NoneResponseB)\n\027com.akaxin." + + "proto.clientB\016ImPtcPongProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.CoreProto.getDescriptor(), + }, assigner); + internal_static_client_ImPtcPongRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_client_ImPtcPongRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_client_ImPtcPongRequest_descriptor, + new java.lang.String[] { }); + com.akaxin.proto.core.CoreProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImPtcPushProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImPtcPushProto.java new file mode 100755 index 0000000..cd3cf7d --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImPtcPushProto.java @@ -0,0 +1,1397 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: client/im_ptc_push.proto + +package com.akaxin.proto.client; + +public final class ImPtcPushProto { + private ImPtcPushProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ImPtcPushRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:platform.ImPtcPushRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *站点服务demo.akaxin.com:2021
+     * 
+ * + * string site_server = 1; + */ + java.lang.String getSiteServer(); + /** + *
+     *站点服务demo.akaxin.com:2021
+     * 
+ * + * string site_server = 1; + */ + com.google.protobuf.ByteString + getSiteServerBytes(); + + /** + *
+     *展示的title
+     * 
+ * + * string push_title = 2; + */ + java.lang.String getPushTitle(); + /** + *
+     *展示的title
+     * 
+ * + * string push_title = 2; + */ + com.google.protobuf.ByteString + getPushTitleBytes(); + + /** + *
+     *展示的文案
+     * 
+ * + * string push_alert = 3; + */ + java.lang.String getPushAlert(); + /** + *
+     *展示的文案
+     * 
+ * + * string push_alert = 3; + */ + com.google.protobuf.ByteString + getPushAlertBytes(); + + /** + *
+     *Push跳转位置
+     * 
+ * + * string push_jump = 4; + */ + java.lang.String getPushJump(); + /** + *
+     *Push跳转位置
+     * 
+ * + * string push_jump = 4; + */ + com.google.protobuf.ByteString + getPushJumpBytes(); + + /** + *
+     *气泡展示个数
+     * 
+ * + * int32 push_badge = 5; + */ + int getPushBadge(); + + /** + *
+     *气泡声音
+     * 
+ * + * string push_sound = 6; + */ + java.lang.String getPushSound(); + /** + *
+     *气泡声音
+     * 
+ * + * string push_sound = 6; + */ + com.google.protobuf.ByteString + getPushSoundBytes(); + } + /** + * Protobuf type {@code platform.ImPtcPushRequest} + */ + public static final class ImPtcPushRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:platform.ImPtcPushRequest) + ImPtcPushRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImPtcPushRequest.newBuilder() to construct. + private ImPtcPushRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImPtcPushRequest() { + siteServer_ = ""; + pushTitle_ = ""; + pushAlert_ = ""; + pushJump_ = ""; + pushBadge_ = 0; + pushSound_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImPtcPushRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteServer_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + pushTitle_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pushAlert_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + pushJump_ = s; + break; + } + case 40: { + + pushBadge_ = input.readInt32(); + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + pushSound_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.client.ImPtcPushProto.internal_static_platform_ImPtcPushRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.client.ImPtcPushProto.internal_static_platform_ImPtcPushRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest.class, com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest.Builder.class); + } + + public static final int SITE_SERVER_FIELD_NUMBER = 1; + private volatile java.lang.Object siteServer_; + /** + *
+     *站点服务demo.akaxin.com:2021
+     * 
+ * + * string site_server = 1; + */ + public java.lang.String getSiteServer() { + java.lang.Object ref = siteServer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteServer_ = s; + return s; + } + } + /** + *
+     *站点服务demo.akaxin.com:2021
+     * 
+ * + * string site_server = 1; + */ + public com.google.protobuf.ByteString + getSiteServerBytes() { + java.lang.Object ref = siteServer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteServer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUSH_TITLE_FIELD_NUMBER = 2; + private volatile java.lang.Object pushTitle_; + /** + *
+     *展示的title
+     * 
+ * + * string push_title = 2; + */ + public java.lang.String getPushTitle() { + java.lang.Object ref = pushTitle_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushTitle_ = s; + return s; + } + } + /** + *
+     *展示的title
+     * 
+ * + * string push_title = 2; + */ + public com.google.protobuf.ByteString + getPushTitleBytes() { + java.lang.Object ref = pushTitle_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushTitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUSH_ALERT_FIELD_NUMBER = 3; + private volatile java.lang.Object pushAlert_; + /** + *
+     *展示的文案
+     * 
+ * + * string push_alert = 3; + */ + public java.lang.String getPushAlert() { + java.lang.Object ref = pushAlert_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushAlert_ = s; + return s; + } + } + /** + *
+     *展示的文案
+     * 
+ * + * string push_alert = 3; + */ + public com.google.protobuf.ByteString + getPushAlertBytes() { + java.lang.Object ref = pushAlert_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushAlert_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUSH_JUMP_FIELD_NUMBER = 4; + private volatile java.lang.Object pushJump_; + /** + *
+     *Push跳转位置
+     * 
+ * + * string push_jump = 4; + */ + public java.lang.String getPushJump() { + java.lang.Object ref = pushJump_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushJump_ = s; + return s; + } + } + /** + *
+     *Push跳转位置
+     * 
+ * + * string push_jump = 4; + */ + public com.google.protobuf.ByteString + getPushJumpBytes() { + java.lang.Object ref = pushJump_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushJump_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUSH_BADGE_FIELD_NUMBER = 5; + private int pushBadge_; + /** + *
+     *气泡展示个数
+     * 
+ * + * int32 push_badge = 5; + */ + public int getPushBadge() { + return pushBadge_; + } + + public static final int PUSH_SOUND_FIELD_NUMBER = 6; + private volatile java.lang.Object pushSound_; + /** + *
+     *气泡声音
+     * 
+ * + * string push_sound = 6; + */ + public java.lang.String getPushSound() { + java.lang.Object ref = pushSound_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushSound_ = s; + return s; + } + } + /** + *
+     *气泡声音
+     * 
+ * + * string push_sound = 6; + */ + public com.google.protobuf.ByteString + getPushSoundBytes() { + java.lang.Object ref = pushSound_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushSound_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteServerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteServer_); + } + if (!getPushTitleBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pushTitle_); + } + if (!getPushAlertBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pushAlert_); + } + if (!getPushJumpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pushJump_); + } + if (pushBadge_ != 0) { + output.writeInt32(5, pushBadge_); + } + if (!getPushSoundBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pushSound_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteServerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteServer_); + } + if (!getPushTitleBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pushTitle_); + } + if (!getPushAlertBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pushAlert_); + } + if (!getPushJumpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pushJump_); + } + if (pushBadge_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, pushBadge_); + } + if (!getPushSoundBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pushSound_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest)) { + return super.equals(obj); + } + com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest other = (com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest) obj; + + boolean result = true; + result = result && getSiteServer() + .equals(other.getSiteServer()); + result = result && getPushTitle() + .equals(other.getPushTitle()); + result = result && getPushAlert() + .equals(other.getPushAlert()); + result = result && getPushJump() + .equals(other.getPushJump()); + result = result && (getPushBadge() + == other.getPushBadge()); + result = result && getPushSound() + .equals(other.getPushSound()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getSiteServer().hashCode(); + hash = (37 * hash) + PUSH_TITLE_FIELD_NUMBER; + hash = (53 * hash) + getPushTitle().hashCode(); + hash = (37 * hash) + PUSH_ALERT_FIELD_NUMBER; + hash = (53 * hash) + getPushAlert().hashCode(); + hash = (37 * hash) + PUSH_JUMP_FIELD_NUMBER; + hash = (53 * hash) + getPushJump().hashCode(); + hash = (37 * hash) + PUSH_BADGE_FIELD_NUMBER; + hash = (53 * hash) + getPushBadge(); + hash = (37 * hash) + PUSH_SOUND_FIELD_NUMBER; + hash = (53 * hash) + getPushSound().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code platform.ImPtcPushRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:platform.ImPtcPushRequest) + com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.client.ImPtcPushProto.internal_static_platform_ImPtcPushRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.client.ImPtcPushProto.internal_static_platform_ImPtcPushRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest.class, com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest.Builder.class); + } + + // Construct using com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteServer_ = ""; + + pushTitle_ = ""; + + pushAlert_ = ""; + + pushJump_ = ""; + + pushBadge_ = 0; + + pushSound_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.client.ImPtcPushProto.internal_static_platform_ImPtcPushRequest_descriptor; + } + + public com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest getDefaultInstanceForType() { + return com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest.getDefaultInstance(); + } + + public com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest build() { + com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest buildPartial() { + com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest result = new com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest(this); + result.siteServer_ = siteServer_; + result.pushTitle_ = pushTitle_; + result.pushAlert_ = pushAlert_; + result.pushJump_ = pushJump_; + result.pushBadge_ = pushBadge_; + result.pushSound_ = pushSound_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest) { + return mergeFrom((com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest other) { + if (other == com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest.getDefaultInstance()) return this; + if (!other.getSiteServer().isEmpty()) { + siteServer_ = other.siteServer_; + onChanged(); + } + if (!other.getPushTitle().isEmpty()) { + pushTitle_ = other.pushTitle_; + onChanged(); + } + if (!other.getPushAlert().isEmpty()) { + pushAlert_ = other.pushAlert_; + onChanged(); + } + if (!other.getPushJump().isEmpty()) { + pushJump_ = other.pushJump_; + onChanged(); + } + if (other.getPushBadge() != 0) { + setPushBadge(other.getPushBadge()); + } + if (!other.getPushSound().isEmpty()) { + pushSound_ = other.pushSound_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteServer_ = ""; + /** + *
+       *站点服务demo.akaxin.com:2021
+       * 
+ * + * string site_server = 1; + */ + public java.lang.String getSiteServer() { + java.lang.Object ref = siteServer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteServer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *站点服务demo.akaxin.com:2021
+       * 
+ * + * string site_server = 1; + */ + public com.google.protobuf.ByteString + getSiteServerBytes() { + java.lang.Object ref = siteServer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteServer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *站点服务demo.akaxin.com:2021
+       * 
+ * + * string site_server = 1; + */ + public Builder setSiteServer( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteServer_ = value; + onChanged(); + return this; + } + /** + *
+       *站点服务demo.akaxin.com:2021
+       * 
+ * + * string site_server = 1; + */ + public Builder clearSiteServer() { + + siteServer_ = getDefaultInstance().getSiteServer(); + onChanged(); + return this; + } + /** + *
+       *站点服务demo.akaxin.com:2021
+       * 
+ * + * string site_server = 1; + */ + public Builder setSiteServerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteServer_ = value; + onChanged(); + return this; + } + + private java.lang.Object pushTitle_ = ""; + /** + *
+       *展示的title
+       * 
+ * + * string push_title = 2; + */ + public java.lang.String getPushTitle() { + java.lang.Object ref = pushTitle_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushTitle_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *展示的title
+       * 
+ * + * string push_title = 2; + */ + public com.google.protobuf.ByteString + getPushTitleBytes() { + java.lang.Object ref = pushTitle_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushTitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *展示的title
+       * 
+ * + * string push_title = 2; + */ + public Builder setPushTitle( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pushTitle_ = value; + onChanged(); + return this; + } + /** + *
+       *展示的title
+       * 
+ * + * string push_title = 2; + */ + public Builder clearPushTitle() { + + pushTitle_ = getDefaultInstance().getPushTitle(); + onChanged(); + return this; + } + /** + *
+       *展示的title
+       * 
+ * + * string push_title = 2; + */ + public Builder setPushTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pushTitle_ = value; + onChanged(); + return this; + } + + private java.lang.Object pushAlert_ = ""; + /** + *
+       *展示的文案
+       * 
+ * + * string push_alert = 3; + */ + public java.lang.String getPushAlert() { + java.lang.Object ref = pushAlert_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushAlert_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *展示的文案
+       * 
+ * + * string push_alert = 3; + */ + public com.google.protobuf.ByteString + getPushAlertBytes() { + java.lang.Object ref = pushAlert_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushAlert_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *展示的文案
+       * 
+ * + * string push_alert = 3; + */ + public Builder setPushAlert( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pushAlert_ = value; + onChanged(); + return this; + } + /** + *
+       *展示的文案
+       * 
+ * + * string push_alert = 3; + */ + public Builder clearPushAlert() { + + pushAlert_ = getDefaultInstance().getPushAlert(); + onChanged(); + return this; + } + /** + *
+       *展示的文案
+       * 
+ * + * string push_alert = 3; + */ + public Builder setPushAlertBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pushAlert_ = value; + onChanged(); + return this; + } + + private java.lang.Object pushJump_ = ""; + /** + *
+       *Push跳转位置
+       * 
+ * + * string push_jump = 4; + */ + public java.lang.String getPushJump() { + java.lang.Object ref = pushJump_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushJump_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *Push跳转位置
+       * 
+ * + * string push_jump = 4; + */ + public com.google.protobuf.ByteString + getPushJumpBytes() { + java.lang.Object ref = pushJump_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushJump_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *Push跳转位置
+       * 
+ * + * string push_jump = 4; + */ + public Builder setPushJump( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pushJump_ = value; + onChanged(); + return this; + } + /** + *
+       *Push跳转位置
+       * 
+ * + * string push_jump = 4; + */ + public Builder clearPushJump() { + + pushJump_ = getDefaultInstance().getPushJump(); + onChanged(); + return this; + } + /** + *
+       *Push跳转位置
+       * 
+ * + * string push_jump = 4; + */ + public Builder setPushJumpBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pushJump_ = value; + onChanged(); + return this; + } + + private int pushBadge_ ; + /** + *
+       *气泡展示个数
+       * 
+ * + * int32 push_badge = 5; + */ + public int getPushBadge() { + return pushBadge_; + } + /** + *
+       *气泡展示个数
+       * 
+ * + * int32 push_badge = 5; + */ + public Builder setPushBadge(int value) { + + pushBadge_ = value; + onChanged(); + return this; + } + /** + *
+       *气泡展示个数
+       * 
+ * + * int32 push_badge = 5; + */ + public Builder clearPushBadge() { + + pushBadge_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pushSound_ = ""; + /** + *
+       *气泡声音
+       * 
+ * + * string push_sound = 6; + */ + public java.lang.String getPushSound() { + java.lang.Object ref = pushSound_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushSound_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *气泡声音
+       * 
+ * + * string push_sound = 6; + */ + public com.google.protobuf.ByteString + getPushSoundBytes() { + java.lang.Object ref = pushSound_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushSound_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *气泡声音
+       * 
+ * + * string push_sound = 6; + */ + public Builder setPushSound( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pushSound_ = value; + onChanged(); + return this; + } + /** + *
+       *气泡声音
+       * 
+ * + * string push_sound = 6; + */ + public Builder clearPushSound() { + + pushSound_ = getDefaultInstance().getPushSound(); + onChanged(); + return this; + } + /** + *
+       *气泡声音
+       * 
+ * + * string push_sound = 6; + */ + public Builder setPushSoundBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pushSound_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:platform.ImPtcPushRequest) + } + + // @@protoc_insertion_point(class_scope:platform.ImPtcPushRequest) + private static final com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest(); + } + + public static com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImPtcPushRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImPtcPushRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.client.ImPtcPushProto.ImPtcPushRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_platform_ImPtcPushRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_platform_ImPtcPushRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\030client/im_ptc_push.proto\022\010platform\032\017co" + + "re/core.proto\"\212\001\n\020ImPtcPushRequest\022\023\n\013si" + + "te_server\030\001 \001(\t\022\022\n\npush_title\030\002 \001(\t\022\022\n\np" + + "ush_alert\030\003 \001(\t\022\021\n\tpush_jump\030\004 \001(\t\022\022\n\npu" + + "sh_badge\030\005 \001(\005\022\022\n\npush_sound\030\006 \001(\t2J\n\020Im" + + "PtcPushService\0226\n\004push\022\032.platform.ImPtcP" + + "ushRequest\032\022.core.NoneResponseB)\n\027com.ak" + + "axin.proto.clientB\016ImPtcPushProtob\006proto" + + "3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.CoreProto.getDescriptor(), + }, assigner); + internal_static_platform_ImPtcPushRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_platform_ImPtcPushRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_platform_ImPtcPushRequest_descriptor, + new java.lang.String[] { "SiteServer", "PushTitle", "PushAlert", "PushJump", "PushBadge", "PushSound", }); + com.akaxin.proto.core.CoreProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImStcMessageProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImStcMessageProto.java new file mode 100755 index 0000000..5ed83ef --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImStcMessageProto.java @@ -0,0 +1,8307 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: client/im_stc_message.proto + +package com.akaxin.proto.client; + +public final class ImStcMessageProto { + private ImStcMessageProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ImStcMessageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:client.ImStcMessageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *客户端接受的消息列表
+     * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + java.util.List + getListList(); + /** + *
+     *客户端接受的消息列表
+     * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer getList(int index); + /** + *
+     *客户端接受的消息列表
+     * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + int getListCount(); + /** + *
+     *客户端接受的消息列表
+     * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + java.util.List + getListOrBuilderList(); + /** + *
+     *客户端接受的消息列表
+     * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + com.akaxin.proto.client.ImStcMessageProto.MsgWithPointerOrBuilder getListOrBuilder( + int index); + } + /** + * Protobuf type {@code client.ImStcMessageRequest} + */ + public static final class ImStcMessageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:client.ImStcMessageRequest) + ImStcMessageRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImStcMessageRequest.newBuilder() to construct. + private ImStcMessageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImStcMessageRequest() { + list_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImStcMessageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + list_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + list_.add( + input.readMessage(com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + list_ = java.util.Collections.unmodifiableList(list_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.client.ImStcMessageProto.internal_static_client_ImStcMessageRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.client.ImStcMessageProto.internal_static_client_ImStcMessageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest.class, com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest.Builder.class); + } + + public static final int LIST_FIELD_NUMBER = 1; + private java.util.List list_; + /** + *
+     *客户端接受的消息列表
+     * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public java.util.List getListList() { + return list_; + } + /** + *
+     *客户端接受的消息列表
+     * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public java.util.List + getListOrBuilderList() { + return list_; + } + /** + *
+     *客户端接受的消息列表
+     * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public int getListCount() { + return list_.size(); + } + /** + *
+     *客户端接受的消息列表
+     * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer getList(int index) { + return list_.get(index); + } + /** + *
+     *客户端接受的消息列表
+     * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public com.akaxin.proto.client.ImStcMessageProto.MsgWithPointerOrBuilder getListOrBuilder( + int index) { + return list_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < list_.size(); i++) { + output.writeMessage(1, list_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < list_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, list_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest)) { + return super.equals(obj); + } + com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest other = (com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest) obj; + + boolean result = true; + result = result && getListList() + .equals(other.getListList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getListCount() > 0) { + hash = (37 * hash) + LIST_FIELD_NUMBER; + hash = (53 * hash) + getListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code client.ImStcMessageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:client.ImStcMessageRequest) + com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.client.ImStcMessageProto.internal_static_client_ImStcMessageRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.client.ImStcMessageProto.internal_static_client_ImStcMessageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest.class, com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest.Builder.class); + } + + // Construct using com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getListFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (listBuilder_ == null) { + list_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + listBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.client.ImStcMessageProto.internal_static_client_ImStcMessageRequest_descriptor; + } + + public com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest getDefaultInstanceForType() { + return com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest.getDefaultInstance(); + } + + public com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest build() { + com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest buildPartial() { + com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest result = new com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest(this); + int from_bitField0_ = bitField0_; + if (listBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + list_ = java.util.Collections.unmodifiableList(list_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.list_ = list_; + } else { + result.list_ = listBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest) { + return mergeFrom((com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest other) { + if (other == com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest.getDefaultInstance()) return this; + if (listBuilder_ == null) { + if (!other.list_.isEmpty()) { + if (list_.isEmpty()) { + list_ = other.list_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureListIsMutable(); + list_.addAll(other.list_); + } + onChanged(); + } + } else { + if (!other.list_.isEmpty()) { + if (listBuilder_.isEmpty()) { + listBuilder_.dispose(); + listBuilder_ = null; + list_ = other.list_; + bitField0_ = (bitField0_ & ~0x00000001); + listBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getListFieldBuilder() : null; + } else { + listBuilder_.addAllMessages(other.list_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List list_ = + java.util.Collections.emptyList(); + private void ensureListIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + list_ = new java.util.ArrayList(list_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer, com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.Builder, com.akaxin.proto.client.ImStcMessageProto.MsgWithPointerOrBuilder> listBuilder_; + + /** + *
+       *客户端接受的消息列表
+       * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public java.util.List getListList() { + if (listBuilder_ == null) { + return java.util.Collections.unmodifiableList(list_); + } else { + return listBuilder_.getMessageList(); + } + } + /** + *
+       *客户端接受的消息列表
+       * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public int getListCount() { + if (listBuilder_ == null) { + return list_.size(); + } else { + return listBuilder_.getCount(); + } + } + /** + *
+       *客户端接受的消息列表
+       * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer getList(int index) { + if (listBuilder_ == null) { + return list_.get(index); + } else { + return listBuilder_.getMessage(index); + } + } + /** + *
+       *客户端接受的消息列表
+       * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public Builder setList( + int index, com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.set(index, value); + onChanged(); + } else { + listBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *客户端接受的消息列表
+       * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public Builder setList( + int index, com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.set(index, builderForValue.build()); + onChanged(); + } else { + listBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *客户端接受的消息列表
+       * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public Builder addList(com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.add(value); + onChanged(); + } else { + listBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *客户端接受的消息列表
+       * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public Builder addList( + int index, com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.add(index, value); + onChanged(); + } else { + listBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *客户端接受的消息列表
+       * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public Builder addList( + com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.add(builderForValue.build()); + onChanged(); + } else { + listBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *客户端接受的消息列表
+       * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public Builder addList( + int index, com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.add(index, builderForValue.build()); + onChanged(); + } else { + listBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *客户端接受的消息列表
+       * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public Builder addAllList( + java.lang.Iterable values) { + if (listBuilder_ == null) { + ensureListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, list_); + onChanged(); + } else { + listBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *客户端接受的消息列表
+       * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public Builder clearList() { + if (listBuilder_ == null) { + list_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + listBuilder_.clear(); + } + return this; + } + /** + *
+       *客户端接受的消息列表
+       * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public Builder removeList(int index) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.remove(index); + onChanged(); + } else { + listBuilder_.remove(index); + } + return this; + } + /** + *
+       *客户端接受的消息列表
+       * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.Builder getListBuilder( + int index) { + return getListFieldBuilder().getBuilder(index); + } + /** + *
+       *客户端接受的消息列表
+       * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public com.akaxin.proto.client.ImStcMessageProto.MsgWithPointerOrBuilder getListOrBuilder( + int index) { + if (listBuilder_ == null) { + return list_.get(index); } else { + return listBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *客户端接受的消息列表
+       * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public java.util.List + getListOrBuilderList() { + if (listBuilder_ != null) { + return listBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(list_); + } + } + /** + *
+       *客户端接受的消息列表
+       * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.Builder addListBuilder() { + return getListFieldBuilder().addBuilder( + com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.getDefaultInstance()); + } + /** + *
+       *客户端接受的消息列表
+       * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.Builder addListBuilder( + int index) { + return getListFieldBuilder().addBuilder( + index, com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.getDefaultInstance()); + } + /** + *
+       *客户端接受的消息列表
+       * 
+ * + * repeated .client.MsgWithPointer list = 1; + */ + public java.util.List + getListBuilderList() { + return getListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer, com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.Builder, com.akaxin.proto.client.ImStcMessageProto.MsgWithPointerOrBuilder> + getListFieldBuilder() { + if (listBuilder_ == null) { + listBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer, com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.Builder, com.akaxin.proto.client.ImStcMessageProto.MsgWithPointerOrBuilder>( + list_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + list_ = null; + } + return listBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:client.ImStcMessageRequest) + } + + // @@protoc_insertion_point(class_scope:client.ImStcMessageRequest) + private static final com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest(); + } + + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImStcMessageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImStcMessageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.client.ImStcMessageProto.ImStcMessageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MsgWithPointerOrBuilder extends + // @@protoc_insertion_point(interface_extends:client.MsgWithPointer) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *消息游标
+     * 
+ * + * int64 pointer = 1; + */ + long getPointer(); + + /** + *
+     *消息类型
+     * 
+ * + * .core.MsgType type = 2; + */ + int getTypeValue(); + /** + *
+     *消息类型
+     * 
+ * + * .core.MsgType type = 2; + */ + com.akaxin.proto.core.CoreProto.MsgType getType(); + + /** + *
+     *消息状态,是否已送达
+     * 
+ * + * .core.MsgStatus status = 3; + */ + boolean hasStatus(); + /** + *
+     *消息状态,是否已送达
+     * 
+ * + * .core.MsgStatus status = 3; + */ + com.akaxin.proto.core.CoreProto.MsgStatus getStatus(); + /** + *
+     *消息状态,是否已送达
+     * 
+ * + * .core.MsgStatus status = 3; + */ + com.akaxin.proto.core.CoreProto.MsgStatusOrBuilder getStatusOrBuilder(); + + /** + *
+     *二人文本消息
+     * 
+ * + * .core.MsgText text = 5; + */ + boolean hasText(); + /** + *
+     *二人文本消息
+     * 
+ * + * .core.MsgText text = 5; + */ + com.akaxin.proto.core.CoreProto.MsgText getText(); + /** + *
+     *二人文本消息
+     * 
+ * + * .core.MsgText text = 5; + */ + com.akaxin.proto.core.CoreProto.MsgTextOrBuilder getTextOrBuilder(); + + /** + *
+     *二人加密文本消息
+     * 
+ * + * .core.MsgSecretText secretText = 6; + */ + boolean hasSecretText(); + /** + *
+     *二人加密文本消息
+     * 
+ * + * .core.MsgSecretText secretText = 6; + */ + com.akaxin.proto.core.CoreProto.MsgSecretText getSecretText(); + /** + *
+     *二人加密文本消息
+     * 
+ * + * .core.MsgSecretText secretText = 6; + */ + com.akaxin.proto.core.CoreProto.MsgSecretTextOrBuilder getSecretTextOrBuilder(); + + /** + *
+     *群文本消息
+     * 
+ * + * .core.GroupText groupText = 7; + */ + boolean hasGroupText(); + /** + *
+     *群文本消息
+     * 
+ * + * .core.GroupText groupText = 7; + */ + com.akaxin.proto.core.CoreProto.GroupText getGroupText(); + /** + *
+     *群文本消息
+     * 
+ * + * .core.GroupText groupText = 7; + */ + com.akaxin.proto.core.CoreProto.GroupTextOrBuilder getGroupTextOrBuilder(); + + /** + *
+     *加密群文本消息
+     * 
+ * + * .core.GroupSecretText groupSecretText = 8; + */ + boolean hasGroupSecretText(); + /** + *
+     *加密群文本消息
+     * 
+ * + * .core.GroupSecretText groupSecretText = 8; + */ + com.akaxin.proto.core.CoreProto.GroupSecretText getGroupSecretText(); + /** + *
+     *加密群文本消息
+     * 
+ * + * .core.GroupSecretText groupSecretText = 8; + */ + com.akaxin.proto.core.CoreProto.GroupSecretTextOrBuilder getGroupSecretTextOrBuilder(); + + /** + *
+     *二人图片消息
+     * 
+ * + * .core.MsgImage image = 9; + */ + boolean hasImage(); + /** + *
+     *二人图片消息
+     * 
+ * + * .core.MsgImage image = 9; + */ + com.akaxin.proto.core.CoreProto.MsgImage getImage(); + /** + *
+     *二人图片消息
+     * 
+ * + * .core.MsgImage image = 9; + */ + com.akaxin.proto.core.CoreProto.MsgImageOrBuilder getImageOrBuilder(); + + /** + *
+     *加密二人图片消息
+     * 
+ * + * .core.MsgSecretImage secretImage = 10; + */ + boolean hasSecretImage(); + /** + *
+     *加密二人图片消息
+     * 
+ * + * .core.MsgSecretImage secretImage = 10; + */ + com.akaxin.proto.core.CoreProto.MsgSecretImage getSecretImage(); + /** + *
+     *加密二人图片消息
+     * 
+ * + * .core.MsgSecretImage secretImage = 10; + */ + com.akaxin.proto.core.CoreProto.MsgSecretImageOrBuilder getSecretImageOrBuilder(); + + /** + *
+     *群图片消息
+     * 
+ * + * .core.GroupImage groupImage = 11; + */ + boolean hasGroupImage(); + /** + *
+     *群图片消息
+     * 
+ * + * .core.GroupImage groupImage = 11; + */ + com.akaxin.proto.core.CoreProto.GroupImage getGroupImage(); + /** + *
+     *群图片消息
+     * 
+ * + * .core.GroupImage groupImage = 11; + */ + com.akaxin.proto.core.CoreProto.GroupImageOrBuilder getGroupImageOrBuilder(); + + /** + *
+     *加密群图片消息
+     * 
+ * + * .core.GroupSecretImage groupSecretImage = 12; + */ + boolean hasGroupSecretImage(); + /** + *
+     *加密群图片消息
+     * 
+ * + * .core.GroupSecretImage groupSecretImage = 12; + */ + com.akaxin.proto.core.CoreProto.GroupSecretImage getGroupSecretImage(); + /** + *
+     *加密群图片消息
+     * 
+ * + * .core.GroupSecretImage groupSecretImage = 12; + */ + com.akaxin.proto.core.CoreProto.GroupSecretImageOrBuilder getGroupSecretImageOrBuilder(); + + /** + *
+     *二人语音消息
+     * 
+ * + * .core.MsgVoice voice = 13; + */ + boolean hasVoice(); + /** + *
+     *二人语音消息
+     * 
+ * + * .core.MsgVoice voice = 13; + */ + com.akaxin.proto.core.CoreProto.MsgVoice getVoice(); + /** + *
+     *二人语音消息
+     * 
+ * + * .core.MsgVoice voice = 13; + */ + com.akaxin.proto.core.CoreProto.MsgVoiceOrBuilder getVoiceOrBuilder(); + + /** + *
+     *加密二人语音消息
+     * 
+ * + * .core.MsgSecretVoice secretVoice = 14; + */ + boolean hasSecretVoice(); + /** + *
+     *加密二人语音消息
+     * 
+ * + * .core.MsgSecretVoice secretVoice = 14; + */ + com.akaxin.proto.core.CoreProto.MsgSecretVoice getSecretVoice(); + /** + *
+     *加密二人语音消息
+     * 
+ * + * .core.MsgSecretVoice secretVoice = 14; + */ + com.akaxin.proto.core.CoreProto.MsgSecretVoiceOrBuilder getSecretVoiceOrBuilder(); + + /** + *
+     *群语音消息
+     * 
+ * + * .core.GroupVoice groupVoice = 15; + */ + boolean hasGroupVoice(); + /** + *
+     *群语音消息
+     * 
+ * + * .core.GroupVoice groupVoice = 15; + */ + com.akaxin.proto.core.CoreProto.GroupVoice getGroupVoice(); + /** + *
+     *群语音消息
+     * 
+ * + * .core.GroupVoice groupVoice = 15; + */ + com.akaxin.proto.core.CoreProto.GroupVoiceOrBuilder getGroupVoiceOrBuilder(); + + /** + *
+     *群加密语音消息
+     * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 16; + */ + boolean hasGroupSecretVoice(); + /** + *
+     *群加密语音消息
+     * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 16; + */ + com.akaxin.proto.core.CoreProto.GroupSecretVoice getGroupSecretVoice(); + /** + *
+     *群加密语音消息
+     * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 16; + */ + com.akaxin.proto.core.CoreProto.GroupSecretVoiceOrBuilder getGroupSecretVoiceOrBuilder(); + + /** + *
+     *v0.4.3 版本未使用
+     * 
+ * + * .core.U2Map u2Map = 17; + */ + boolean hasU2Map(); + /** + *
+     *v0.4.3 版本未使用
+     * 
+ * + * .core.U2Map u2Map = 17; + */ + com.akaxin.proto.core.CoreProto.U2Map getU2Map(); + /** + *
+     *v0.4.3 版本未使用
+     * 
+ * + * .core.U2Map u2Map = 17; + */ + com.akaxin.proto.core.CoreProto.U2MapOrBuilder getU2MapOrBuilder(); + + /** + *
+     *加密地图消息
+     * 
+ * + * .core.U2SecretMap u2SecretMap = 18; + */ + boolean hasU2SecretMap(); + /** + *
+     *加密地图消息
+     * 
+ * + * .core.U2SecretMap u2SecretMap = 18; + */ + com.akaxin.proto.core.CoreProto.U2SecretMap getU2SecretMap(); + /** + *
+     *加密地图消息
+     * 
+ * + * .core.U2SecretMap u2SecretMap = 18; + */ + com.akaxin.proto.core.CoreProto.U2SecretMapOrBuilder getU2SecretMapOrBuilder(); + + /** + *
+     *群地图
+     * 
+ * + * .core.GroupMap groupMap = 19; + */ + boolean hasGroupMap(); + /** + *
+     *群地图
+     * 
+ * + * .core.GroupMap groupMap = 19; + */ + com.akaxin.proto.core.CoreProto.GroupMap getGroupMap(); + /** + *
+     *群地图
+     * 
+ * + * .core.GroupMap groupMap = 19; + */ + com.akaxin.proto.core.CoreProto.GroupMapOrBuilder getGroupMapOrBuilder(); + + /** + *
+     *群加密地图
+     * 
+ * + * .core.GroupSecretMap groupSecretMap = 20; + */ + boolean hasGroupSecretMap(); + /** + *
+     *群加密地图
+     * 
+ * + * .core.GroupSecretMap groupSecretMap = 20; + */ + com.akaxin.proto.core.CoreProto.GroupSecretMap getGroupSecretMap(); + /** + *
+     *群加密地图
+     * 
+ * + * .core.GroupSecretMap groupSecretMap = 20; + */ + com.akaxin.proto.core.CoreProto.GroupSecretMapOrBuilder getGroupSecretMapOrBuilder(); + + /** + *
+     *二人消息通知
+     * 
+ * + * .core.U2MsgNotice u2MsgNotice = 21; + */ + boolean hasU2MsgNotice(); + /** + *
+     *二人消息通知
+     * 
+ * + * .core.U2MsgNotice u2MsgNotice = 21; + */ + com.akaxin.proto.core.CoreProto.U2MsgNotice getU2MsgNotice(); + /** + *
+     *二人消息通知
+     * 
+ * + * .core.U2MsgNotice u2MsgNotice = 21; + */ + com.akaxin.proto.core.CoreProto.U2MsgNoticeOrBuilder getU2MsgNoticeOrBuilder(); + + /** + *
+     *群消息通知
+     * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 22; + */ + boolean hasGroupMsgNotice(); + /** + *
+     *群消息通知
+     * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 22; + */ + com.akaxin.proto.core.CoreProto.GroupMsgNotice getGroupMsgNotice(); + /** + *
+     *群消息通知
+     * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 22; + */ + com.akaxin.proto.core.CoreProto.GroupMsgNoticeOrBuilder getGroupMsgNoticeOrBuilder(); + + /** + *
+     *二人召回消息
+     * 
+ * + * .core.U2Recall u2Recall = 23; + */ + boolean hasU2Recall(); + /** + *
+     *二人召回消息
+     * 
+ * + * .core.U2Recall u2Recall = 23; + */ + com.akaxin.proto.core.CoreProto.U2Recall getU2Recall(); + /** + *
+     *二人召回消息
+     * 
+ * + * .core.U2Recall u2Recall = 23; + */ + com.akaxin.proto.core.CoreProto.U2RecallOrBuilder getU2RecallOrBuilder(); + + /** + *
+     *群组召回消息
+     * 
+ * + * .core.GroupRecall groupRecall = 24; + */ + boolean hasGroupRecall(); + /** + *
+     *群组召回消息
+     * 
+ * + * .core.GroupRecall groupRecall = 24; + */ + com.akaxin.proto.core.CoreProto.GroupRecall getGroupRecall(); + /** + *
+     *群组召回消息
+     * 
+ * + * .core.GroupRecall groupRecall = 24; + */ + com.akaxin.proto.core.CoreProto.GroupRecallOrBuilder getGroupRecallOrBuilder(); + + /** + *
+     *为人Web消息
+     * 
+ * + * .core.U2Web u2Web = 25; + */ + boolean hasU2Web(); + /** + *
+     *为人Web消息
+     * 
+ * + * .core.U2Web u2Web = 25; + */ + com.akaxin.proto.core.CoreProto.U2Web getU2Web(); + /** + *
+     *为人Web消息
+     * 
+ * + * .core.U2Web u2Web = 25; + */ + com.akaxin.proto.core.CoreProto.U2WebOrBuilder getU2WebOrBuilder(); + + /** + *
+     *群组web消息
+     * 
+ * + * .core.GroupWeb groupWeb = 26; + */ + boolean hasGroupWeb(); + /** + *
+     *群组web消息
+     * 
+ * + * .core.GroupWeb groupWeb = 26; + */ + com.akaxin.proto.core.CoreProto.GroupWeb getGroupWeb(); + /** + *
+     *群组web消息
+     * 
+ * + * .core.GroupWeb groupWeb = 26; + */ + com.akaxin.proto.core.CoreProto.GroupWebOrBuilder getGroupWebOrBuilder(); + + /** + *
+     *二人web通知消息
+     * 
+ * + * .core.U2WebNotice u2WebNotice = 27; + */ + boolean hasU2WebNotice(); + /** + *
+     *二人web通知消息
+     * 
+ * + * .core.U2WebNotice u2WebNotice = 27; + */ + com.akaxin.proto.core.CoreProto.U2WebNotice getU2WebNotice(); + /** + *
+     *二人web通知消息
+     * 
+ * + * .core.U2WebNotice u2WebNotice = 27; + */ + com.akaxin.proto.core.CoreProto.U2WebNoticeOrBuilder getU2WebNoticeOrBuilder(); + + /** + *
+     *群组web通知消息
+     * 
+ * + * .core.GroupWebNotice groupWebNotice = 28; + */ + boolean hasGroupWebNotice(); + /** + *
+     *群组web通知消息
+     * 
+ * + * .core.GroupWebNotice groupWebNotice = 28; + */ + com.akaxin.proto.core.CoreProto.GroupWebNotice getGroupWebNotice(); + /** + *
+     *群组web通知消息
+     * 
+ * + * .core.GroupWebNotice groupWebNotice = 28; + */ + com.akaxin.proto.core.CoreProto.GroupWebNoticeOrBuilder getGroupWebNoticeOrBuilder(); + } + /** + * Protobuf type {@code client.MsgWithPointer} + */ + public static final class MsgWithPointer extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:client.MsgWithPointer) + MsgWithPointerOrBuilder { + private static final long serialVersionUID = 0L; + // Use MsgWithPointer.newBuilder() to construct. + private MsgWithPointer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MsgWithPointer() { + pointer_ = 0L; + type_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MsgWithPointer( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + pointer_ = input.readInt64(); + break; + } + case 16: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 26: { + com.akaxin.proto.core.CoreProto.MsgStatus.Builder subBuilder = null; + if (status_ != null) { + subBuilder = status_.toBuilder(); + } + status_ = input.readMessage(com.akaxin.proto.core.CoreProto.MsgStatus.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(status_); + status_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + com.akaxin.proto.core.CoreProto.MsgText.Builder subBuilder = null; + if (text_ != null) { + subBuilder = text_.toBuilder(); + } + text_ = input.readMessage(com.akaxin.proto.core.CoreProto.MsgText.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(text_); + text_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.akaxin.proto.core.CoreProto.MsgSecretText.Builder subBuilder = null; + if (secretText_ != null) { + subBuilder = secretText_.toBuilder(); + } + secretText_ = input.readMessage(com.akaxin.proto.core.CoreProto.MsgSecretText.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(secretText_); + secretText_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + com.akaxin.proto.core.CoreProto.GroupText.Builder subBuilder = null; + if (groupText_ != null) { + subBuilder = groupText_.toBuilder(); + } + groupText_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupText.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupText_); + groupText_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + com.akaxin.proto.core.CoreProto.GroupSecretText.Builder subBuilder = null; + if (groupSecretText_ != null) { + subBuilder = groupSecretText_.toBuilder(); + } + groupSecretText_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupSecretText.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupSecretText_); + groupSecretText_ = subBuilder.buildPartial(); + } + + break; + } + case 74: { + com.akaxin.proto.core.CoreProto.MsgImage.Builder subBuilder = null; + if (image_ != null) { + subBuilder = image_.toBuilder(); + } + image_ = input.readMessage(com.akaxin.proto.core.CoreProto.MsgImage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(image_); + image_ = subBuilder.buildPartial(); + } + + break; + } + case 82: { + com.akaxin.proto.core.CoreProto.MsgSecretImage.Builder subBuilder = null; + if (secretImage_ != null) { + subBuilder = secretImage_.toBuilder(); + } + secretImage_ = input.readMessage(com.akaxin.proto.core.CoreProto.MsgSecretImage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(secretImage_); + secretImage_ = subBuilder.buildPartial(); + } + + break; + } + case 90: { + com.akaxin.proto.core.CoreProto.GroupImage.Builder subBuilder = null; + if (groupImage_ != null) { + subBuilder = groupImage_.toBuilder(); + } + groupImage_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupImage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupImage_); + groupImage_ = subBuilder.buildPartial(); + } + + break; + } + case 98: { + com.akaxin.proto.core.CoreProto.GroupSecretImage.Builder subBuilder = null; + if (groupSecretImage_ != null) { + subBuilder = groupSecretImage_.toBuilder(); + } + groupSecretImage_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupSecretImage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupSecretImage_); + groupSecretImage_ = subBuilder.buildPartial(); + } + + break; + } + case 106: { + com.akaxin.proto.core.CoreProto.MsgVoice.Builder subBuilder = null; + if (voice_ != null) { + subBuilder = voice_.toBuilder(); + } + voice_ = input.readMessage(com.akaxin.proto.core.CoreProto.MsgVoice.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(voice_); + voice_ = subBuilder.buildPartial(); + } + + break; + } + case 114: { + com.akaxin.proto.core.CoreProto.MsgSecretVoice.Builder subBuilder = null; + if (secretVoice_ != null) { + subBuilder = secretVoice_.toBuilder(); + } + secretVoice_ = input.readMessage(com.akaxin.proto.core.CoreProto.MsgSecretVoice.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(secretVoice_); + secretVoice_ = subBuilder.buildPartial(); + } + + break; + } + case 122: { + com.akaxin.proto.core.CoreProto.GroupVoice.Builder subBuilder = null; + if (groupVoice_ != null) { + subBuilder = groupVoice_.toBuilder(); + } + groupVoice_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupVoice.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupVoice_); + groupVoice_ = subBuilder.buildPartial(); + } + + break; + } + case 130: { + com.akaxin.proto.core.CoreProto.GroupSecretVoice.Builder subBuilder = null; + if (groupSecretVoice_ != null) { + subBuilder = groupSecretVoice_.toBuilder(); + } + groupSecretVoice_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupSecretVoice.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupSecretVoice_); + groupSecretVoice_ = subBuilder.buildPartial(); + } + + break; + } + case 138: { + com.akaxin.proto.core.CoreProto.U2Map.Builder subBuilder = null; + if (u2Map_ != null) { + subBuilder = u2Map_.toBuilder(); + } + u2Map_ = input.readMessage(com.akaxin.proto.core.CoreProto.U2Map.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(u2Map_); + u2Map_ = subBuilder.buildPartial(); + } + + break; + } + case 146: { + com.akaxin.proto.core.CoreProto.U2SecretMap.Builder subBuilder = null; + if (u2SecretMap_ != null) { + subBuilder = u2SecretMap_.toBuilder(); + } + u2SecretMap_ = input.readMessage(com.akaxin.proto.core.CoreProto.U2SecretMap.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(u2SecretMap_); + u2SecretMap_ = subBuilder.buildPartial(); + } + + break; + } + case 154: { + com.akaxin.proto.core.CoreProto.GroupMap.Builder subBuilder = null; + if (groupMap_ != null) { + subBuilder = groupMap_.toBuilder(); + } + groupMap_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupMap.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupMap_); + groupMap_ = subBuilder.buildPartial(); + } + + break; + } + case 162: { + com.akaxin.proto.core.CoreProto.GroupSecretMap.Builder subBuilder = null; + if (groupSecretMap_ != null) { + subBuilder = groupSecretMap_.toBuilder(); + } + groupSecretMap_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupSecretMap.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupSecretMap_); + groupSecretMap_ = subBuilder.buildPartial(); + } + + break; + } + case 170: { + com.akaxin.proto.core.CoreProto.U2MsgNotice.Builder subBuilder = null; + if (u2MsgNotice_ != null) { + subBuilder = u2MsgNotice_.toBuilder(); + } + u2MsgNotice_ = input.readMessage(com.akaxin.proto.core.CoreProto.U2MsgNotice.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(u2MsgNotice_); + u2MsgNotice_ = subBuilder.buildPartial(); + } + + break; + } + case 178: { + com.akaxin.proto.core.CoreProto.GroupMsgNotice.Builder subBuilder = null; + if (groupMsgNotice_ != null) { + subBuilder = groupMsgNotice_.toBuilder(); + } + groupMsgNotice_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupMsgNotice.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupMsgNotice_); + groupMsgNotice_ = subBuilder.buildPartial(); + } + + break; + } + case 186: { + com.akaxin.proto.core.CoreProto.U2Recall.Builder subBuilder = null; + if (u2Recall_ != null) { + subBuilder = u2Recall_.toBuilder(); + } + u2Recall_ = input.readMessage(com.akaxin.proto.core.CoreProto.U2Recall.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(u2Recall_); + u2Recall_ = subBuilder.buildPartial(); + } + + break; + } + case 194: { + com.akaxin.proto.core.CoreProto.GroupRecall.Builder subBuilder = null; + if (groupRecall_ != null) { + subBuilder = groupRecall_.toBuilder(); + } + groupRecall_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupRecall.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupRecall_); + groupRecall_ = subBuilder.buildPartial(); + } + + break; + } + case 202: { + com.akaxin.proto.core.CoreProto.U2Web.Builder subBuilder = null; + if (u2Web_ != null) { + subBuilder = u2Web_.toBuilder(); + } + u2Web_ = input.readMessage(com.akaxin.proto.core.CoreProto.U2Web.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(u2Web_); + u2Web_ = subBuilder.buildPartial(); + } + + break; + } + case 210: { + com.akaxin.proto.core.CoreProto.GroupWeb.Builder subBuilder = null; + if (groupWeb_ != null) { + subBuilder = groupWeb_.toBuilder(); + } + groupWeb_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupWeb.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupWeb_); + groupWeb_ = subBuilder.buildPartial(); + } + + break; + } + case 218: { + com.akaxin.proto.core.CoreProto.U2WebNotice.Builder subBuilder = null; + if (u2WebNotice_ != null) { + subBuilder = u2WebNotice_.toBuilder(); + } + u2WebNotice_ = input.readMessage(com.akaxin.proto.core.CoreProto.U2WebNotice.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(u2WebNotice_); + u2WebNotice_ = subBuilder.buildPartial(); + } + + break; + } + case 226: { + com.akaxin.proto.core.CoreProto.GroupWebNotice.Builder subBuilder = null; + if (groupWebNotice_ != null) { + subBuilder = groupWebNotice_.toBuilder(); + } + groupWebNotice_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupWebNotice.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupWebNotice_); + groupWebNotice_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.client.ImStcMessageProto.internal_static_client_MsgWithPointer_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.client.ImStcMessageProto.internal_static_client_MsgWithPointer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.class, com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.Builder.class); + } + + public static final int POINTER_FIELD_NUMBER = 1; + private long pointer_; + /** + *
+     *消息游标
+     * 
+ * + * int64 pointer = 1; + */ + public long getPointer() { + return pointer_; + } + + public static final int TYPE_FIELD_NUMBER = 2; + private int type_; + /** + *
+     *消息类型
+     * 
+ * + * .core.MsgType type = 2; + */ + public int getTypeValue() { + return type_; + } + /** + *
+     *消息类型
+     * 
+ * + * .core.MsgType type = 2; + */ + public com.akaxin.proto.core.CoreProto.MsgType getType() { + com.akaxin.proto.core.CoreProto.MsgType result = com.akaxin.proto.core.CoreProto.MsgType.valueOf(type_); + return result == null ? com.akaxin.proto.core.CoreProto.MsgType.UNRECOGNIZED : result; + } + + public static final int STATUS_FIELD_NUMBER = 3; + private com.akaxin.proto.core.CoreProto.MsgStatus status_; + /** + *
+     *消息状态,是否已送达
+     * 
+ * + * .core.MsgStatus status = 3; + */ + public boolean hasStatus() { + return status_ != null; + } + /** + *
+     *消息状态,是否已送达
+     * 
+ * + * .core.MsgStatus status = 3; + */ + public com.akaxin.proto.core.CoreProto.MsgStatus getStatus() { + return status_ == null ? com.akaxin.proto.core.CoreProto.MsgStatus.getDefaultInstance() : status_; + } + /** + *
+     *消息状态,是否已送达
+     * 
+ * + * .core.MsgStatus status = 3; + */ + public com.akaxin.proto.core.CoreProto.MsgStatusOrBuilder getStatusOrBuilder() { + return getStatus(); + } + + public static final int TEXT_FIELD_NUMBER = 5; + private com.akaxin.proto.core.CoreProto.MsgText text_; + /** + *
+     *二人文本消息
+     * 
+ * + * .core.MsgText text = 5; + */ + public boolean hasText() { + return text_ != null; + } + /** + *
+     *二人文本消息
+     * 
+ * + * .core.MsgText text = 5; + */ + public com.akaxin.proto.core.CoreProto.MsgText getText() { + return text_ == null ? com.akaxin.proto.core.CoreProto.MsgText.getDefaultInstance() : text_; + } + /** + *
+     *二人文本消息
+     * 
+ * + * .core.MsgText text = 5; + */ + public com.akaxin.proto.core.CoreProto.MsgTextOrBuilder getTextOrBuilder() { + return getText(); + } + + public static final int SECRETTEXT_FIELD_NUMBER = 6; + private com.akaxin.proto.core.CoreProto.MsgSecretText secretText_; + /** + *
+     *二人加密文本消息
+     * 
+ * + * .core.MsgSecretText secretText = 6; + */ + public boolean hasSecretText() { + return secretText_ != null; + } + /** + *
+     *二人加密文本消息
+     * 
+ * + * .core.MsgSecretText secretText = 6; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretText getSecretText() { + return secretText_ == null ? com.akaxin.proto.core.CoreProto.MsgSecretText.getDefaultInstance() : secretText_; + } + /** + *
+     *二人加密文本消息
+     * 
+ * + * .core.MsgSecretText secretText = 6; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretTextOrBuilder getSecretTextOrBuilder() { + return getSecretText(); + } + + public static final int GROUPTEXT_FIELD_NUMBER = 7; + private com.akaxin.proto.core.CoreProto.GroupText groupText_; + /** + *
+     *群文本消息
+     * 
+ * + * .core.GroupText groupText = 7; + */ + public boolean hasGroupText() { + return groupText_ != null; + } + /** + *
+     *群文本消息
+     * 
+ * + * .core.GroupText groupText = 7; + */ + public com.akaxin.proto.core.CoreProto.GroupText getGroupText() { + return groupText_ == null ? com.akaxin.proto.core.CoreProto.GroupText.getDefaultInstance() : groupText_; + } + /** + *
+     *群文本消息
+     * 
+ * + * .core.GroupText groupText = 7; + */ + public com.akaxin.proto.core.CoreProto.GroupTextOrBuilder getGroupTextOrBuilder() { + return getGroupText(); + } + + public static final int GROUPSECRETTEXT_FIELD_NUMBER = 8; + private com.akaxin.proto.core.CoreProto.GroupSecretText groupSecretText_; + /** + *
+     *加密群文本消息
+     * 
+ * + * .core.GroupSecretText groupSecretText = 8; + */ + public boolean hasGroupSecretText() { + return groupSecretText_ != null; + } + /** + *
+     *加密群文本消息
+     * 
+ * + * .core.GroupSecretText groupSecretText = 8; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretText getGroupSecretText() { + return groupSecretText_ == null ? com.akaxin.proto.core.CoreProto.GroupSecretText.getDefaultInstance() : groupSecretText_; + } + /** + *
+     *加密群文本消息
+     * 
+ * + * .core.GroupSecretText groupSecretText = 8; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretTextOrBuilder getGroupSecretTextOrBuilder() { + return getGroupSecretText(); + } + + public static final int IMAGE_FIELD_NUMBER = 9; + private com.akaxin.proto.core.CoreProto.MsgImage image_; + /** + *
+     *二人图片消息
+     * 
+ * + * .core.MsgImage image = 9; + */ + public boolean hasImage() { + return image_ != null; + } + /** + *
+     *二人图片消息
+     * 
+ * + * .core.MsgImage image = 9; + */ + public com.akaxin.proto.core.CoreProto.MsgImage getImage() { + return image_ == null ? com.akaxin.proto.core.CoreProto.MsgImage.getDefaultInstance() : image_; + } + /** + *
+     *二人图片消息
+     * 
+ * + * .core.MsgImage image = 9; + */ + public com.akaxin.proto.core.CoreProto.MsgImageOrBuilder getImageOrBuilder() { + return getImage(); + } + + public static final int SECRETIMAGE_FIELD_NUMBER = 10; + private com.akaxin.proto.core.CoreProto.MsgSecretImage secretImage_; + /** + *
+     *加密二人图片消息
+     * 
+ * + * .core.MsgSecretImage secretImage = 10; + */ + public boolean hasSecretImage() { + return secretImage_ != null; + } + /** + *
+     *加密二人图片消息
+     * 
+ * + * .core.MsgSecretImage secretImage = 10; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretImage getSecretImage() { + return secretImage_ == null ? com.akaxin.proto.core.CoreProto.MsgSecretImage.getDefaultInstance() : secretImage_; + } + /** + *
+     *加密二人图片消息
+     * 
+ * + * .core.MsgSecretImage secretImage = 10; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretImageOrBuilder getSecretImageOrBuilder() { + return getSecretImage(); + } + + public static final int GROUPIMAGE_FIELD_NUMBER = 11; + private com.akaxin.proto.core.CoreProto.GroupImage groupImage_; + /** + *
+     *群图片消息
+     * 
+ * + * .core.GroupImage groupImage = 11; + */ + public boolean hasGroupImage() { + return groupImage_ != null; + } + /** + *
+     *群图片消息
+     * 
+ * + * .core.GroupImage groupImage = 11; + */ + public com.akaxin.proto.core.CoreProto.GroupImage getGroupImage() { + return groupImage_ == null ? com.akaxin.proto.core.CoreProto.GroupImage.getDefaultInstance() : groupImage_; + } + /** + *
+     *群图片消息
+     * 
+ * + * .core.GroupImage groupImage = 11; + */ + public com.akaxin.proto.core.CoreProto.GroupImageOrBuilder getGroupImageOrBuilder() { + return getGroupImage(); + } + + public static final int GROUPSECRETIMAGE_FIELD_NUMBER = 12; + private com.akaxin.proto.core.CoreProto.GroupSecretImage groupSecretImage_; + /** + *
+     *加密群图片消息
+     * 
+ * + * .core.GroupSecretImage groupSecretImage = 12; + */ + public boolean hasGroupSecretImage() { + return groupSecretImage_ != null; + } + /** + *
+     *加密群图片消息
+     * 
+ * + * .core.GroupSecretImage groupSecretImage = 12; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretImage getGroupSecretImage() { + return groupSecretImage_ == null ? com.akaxin.proto.core.CoreProto.GroupSecretImage.getDefaultInstance() : groupSecretImage_; + } + /** + *
+     *加密群图片消息
+     * 
+ * + * .core.GroupSecretImage groupSecretImage = 12; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretImageOrBuilder getGroupSecretImageOrBuilder() { + return getGroupSecretImage(); + } + + public static final int VOICE_FIELD_NUMBER = 13; + private com.akaxin.proto.core.CoreProto.MsgVoice voice_; + /** + *
+     *二人语音消息
+     * 
+ * + * .core.MsgVoice voice = 13; + */ + public boolean hasVoice() { + return voice_ != null; + } + /** + *
+     *二人语音消息
+     * 
+ * + * .core.MsgVoice voice = 13; + */ + public com.akaxin.proto.core.CoreProto.MsgVoice getVoice() { + return voice_ == null ? com.akaxin.proto.core.CoreProto.MsgVoice.getDefaultInstance() : voice_; + } + /** + *
+     *二人语音消息
+     * 
+ * + * .core.MsgVoice voice = 13; + */ + public com.akaxin.proto.core.CoreProto.MsgVoiceOrBuilder getVoiceOrBuilder() { + return getVoice(); + } + + public static final int SECRETVOICE_FIELD_NUMBER = 14; + private com.akaxin.proto.core.CoreProto.MsgSecretVoice secretVoice_; + /** + *
+     *加密二人语音消息
+     * 
+ * + * .core.MsgSecretVoice secretVoice = 14; + */ + public boolean hasSecretVoice() { + return secretVoice_ != null; + } + /** + *
+     *加密二人语音消息
+     * 
+ * + * .core.MsgSecretVoice secretVoice = 14; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretVoice getSecretVoice() { + return secretVoice_ == null ? com.akaxin.proto.core.CoreProto.MsgSecretVoice.getDefaultInstance() : secretVoice_; + } + /** + *
+     *加密二人语音消息
+     * 
+ * + * .core.MsgSecretVoice secretVoice = 14; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretVoiceOrBuilder getSecretVoiceOrBuilder() { + return getSecretVoice(); + } + + public static final int GROUPVOICE_FIELD_NUMBER = 15; + private com.akaxin.proto.core.CoreProto.GroupVoice groupVoice_; + /** + *
+     *群语音消息
+     * 
+ * + * .core.GroupVoice groupVoice = 15; + */ + public boolean hasGroupVoice() { + return groupVoice_ != null; + } + /** + *
+     *群语音消息
+     * 
+ * + * .core.GroupVoice groupVoice = 15; + */ + public com.akaxin.proto.core.CoreProto.GroupVoice getGroupVoice() { + return groupVoice_ == null ? com.akaxin.proto.core.CoreProto.GroupVoice.getDefaultInstance() : groupVoice_; + } + /** + *
+     *群语音消息
+     * 
+ * + * .core.GroupVoice groupVoice = 15; + */ + public com.akaxin.proto.core.CoreProto.GroupVoiceOrBuilder getGroupVoiceOrBuilder() { + return getGroupVoice(); + } + + public static final int GROUPSECRETVOICE_FIELD_NUMBER = 16; + private com.akaxin.proto.core.CoreProto.GroupSecretVoice groupSecretVoice_; + /** + *
+     *群加密语音消息
+     * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 16; + */ + public boolean hasGroupSecretVoice() { + return groupSecretVoice_ != null; + } + /** + *
+     *群加密语音消息
+     * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 16; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretVoice getGroupSecretVoice() { + return groupSecretVoice_ == null ? com.akaxin.proto.core.CoreProto.GroupSecretVoice.getDefaultInstance() : groupSecretVoice_; + } + /** + *
+     *群加密语音消息
+     * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 16; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretVoiceOrBuilder getGroupSecretVoiceOrBuilder() { + return getGroupSecretVoice(); + } + + public static final int U2MAP_FIELD_NUMBER = 17; + private com.akaxin.proto.core.CoreProto.U2Map u2Map_; + /** + *
+     *v0.4.3 版本未使用
+     * 
+ * + * .core.U2Map u2Map = 17; + */ + public boolean hasU2Map() { + return u2Map_ != null; + } + /** + *
+     *v0.4.3 版本未使用
+     * 
+ * + * .core.U2Map u2Map = 17; + */ + public com.akaxin.proto.core.CoreProto.U2Map getU2Map() { + return u2Map_ == null ? com.akaxin.proto.core.CoreProto.U2Map.getDefaultInstance() : u2Map_; + } + /** + *
+     *v0.4.3 版本未使用
+     * 
+ * + * .core.U2Map u2Map = 17; + */ + public com.akaxin.proto.core.CoreProto.U2MapOrBuilder getU2MapOrBuilder() { + return getU2Map(); + } + + public static final int U2SECRETMAP_FIELD_NUMBER = 18; + private com.akaxin.proto.core.CoreProto.U2SecretMap u2SecretMap_; + /** + *
+     *加密地图消息
+     * 
+ * + * .core.U2SecretMap u2SecretMap = 18; + */ + public boolean hasU2SecretMap() { + return u2SecretMap_ != null; + } + /** + *
+     *加密地图消息
+     * 
+ * + * .core.U2SecretMap u2SecretMap = 18; + */ + public com.akaxin.proto.core.CoreProto.U2SecretMap getU2SecretMap() { + return u2SecretMap_ == null ? com.akaxin.proto.core.CoreProto.U2SecretMap.getDefaultInstance() : u2SecretMap_; + } + /** + *
+     *加密地图消息
+     * 
+ * + * .core.U2SecretMap u2SecretMap = 18; + */ + public com.akaxin.proto.core.CoreProto.U2SecretMapOrBuilder getU2SecretMapOrBuilder() { + return getU2SecretMap(); + } + + public static final int GROUPMAP_FIELD_NUMBER = 19; + private com.akaxin.proto.core.CoreProto.GroupMap groupMap_; + /** + *
+     *群地图
+     * 
+ * + * .core.GroupMap groupMap = 19; + */ + public boolean hasGroupMap() { + return groupMap_ != null; + } + /** + *
+     *群地图
+     * 
+ * + * .core.GroupMap groupMap = 19; + */ + public com.akaxin.proto.core.CoreProto.GroupMap getGroupMap() { + return groupMap_ == null ? com.akaxin.proto.core.CoreProto.GroupMap.getDefaultInstance() : groupMap_; + } + /** + *
+     *群地图
+     * 
+ * + * .core.GroupMap groupMap = 19; + */ + public com.akaxin.proto.core.CoreProto.GroupMapOrBuilder getGroupMapOrBuilder() { + return getGroupMap(); + } + + public static final int GROUPSECRETMAP_FIELD_NUMBER = 20; + private com.akaxin.proto.core.CoreProto.GroupSecretMap groupSecretMap_; + /** + *
+     *群加密地图
+     * 
+ * + * .core.GroupSecretMap groupSecretMap = 20; + */ + public boolean hasGroupSecretMap() { + return groupSecretMap_ != null; + } + /** + *
+     *群加密地图
+     * 
+ * + * .core.GroupSecretMap groupSecretMap = 20; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretMap getGroupSecretMap() { + return groupSecretMap_ == null ? com.akaxin.proto.core.CoreProto.GroupSecretMap.getDefaultInstance() : groupSecretMap_; + } + /** + *
+     *群加密地图
+     * 
+ * + * .core.GroupSecretMap groupSecretMap = 20; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretMapOrBuilder getGroupSecretMapOrBuilder() { + return getGroupSecretMap(); + } + + public static final int U2MSGNOTICE_FIELD_NUMBER = 21; + private com.akaxin.proto.core.CoreProto.U2MsgNotice u2MsgNotice_; + /** + *
+     *二人消息通知
+     * 
+ * + * .core.U2MsgNotice u2MsgNotice = 21; + */ + public boolean hasU2MsgNotice() { + return u2MsgNotice_ != null; + } + /** + *
+     *二人消息通知
+     * 
+ * + * .core.U2MsgNotice u2MsgNotice = 21; + */ + public com.akaxin.proto.core.CoreProto.U2MsgNotice getU2MsgNotice() { + return u2MsgNotice_ == null ? com.akaxin.proto.core.CoreProto.U2MsgNotice.getDefaultInstance() : u2MsgNotice_; + } + /** + *
+     *二人消息通知
+     * 
+ * + * .core.U2MsgNotice u2MsgNotice = 21; + */ + public com.akaxin.proto.core.CoreProto.U2MsgNoticeOrBuilder getU2MsgNoticeOrBuilder() { + return getU2MsgNotice(); + } + + public static final int GROUPMSGNOTICE_FIELD_NUMBER = 22; + private com.akaxin.proto.core.CoreProto.GroupMsgNotice groupMsgNotice_; + /** + *
+     *群消息通知
+     * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 22; + */ + public boolean hasGroupMsgNotice() { + return groupMsgNotice_ != null; + } + /** + *
+     *群消息通知
+     * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 22; + */ + public com.akaxin.proto.core.CoreProto.GroupMsgNotice getGroupMsgNotice() { + return groupMsgNotice_ == null ? com.akaxin.proto.core.CoreProto.GroupMsgNotice.getDefaultInstance() : groupMsgNotice_; + } + /** + *
+     *群消息通知
+     * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 22; + */ + public com.akaxin.proto.core.CoreProto.GroupMsgNoticeOrBuilder getGroupMsgNoticeOrBuilder() { + return getGroupMsgNotice(); + } + + public static final int U2RECALL_FIELD_NUMBER = 23; + private com.akaxin.proto.core.CoreProto.U2Recall u2Recall_; + /** + *
+     *二人召回消息
+     * 
+ * + * .core.U2Recall u2Recall = 23; + */ + public boolean hasU2Recall() { + return u2Recall_ != null; + } + /** + *
+     *二人召回消息
+     * 
+ * + * .core.U2Recall u2Recall = 23; + */ + public com.akaxin.proto.core.CoreProto.U2Recall getU2Recall() { + return u2Recall_ == null ? com.akaxin.proto.core.CoreProto.U2Recall.getDefaultInstance() : u2Recall_; + } + /** + *
+     *二人召回消息
+     * 
+ * + * .core.U2Recall u2Recall = 23; + */ + public com.akaxin.proto.core.CoreProto.U2RecallOrBuilder getU2RecallOrBuilder() { + return getU2Recall(); + } + + public static final int GROUPRECALL_FIELD_NUMBER = 24; + private com.akaxin.proto.core.CoreProto.GroupRecall groupRecall_; + /** + *
+     *群组召回消息
+     * 
+ * + * .core.GroupRecall groupRecall = 24; + */ + public boolean hasGroupRecall() { + return groupRecall_ != null; + } + /** + *
+     *群组召回消息
+     * 
+ * + * .core.GroupRecall groupRecall = 24; + */ + public com.akaxin.proto.core.CoreProto.GroupRecall getGroupRecall() { + return groupRecall_ == null ? com.akaxin.proto.core.CoreProto.GroupRecall.getDefaultInstance() : groupRecall_; + } + /** + *
+     *群组召回消息
+     * 
+ * + * .core.GroupRecall groupRecall = 24; + */ + public com.akaxin.proto.core.CoreProto.GroupRecallOrBuilder getGroupRecallOrBuilder() { + return getGroupRecall(); + } + + public static final int U2WEB_FIELD_NUMBER = 25; + private com.akaxin.proto.core.CoreProto.U2Web u2Web_; + /** + *
+     *为人Web消息
+     * 
+ * + * .core.U2Web u2Web = 25; + */ + public boolean hasU2Web() { + return u2Web_ != null; + } + /** + *
+     *为人Web消息
+     * 
+ * + * .core.U2Web u2Web = 25; + */ + public com.akaxin.proto.core.CoreProto.U2Web getU2Web() { + return u2Web_ == null ? com.akaxin.proto.core.CoreProto.U2Web.getDefaultInstance() : u2Web_; + } + /** + *
+     *为人Web消息
+     * 
+ * + * .core.U2Web u2Web = 25; + */ + public com.akaxin.proto.core.CoreProto.U2WebOrBuilder getU2WebOrBuilder() { + return getU2Web(); + } + + public static final int GROUPWEB_FIELD_NUMBER = 26; + private com.akaxin.proto.core.CoreProto.GroupWeb groupWeb_; + /** + *
+     *群组web消息
+     * 
+ * + * .core.GroupWeb groupWeb = 26; + */ + public boolean hasGroupWeb() { + return groupWeb_ != null; + } + /** + *
+     *群组web消息
+     * 
+ * + * .core.GroupWeb groupWeb = 26; + */ + public com.akaxin.proto.core.CoreProto.GroupWeb getGroupWeb() { + return groupWeb_ == null ? com.akaxin.proto.core.CoreProto.GroupWeb.getDefaultInstance() : groupWeb_; + } + /** + *
+     *群组web消息
+     * 
+ * + * .core.GroupWeb groupWeb = 26; + */ + public com.akaxin.proto.core.CoreProto.GroupWebOrBuilder getGroupWebOrBuilder() { + return getGroupWeb(); + } + + public static final int U2WEBNOTICE_FIELD_NUMBER = 27; + private com.akaxin.proto.core.CoreProto.U2WebNotice u2WebNotice_; + /** + *
+     *二人web通知消息
+     * 
+ * + * .core.U2WebNotice u2WebNotice = 27; + */ + public boolean hasU2WebNotice() { + return u2WebNotice_ != null; + } + /** + *
+     *二人web通知消息
+     * 
+ * + * .core.U2WebNotice u2WebNotice = 27; + */ + public com.akaxin.proto.core.CoreProto.U2WebNotice getU2WebNotice() { + return u2WebNotice_ == null ? com.akaxin.proto.core.CoreProto.U2WebNotice.getDefaultInstance() : u2WebNotice_; + } + /** + *
+     *二人web通知消息
+     * 
+ * + * .core.U2WebNotice u2WebNotice = 27; + */ + public com.akaxin.proto.core.CoreProto.U2WebNoticeOrBuilder getU2WebNoticeOrBuilder() { + return getU2WebNotice(); + } + + public static final int GROUPWEBNOTICE_FIELD_NUMBER = 28; + private com.akaxin.proto.core.CoreProto.GroupWebNotice groupWebNotice_; + /** + *
+     *群组web通知消息
+     * 
+ * + * .core.GroupWebNotice groupWebNotice = 28; + */ + public boolean hasGroupWebNotice() { + return groupWebNotice_ != null; + } + /** + *
+     *群组web通知消息
+     * 
+ * + * .core.GroupWebNotice groupWebNotice = 28; + */ + public com.akaxin.proto.core.CoreProto.GroupWebNotice getGroupWebNotice() { + return groupWebNotice_ == null ? com.akaxin.proto.core.CoreProto.GroupWebNotice.getDefaultInstance() : groupWebNotice_; + } + /** + *
+     *群组web通知消息
+     * 
+ * + * .core.GroupWebNotice groupWebNotice = 28; + */ + public com.akaxin.proto.core.CoreProto.GroupWebNoticeOrBuilder getGroupWebNoticeOrBuilder() { + return getGroupWebNotice(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (pointer_ != 0L) { + output.writeInt64(1, pointer_); + } + if (type_ != com.akaxin.proto.core.CoreProto.MsgType.NOTICE.getNumber()) { + output.writeEnum(2, type_); + } + if (status_ != null) { + output.writeMessage(3, getStatus()); + } + if (text_ != null) { + output.writeMessage(5, getText()); + } + if (secretText_ != null) { + output.writeMessage(6, getSecretText()); + } + if (groupText_ != null) { + output.writeMessage(7, getGroupText()); + } + if (groupSecretText_ != null) { + output.writeMessage(8, getGroupSecretText()); + } + if (image_ != null) { + output.writeMessage(9, getImage()); + } + if (secretImage_ != null) { + output.writeMessage(10, getSecretImage()); + } + if (groupImage_ != null) { + output.writeMessage(11, getGroupImage()); + } + if (groupSecretImage_ != null) { + output.writeMessage(12, getGroupSecretImage()); + } + if (voice_ != null) { + output.writeMessage(13, getVoice()); + } + if (secretVoice_ != null) { + output.writeMessage(14, getSecretVoice()); + } + if (groupVoice_ != null) { + output.writeMessage(15, getGroupVoice()); + } + if (groupSecretVoice_ != null) { + output.writeMessage(16, getGroupSecretVoice()); + } + if (u2Map_ != null) { + output.writeMessage(17, getU2Map()); + } + if (u2SecretMap_ != null) { + output.writeMessage(18, getU2SecretMap()); + } + if (groupMap_ != null) { + output.writeMessage(19, getGroupMap()); + } + if (groupSecretMap_ != null) { + output.writeMessage(20, getGroupSecretMap()); + } + if (u2MsgNotice_ != null) { + output.writeMessage(21, getU2MsgNotice()); + } + if (groupMsgNotice_ != null) { + output.writeMessage(22, getGroupMsgNotice()); + } + if (u2Recall_ != null) { + output.writeMessage(23, getU2Recall()); + } + if (groupRecall_ != null) { + output.writeMessage(24, getGroupRecall()); + } + if (u2Web_ != null) { + output.writeMessage(25, getU2Web()); + } + if (groupWeb_ != null) { + output.writeMessage(26, getGroupWeb()); + } + if (u2WebNotice_ != null) { + output.writeMessage(27, getU2WebNotice()); + } + if (groupWebNotice_ != null) { + output.writeMessage(28, getGroupWebNotice()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pointer_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, pointer_); + } + if (type_ != com.akaxin.proto.core.CoreProto.MsgType.NOTICE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, type_); + } + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getStatus()); + } + if (text_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getText()); + } + if (secretText_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getSecretText()); + } + if (groupText_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getGroupText()); + } + if (groupSecretText_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getGroupSecretText()); + } + if (image_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getImage()); + } + if (secretImage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getSecretImage()); + } + if (groupImage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getGroupImage()); + } + if (groupSecretImage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getGroupSecretImage()); + } + if (voice_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, getVoice()); + } + if (secretVoice_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getSecretVoice()); + } + if (groupVoice_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getGroupVoice()); + } + if (groupSecretVoice_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, getGroupSecretVoice()); + } + if (u2Map_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getU2Map()); + } + if (u2SecretMap_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, getU2SecretMap()); + } + if (groupMap_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(19, getGroupMap()); + } + if (groupSecretMap_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, getGroupSecretMap()); + } + if (u2MsgNotice_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getU2MsgNotice()); + } + if (groupMsgNotice_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(22, getGroupMsgNotice()); + } + if (u2Recall_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(23, getU2Recall()); + } + if (groupRecall_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(24, getGroupRecall()); + } + if (u2Web_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(25, getU2Web()); + } + if (groupWeb_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(26, getGroupWeb()); + } + if (u2WebNotice_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(27, getU2WebNotice()); + } + if (groupWebNotice_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(28, getGroupWebNotice()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer)) { + return super.equals(obj); + } + com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer other = (com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer) obj; + + boolean result = true; + result = result && (getPointer() + == other.getPointer()); + result = result && type_ == other.type_; + result = result && (hasStatus() == other.hasStatus()); + if (hasStatus()) { + result = result && getStatus() + .equals(other.getStatus()); + } + result = result && (hasText() == other.hasText()); + if (hasText()) { + result = result && getText() + .equals(other.getText()); + } + result = result && (hasSecretText() == other.hasSecretText()); + if (hasSecretText()) { + result = result && getSecretText() + .equals(other.getSecretText()); + } + result = result && (hasGroupText() == other.hasGroupText()); + if (hasGroupText()) { + result = result && getGroupText() + .equals(other.getGroupText()); + } + result = result && (hasGroupSecretText() == other.hasGroupSecretText()); + if (hasGroupSecretText()) { + result = result && getGroupSecretText() + .equals(other.getGroupSecretText()); + } + result = result && (hasImage() == other.hasImage()); + if (hasImage()) { + result = result && getImage() + .equals(other.getImage()); + } + result = result && (hasSecretImage() == other.hasSecretImage()); + if (hasSecretImage()) { + result = result && getSecretImage() + .equals(other.getSecretImage()); + } + result = result && (hasGroupImage() == other.hasGroupImage()); + if (hasGroupImage()) { + result = result && getGroupImage() + .equals(other.getGroupImage()); + } + result = result && (hasGroupSecretImage() == other.hasGroupSecretImage()); + if (hasGroupSecretImage()) { + result = result && getGroupSecretImage() + .equals(other.getGroupSecretImage()); + } + result = result && (hasVoice() == other.hasVoice()); + if (hasVoice()) { + result = result && getVoice() + .equals(other.getVoice()); + } + result = result && (hasSecretVoice() == other.hasSecretVoice()); + if (hasSecretVoice()) { + result = result && getSecretVoice() + .equals(other.getSecretVoice()); + } + result = result && (hasGroupVoice() == other.hasGroupVoice()); + if (hasGroupVoice()) { + result = result && getGroupVoice() + .equals(other.getGroupVoice()); + } + result = result && (hasGroupSecretVoice() == other.hasGroupSecretVoice()); + if (hasGroupSecretVoice()) { + result = result && getGroupSecretVoice() + .equals(other.getGroupSecretVoice()); + } + result = result && (hasU2Map() == other.hasU2Map()); + if (hasU2Map()) { + result = result && getU2Map() + .equals(other.getU2Map()); + } + result = result && (hasU2SecretMap() == other.hasU2SecretMap()); + if (hasU2SecretMap()) { + result = result && getU2SecretMap() + .equals(other.getU2SecretMap()); + } + result = result && (hasGroupMap() == other.hasGroupMap()); + if (hasGroupMap()) { + result = result && getGroupMap() + .equals(other.getGroupMap()); + } + result = result && (hasGroupSecretMap() == other.hasGroupSecretMap()); + if (hasGroupSecretMap()) { + result = result && getGroupSecretMap() + .equals(other.getGroupSecretMap()); + } + result = result && (hasU2MsgNotice() == other.hasU2MsgNotice()); + if (hasU2MsgNotice()) { + result = result && getU2MsgNotice() + .equals(other.getU2MsgNotice()); + } + result = result && (hasGroupMsgNotice() == other.hasGroupMsgNotice()); + if (hasGroupMsgNotice()) { + result = result && getGroupMsgNotice() + .equals(other.getGroupMsgNotice()); + } + result = result && (hasU2Recall() == other.hasU2Recall()); + if (hasU2Recall()) { + result = result && getU2Recall() + .equals(other.getU2Recall()); + } + result = result && (hasGroupRecall() == other.hasGroupRecall()); + if (hasGroupRecall()) { + result = result && getGroupRecall() + .equals(other.getGroupRecall()); + } + result = result && (hasU2Web() == other.hasU2Web()); + if (hasU2Web()) { + result = result && getU2Web() + .equals(other.getU2Web()); + } + result = result && (hasGroupWeb() == other.hasGroupWeb()); + if (hasGroupWeb()) { + result = result && getGroupWeb() + .equals(other.getGroupWeb()); + } + result = result && (hasU2WebNotice() == other.hasU2WebNotice()); + if (hasU2WebNotice()) { + result = result && getU2WebNotice() + .equals(other.getU2WebNotice()); + } + result = result && (hasGroupWebNotice() == other.hasGroupWebNotice()); + if (hasGroupWebNotice()) { + result = result && getGroupWebNotice() + .equals(other.getGroupWebNotice()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + POINTER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPointer()); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + if (hasText()) { + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + } + if (hasSecretText()) { + hash = (37 * hash) + SECRETTEXT_FIELD_NUMBER; + hash = (53 * hash) + getSecretText().hashCode(); + } + if (hasGroupText()) { + hash = (37 * hash) + GROUPTEXT_FIELD_NUMBER; + hash = (53 * hash) + getGroupText().hashCode(); + } + if (hasGroupSecretText()) { + hash = (37 * hash) + GROUPSECRETTEXT_FIELD_NUMBER; + hash = (53 * hash) + getGroupSecretText().hashCode(); + } + if (hasImage()) { + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + } + if (hasSecretImage()) { + hash = (37 * hash) + SECRETIMAGE_FIELD_NUMBER; + hash = (53 * hash) + getSecretImage().hashCode(); + } + if (hasGroupImage()) { + hash = (37 * hash) + GROUPIMAGE_FIELD_NUMBER; + hash = (53 * hash) + getGroupImage().hashCode(); + } + if (hasGroupSecretImage()) { + hash = (37 * hash) + GROUPSECRETIMAGE_FIELD_NUMBER; + hash = (53 * hash) + getGroupSecretImage().hashCode(); + } + if (hasVoice()) { + hash = (37 * hash) + VOICE_FIELD_NUMBER; + hash = (53 * hash) + getVoice().hashCode(); + } + if (hasSecretVoice()) { + hash = (37 * hash) + SECRETVOICE_FIELD_NUMBER; + hash = (53 * hash) + getSecretVoice().hashCode(); + } + if (hasGroupVoice()) { + hash = (37 * hash) + GROUPVOICE_FIELD_NUMBER; + hash = (53 * hash) + getGroupVoice().hashCode(); + } + if (hasGroupSecretVoice()) { + hash = (37 * hash) + GROUPSECRETVOICE_FIELD_NUMBER; + hash = (53 * hash) + getGroupSecretVoice().hashCode(); + } + if (hasU2Map()) { + hash = (37 * hash) + U2MAP_FIELD_NUMBER; + hash = (53 * hash) + getU2Map().hashCode(); + } + if (hasU2SecretMap()) { + hash = (37 * hash) + U2SECRETMAP_FIELD_NUMBER; + hash = (53 * hash) + getU2SecretMap().hashCode(); + } + if (hasGroupMap()) { + hash = (37 * hash) + GROUPMAP_FIELD_NUMBER; + hash = (53 * hash) + getGroupMap().hashCode(); + } + if (hasGroupSecretMap()) { + hash = (37 * hash) + GROUPSECRETMAP_FIELD_NUMBER; + hash = (53 * hash) + getGroupSecretMap().hashCode(); + } + if (hasU2MsgNotice()) { + hash = (37 * hash) + U2MSGNOTICE_FIELD_NUMBER; + hash = (53 * hash) + getU2MsgNotice().hashCode(); + } + if (hasGroupMsgNotice()) { + hash = (37 * hash) + GROUPMSGNOTICE_FIELD_NUMBER; + hash = (53 * hash) + getGroupMsgNotice().hashCode(); + } + if (hasU2Recall()) { + hash = (37 * hash) + U2RECALL_FIELD_NUMBER; + hash = (53 * hash) + getU2Recall().hashCode(); + } + if (hasGroupRecall()) { + hash = (37 * hash) + GROUPRECALL_FIELD_NUMBER; + hash = (53 * hash) + getGroupRecall().hashCode(); + } + if (hasU2Web()) { + hash = (37 * hash) + U2WEB_FIELD_NUMBER; + hash = (53 * hash) + getU2Web().hashCode(); + } + if (hasGroupWeb()) { + hash = (37 * hash) + GROUPWEB_FIELD_NUMBER; + hash = (53 * hash) + getGroupWeb().hashCode(); + } + if (hasU2WebNotice()) { + hash = (37 * hash) + U2WEBNOTICE_FIELD_NUMBER; + hash = (53 * hash) + getU2WebNotice().hashCode(); + } + if (hasGroupWebNotice()) { + hash = (37 * hash) + GROUPWEBNOTICE_FIELD_NUMBER; + hash = (53 * hash) + getGroupWebNotice().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code client.MsgWithPointer} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:client.MsgWithPointer) + com.akaxin.proto.client.ImStcMessageProto.MsgWithPointerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.client.ImStcMessageProto.internal_static_client_MsgWithPointer_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.client.ImStcMessageProto.internal_static_client_MsgWithPointer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.class, com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.Builder.class); + } + + // Construct using com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + pointer_ = 0L; + + type_ = 0; + + if (statusBuilder_ == null) { + status_ = null; + } else { + status_ = null; + statusBuilder_ = null; + } + if (textBuilder_ == null) { + text_ = null; + } else { + text_ = null; + textBuilder_ = null; + } + if (secretTextBuilder_ == null) { + secretText_ = null; + } else { + secretText_ = null; + secretTextBuilder_ = null; + } + if (groupTextBuilder_ == null) { + groupText_ = null; + } else { + groupText_ = null; + groupTextBuilder_ = null; + } + if (groupSecretTextBuilder_ == null) { + groupSecretText_ = null; + } else { + groupSecretText_ = null; + groupSecretTextBuilder_ = null; + } + if (imageBuilder_ == null) { + image_ = null; + } else { + image_ = null; + imageBuilder_ = null; + } + if (secretImageBuilder_ == null) { + secretImage_ = null; + } else { + secretImage_ = null; + secretImageBuilder_ = null; + } + if (groupImageBuilder_ == null) { + groupImage_ = null; + } else { + groupImage_ = null; + groupImageBuilder_ = null; + } + if (groupSecretImageBuilder_ == null) { + groupSecretImage_ = null; + } else { + groupSecretImage_ = null; + groupSecretImageBuilder_ = null; + } + if (voiceBuilder_ == null) { + voice_ = null; + } else { + voice_ = null; + voiceBuilder_ = null; + } + if (secretVoiceBuilder_ == null) { + secretVoice_ = null; + } else { + secretVoice_ = null; + secretVoiceBuilder_ = null; + } + if (groupVoiceBuilder_ == null) { + groupVoice_ = null; + } else { + groupVoice_ = null; + groupVoiceBuilder_ = null; + } + if (groupSecretVoiceBuilder_ == null) { + groupSecretVoice_ = null; + } else { + groupSecretVoice_ = null; + groupSecretVoiceBuilder_ = null; + } + if (u2MapBuilder_ == null) { + u2Map_ = null; + } else { + u2Map_ = null; + u2MapBuilder_ = null; + } + if (u2SecretMapBuilder_ == null) { + u2SecretMap_ = null; + } else { + u2SecretMap_ = null; + u2SecretMapBuilder_ = null; + } + if (groupMapBuilder_ == null) { + groupMap_ = null; + } else { + groupMap_ = null; + groupMapBuilder_ = null; + } + if (groupSecretMapBuilder_ == null) { + groupSecretMap_ = null; + } else { + groupSecretMap_ = null; + groupSecretMapBuilder_ = null; + } + if (u2MsgNoticeBuilder_ == null) { + u2MsgNotice_ = null; + } else { + u2MsgNotice_ = null; + u2MsgNoticeBuilder_ = null; + } + if (groupMsgNoticeBuilder_ == null) { + groupMsgNotice_ = null; + } else { + groupMsgNotice_ = null; + groupMsgNoticeBuilder_ = null; + } + if (u2RecallBuilder_ == null) { + u2Recall_ = null; + } else { + u2Recall_ = null; + u2RecallBuilder_ = null; + } + if (groupRecallBuilder_ == null) { + groupRecall_ = null; + } else { + groupRecall_ = null; + groupRecallBuilder_ = null; + } + if (u2WebBuilder_ == null) { + u2Web_ = null; + } else { + u2Web_ = null; + u2WebBuilder_ = null; + } + if (groupWebBuilder_ == null) { + groupWeb_ = null; + } else { + groupWeb_ = null; + groupWebBuilder_ = null; + } + if (u2WebNoticeBuilder_ == null) { + u2WebNotice_ = null; + } else { + u2WebNotice_ = null; + u2WebNoticeBuilder_ = null; + } + if (groupWebNoticeBuilder_ == null) { + groupWebNotice_ = null; + } else { + groupWebNotice_ = null; + groupWebNoticeBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.client.ImStcMessageProto.internal_static_client_MsgWithPointer_descriptor; + } + + public com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer getDefaultInstanceForType() { + return com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.getDefaultInstance(); + } + + public com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer build() { + com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer buildPartial() { + com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer result = new com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer(this); + result.pointer_ = pointer_; + result.type_ = type_; + if (statusBuilder_ == null) { + result.status_ = status_; + } else { + result.status_ = statusBuilder_.build(); + } + if (textBuilder_ == null) { + result.text_ = text_; + } else { + result.text_ = textBuilder_.build(); + } + if (secretTextBuilder_ == null) { + result.secretText_ = secretText_; + } else { + result.secretText_ = secretTextBuilder_.build(); + } + if (groupTextBuilder_ == null) { + result.groupText_ = groupText_; + } else { + result.groupText_ = groupTextBuilder_.build(); + } + if (groupSecretTextBuilder_ == null) { + result.groupSecretText_ = groupSecretText_; + } else { + result.groupSecretText_ = groupSecretTextBuilder_.build(); + } + if (imageBuilder_ == null) { + result.image_ = image_; + } else { + result.image_ = imageBuilder_.build(); + } + if (secretImageBuilder_ == null) { + result.secretImage_ = secretImage_; + } else { + result.secretImage_ = secretImageBuilder_.build(); + } + if (groupImageBuilder_ == null) { + result.groupImage_ = groupImage_; + } else { + result.groupImage_ = groupImageBuilder_.build(); + } + if (groupSecretImageBuilder_ == null) { + result.groupSecretImage_ = groupSecretImage_; + } else { + result.groupSecretImage_ = groupSecretImageBuilder_.build(); + } + if (voiceBuilder_ == null) { + result.voice_ = voice_; + } else { + result.voice_ = voiceBuilder_.build(); + } + if (secretVoiceBuilder_ == null) { + result.secretVoice_ = secretVoice_; + } else { + result.secretVoice_ = secretVoiceBuilder_.build(); + } + if (groupVoiceBuilder_ == null) { + result.groupVoice_ = groupVoice_; + } else { + result.groupVoice_ = groupVoiceBuilder_.build(); + } + if (groupSecretVoiceBuilder_ == null) { + result.groupSecretVoice_ = groupSecretVoice_; + } else { + result.groupSecretVoice_ = groupSecretVoiceBuilder_.build(); + } + if (u2MapBuilder_ == null) { + result.u2Map_ = u2Map_; + } else { + result.u2Map_ = u2MapBuilder_.build(); + } + if (u2SecretMapBuilder_ == null) { + result.u2SecretMap_ = u2SecretMap_; + } else { + result.u2SecretMap_ = u2SecretMapBuilder_.build(); + } + if (groupMapBuilder_ == null) { + result.groupMap_ = groupMap_; + } else { + result.groupMap_ = groupMapBuilder_.build(); + } + if (groupSecretMapBuilder_ == null) { + result.groupSecretMap_ = groupSecretMap_; + } else { + result.groupSecretMap_ = groupSecretMapBuilder_.build(); + } + if (u2MsgNoticeBuilder_ == null) { + result.u2MsgNotice_ = u2MsgNotice_; + } else { + result.u2MsgNotice_ = u2MsgNoticeBuilder_.build(); + } + if (groupMsgNoticeBuilder_ == null) { + result.groupMsgNotice_ = groupMsgNotice_; + } else { + result.groupMsgNotice_ = groupMsgNoticeBuilder_.build(); + } + if (u2RecallBuilder_ == null) { + result.u2Recall_ = u2Recall_; + } else { + result.u2Recall_ = u2RecallBuilder_.build(); + } + if (groupRecallBuilder_ == null) { + result.groupRecall_ = groupRecall_; + } else { + result.groupRecall_ = groupRecallBuilder_.build(); + } + if (u2WebBuilder_ == null) { + result.u2Web_ = u2Web_; + } else { + result.u2Web_ = u2WebBuilder_.build(); + } + if (groupWebBuilder_ == null) { + result.groupWeb_ = groupWeb_; + } else { + result.groupWeb_ = groupWebBuilder_.build(); + } + if (u2WebNoticeBuilder_ == null) { + result.u2WebNotice_ = u2WebNotice_; + } else { + result.u2WebNotice_ = u2WebNoticeBuilder_.build(); + } + if (groupWebNoticeBuilder_ == null) { + result.groupWebNotice_ = groupWebNotice_; + } else { + result.groupWebNotice_ = groupWebNoticeBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer) { + return mergeFrom((com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer other) { + if (other == com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer.getDefaultInstance()) return this; + if (other.getPointer() != 0L) { + setPointer(other.getPointer()); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + if (other.hasText()) { + mergeText(other.getText()); + } + if (other.hasSecretText()) { + mergeSecretText(other.getSecretText()); + } + if (other.hasGroupText()) { + mergeGroupText(other.getGroupText()); + } + if (other.hasGroupSecretText()) { + mergeGroupSecretText(other.getGroupSecretText()); + } + if (other.hasImage()) { + mergeImage(other.getImage()); + } + if (other.hasSecretImage()) { + mergeSecretImage(other.getSecretImage()); + } + if (other.hasGroupImage()) { + mergeGroupImage(other.getGroupImage()); + } + if (other.hasGroupSecretImage()) { + mergeGroupSecretImage(other.getGroupSecretImage()); + } + if (other.hasVoice()) { + mergeVoice(other.getVoice()); + } + if (other.hasSecretVoice()) { + mergeSecretVoice(other.getSecretVoice()); + } + if (other.hasGroupVoice()) { + mergeGroupVoice(other.getGroupVoice()); + } + if (other.hasGroupSecretVoice()) { + mergeGroupSecretVoice(other.getGroupSecretVoice()); + } + if (other.hasU2Map()) { + mergeU2Map(other.getU2Map()); + } + if (other.hasU2SecretMap()) { + mergeU2SecretMap(other.getU2SecretMap()); + } + if (other.hasGroupMap()) { + mergeGroupMap(other.getGroupMap()); + } + if (other.hasGroupSecretMap()) { + mergeGroupSecretMap(other.getGroupSecretMap()); + } + if (other.hasU2MsgNotice()) { + mergeU2MsgNotice(other.getU2MsgNotice()); + } + if (other.hasGroupMsgNotice()) { + mergeGroupMsgNotice(other.getGroupMsgNotice()); + } + if (other.hasU2Recall()) { + mergeU2Recall(other.getU2Recall()); + } + if (other.hasGroupRecall()) { + mergeGroupRecall(other.getGroupRecall()); + } + if (other.hasU2Web()) { + mergeU2Web(other.getU2Web()); + } + if (other.hasGroupWeb()) { + mergeGroupWeb(other.getGroupWeb()); + } + if (other.hasU2WebNotice()) { + mergeU2WebNotice(other.getU2WebNotice()); + } + if (other.hasGroupWebNotice()) { + mergeGroupWebNotice(other.getGroupWebNotice()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long pointer_ ; + /** + *
+       *消息游标
+       * 
+ * + * int64 pointer = 1; + */ + public long getPointer() { + return pointer_; + } + /** + *
+       *消息游标
+       * 
+ * + * int64 pointer = 1; + */ + public Builder setPointer(long value) { + + pointer_ = value; + onChanged(); + return this; + } + /** + *
+       *消息游标
+       * 
+ * + * int64 pointer = 1; + */ + public Builder clearPointer() { + + pointer_ = 0L; + onChanged(); + return this; + } + + private int type_ = 0; + /** + *
+       *消息类型
+       * 
+ * + * .core.MsgType type = 2; + */ + public int getTypeValue() { + return type_; + } + /** + *
+       *消息类型
+       * 
+ * + * .core.MsgType type = 2; + */ + public Builder setTypeValue(int value) { + type_ = value; + onChanged(); + return this; + } + /** + *
+       *消息类型
+       * 
+ * + * .core.MsgType type = 2; + */ + public com.akaxin.proto.core.CoreProto.MsgType getType() { + com.akaxin.proto.core.CoreProto.MsgType result = com.akaxin.proto.core.CoreProto.MsgType.valueOf(type_); + return result == null ? com.akaxin.proto.core.CoreProto.MsgType.UNRECOGNIZED : result; + } + /** + *
+       *消息类型
+       * 
+ * + * .core.MsgType type = 2; + */ + public Builder setType(com.akaxin.proto.core.CoreProto.MsgType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       *消息类型
+       * 
+ * + * .core.MsgType type = 2; + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private com.akaxin.proto.core.CoreProto.MsgStatus status_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgStatus, com.akaxin.proto.core.CoreProto.MsgStatus.Builder, com.akaxin.proto.core.CoreProto.MsgStatusOrBuilder> statusBuilder_; + /** + *
+       *消息状态,是否已送达
+       * 
+ * + * .core.MsgStatus status = 3; + */ + public boolean hasStatus() { + return statusBuilder_ != null || status_ != null; + } + /** + *
+       *消息状态,是否已送达
+       * 
+ * + * .core.MsgStatus status = 3; + */ + public com.akaxin.proto.core.CoreProto.MsgStatus getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.akaxin.proto.core.CoreProto.MsgStatus.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + *
+       *消息状态,是否已送达
+       * 
+ * + * .core.MsgStatus status = 3; + */ + public Builder setStatus(com.akaxin.proto.core.CoreProto.MsgStatus value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + onChanged(); + } else { + statusBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *消息状态,是否已送达
+       * 
+ * + * .core.MsgStatus status = 3; + */ + public Builder setStatus( + com.akaxin.proto.core.CoreProto.MsgStatus.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + onChanged(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *消息状态,是否已送达
+       * 
+ * + * .core.MsgStatus status = 3; + */ + public Builder mergeStatus(com.akaxin.proto.core.CoreProto.MsgStatus value) { + if (statusBuilder_ == null) { + if (status_ != null) { + status_ = + com.akaxin.proto.core.CoreProto.MsgStatus.newBuilder(status_).mergeFrom(value).buildPartial(); + } else { + status_ = value; + } + onChanged(); + } else { + statusBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *消息状态,是否已送达
+       * 
+ * + * .core.MsgStatus status = 3; + */ + public Builder clearStatus() { + if (statusBuilder_ == null) { + status_ = null; + onChanged(); + } else { + status_ = null; + statusBuilder_ = null; + } + + return this; + } + /** + *
+       *消息状态,是否已送达
+       * 
+ * + * .core.MsgStatus status = 3; + */ + public com.akaxin.proto.core.CoreProto.MsgStatus.Builder getStatusBuilder() { + + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + *
+       *消息状态,是否已送达
+       * 
+ * + * .core.MsgStatus status = 3; + */ + public com.akaxin.proto.core.CoreProto.MsgStatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? + com.akaxin.proto.core.CoreProto.MsgStatus.getDefaultInstance() : status_; + } + } + /** + *
+       *消息状态,是否已送达
+       * 
+ * + * .core.MsgStatus status = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgStatus, com.akaxin.proto.core.CoreProto.MsgStatus.Builder, com.akaxin.proto.core.CoreProto.MsgStatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgStatus, com.akaxin.proto.core.CoreProto.MsgStatus.Builder, com.akaxin.proto.core.CoreProto.MsgStatusOrBuilder>( + getStatus(), + getParentForChildren(), + isClean()); + status_ = null; + } + return statusBuilder_; + } + + private com.akaxin.proto.core.CoreProto.MsgText text_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgText, com.akaxin.proto.core.CoreProto.MsgText.Builder, com.akaxin.proto.core.CoreProto.MsgTextOrBuilder> textBuilder_; + /** + *
+       *二人文本消息
+       * 
+ * + * .core.MsgText text = 5; + */ + public boolean hasText() { + return textBuilder_ != null || text_ != null; + } + /** + *
+       *二人文本消息
+       * 
+ * + * .core.MsgText text = 5; + */ + public com.akaxin.proto.core.CoreProto.MsgText getText() { + if (textBuilder_ == null) { + return text_ == null ? com.akaxin.proto.core.CoreProto.MsgText.getDefaultInstance() : text_; + } else { + return textBuilder_.getMessage(); + } + } + /** + *
+       *二人文本消息
+       * 
+ * + * .core.MsgText text = 5; + */ + public Builder setText(com.akaxin.proto.core.CoreProto.MsgText value) { + if (textBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + onChanged(); + } else { + textBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *二人文本消息
+       * 
+ * + * .core.MsgText text = 5; + */ + public Builder setText( + com.akaxin.proto.core.CoreProto.MsgText.Builder builderForValue) { + if (textBuilder_ == null) { + text_ = builderForValue.build(); + onChanged(); + } else { + textBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *二人文本消息
+       * 
+ * + * .core.MsgText text = 5; + */ + public Builder mergeText(com.akaxin.proto.core.CoreProto.MsgText value) { + if (textBuilder_ == null) { + if (text_ != null) { + text_ = + com.akaxin.proto.core.CoreProto.MsgText.newBuilder(text_).mergeFrom(value).buildPartial(); + } else { + text_ = value; + } + onChanged(); + } else { + textBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *二人文本消息
+       * 
+ * + * .core.MsgText text = 5; + */ + public Builder clearText() { + if (textBuilder_ == null) { + text_ = null; + onChanged(); + } else { + text_ = null; + textBuilder_ = null; + } + + return this; + } + /** + *
+       *二人文本消息
+       * 
+ * + * .core.MsgText text = 5; + */ + public com.akaxin.proto.core.CoreProto.MsgText.Builder getTextBuilder() { + + onChanged(); + return getTextFieldBuilder().getBuilder(); + } + /** + *
+       *二人文本消息
+       * 
+ * + * .core.MsgText text = 5; + */ + public com.akaxin.proto.core.CoreProto.MsgTextOrBuilder getTextOrBuilder() { + if (textBuilder_ != null) { + return textBuilder_.getMessageOrBuilder(); + } else { + return text_ == null ? + com.akaxin.proto.core.CoreProto.MsgText.getDefaultInstance() : text_; + } + } + /** + *
+       *二人文本消息
+       * 
+ * + * .core.MsgText text = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgText, com.akaxin.proto.core.CoreProto.MsgText.Builder, com.akaxin.proto.core.CoreProto.MsgTextOrBuilder> + getTextFieldBuilder() { + if (textBuilder_ == null) { + textBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgText, com.akaxin.proto.core.CoreProto.MsgText.Builder, com.akaxin.proto.core.CoreProto.MsgTextOrBuilder>( + getText(), + getParentForChildren(), + isClean()); + text_ = null; + } + return textBuilder_; + } + + private com.akaxin.proto.core.CoreProto.MsgSecretText secretText_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgSecretText, com.akaxin.proto.core.CoreProto.MsgSecretText.Builder, com.akaxin.proto.core.CoreProto.MsgSecretTextOrBuilder> secretTextBuilder_; + /** + *
+       *二人加密文本消息
+       * 
+ * + * .core.MsgSecretText secretText = 6; + */ + public boolean hasSecretText() { + return secretTextBuilder_ != null || secretText_ != null; + } + /** + *
+       *二人加密文本消息
+       * 
+ * + * .core.MsgSecretText secretText = 6; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretText getSecretText() { + if (secretTextBuilder_ == null) { + return secretText_ == null ? com.akaxin.proto.core.CoreProto.MsgSecretText.getDefaultInstance() : secretText_; + } else { + return secretTextBuilder_.getMessage(); + } + } + /** + *
+       *二人加密文本消息
+       * 
+ * + * .core.MsgSecretText secretText = 6; + */ + public Builder setSecretText(com.akaxin.proto.core.CoreProto.MsgSecretText value) { + if (secretTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + secretText_ = value; + onChanged(); + } else { + secretTextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *二人加密文本消息
+       * 
+ * + * .core.MsgSecretText secretText = 6; + */ + public Builder setSecretText( + com.akaxin.proto.core.CoreProto.MsgSecretText.Builder builderForValue) { + if (secretTextBuilder_ == null) { + secretText_ = builderForValue.build(); + onChanged(); + } else { + secretTextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *二人加密文本消息
+       * 
+ * + * .core.MsgSecretText secretText = 6; + */ + public Builder mergeSecretText(com.akaxin.proto.core.CoreProto.MsgSecretText value) { + if (secretTextBuilder_ == null) { + if (secretText_ != null) { + secretText_ = + com.akaxin.proto.core.CoreProto.MsgSecretText.newBuilder(secretText_).mergeFrom(value).buildPartial(); + } else { + secretText_ = value; + } + onChanged(); + } else { + secretTextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *二人加密文本消息
+       * 
+ * + * .core.MsgSecretText secretText = 6; + */ + public Builder clearSecretText() { + if (secretTextBuilder_ == null) { + secretText_ = null; + onChanged(); + } else { + secretText_ = null; + secretTextBuilder_ = null; + } + + return this; + } + /** + *
+       *二人加密文本消息
+       * 
+ * + * .core.MsgSecretText secretText = 6; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretText.Builder getSecretTextBuilder() { + + onChanged(); + return getSecretTextFieldBuilder().getBuilder(); + } + /** + *
+       *二人加密文本消息
+       * 
+ * + * .core.MsgSecretText secretText = 6; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretTextOrBuilder getSecretTextOrBuilder() { + if (secretTextBuilder_ != null) { + return secretTextBuilder_.getMessageOrBuilder(); + } else { + return secretText_ == null ? + com.akaxin.proto.core.CoreProto.MsgSecretText.getDefaultInstance() : secretText_; + } + } + /** + *
+       *二人加密文本消息
+       * 
+ * + * .core.MsgSecretText secretText = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgSecretText, com.akaxin.proto.core.CoreProto.MsgSecretText.Builder, com.akaxin.proto.core.CoreProto.MsgSecretTextOrBuilder> + getSecretTextFieldBuilder() { + if (secretTextBuilder_ == null) { + secretTextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgSecretText, com.akaxin.proto.core.CoreProto.MsgSecretText.Builder, com.akaxin.proto.core.CoreProto.MsgSecretTextOrBuilder>( + getSecretText(), + getParentForChildren(), + isClean()); + secretText_ = null; + } + return secretTextBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupText groupText_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupText, com.akaxin.proto.core.CoreProto.GroupText.Builder, com.akaxin.proto.core.CoreProto.GroupTextOrBuilder> groupTextBuilder_; + /** + *
+       *群文本消息
+       * 
+ * + * .core.GroupText groupText = 7; + */ + public boolean hasGroupText() { + return groupTextBuilder_ != null || groupText_ != null; + } + /** + *
+       *群文本消息
+       * 
+ * + * .core.GroupText groupText = 7; + */ + public com.akaxin.proto.core.CoreProto.GroupText getGroupText() { + if (groupTextBuilder_ == null) { + return groupText_ == null ? com.akaxin.proto.core.CoreProto.GroupText.getDefaultInstance() : groupText_; + } else { + return groupTextBuilder_.getMessage(); + } + } + /** + *
+       *群文本消息
+       * 
+ * + * .core.GroupText groupText = 7; + */ + public Builder setGroupText(com.akaxin.proto.core.CoreProto.GroupText value) { + if (groupTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupText_ = value; + onChanged(); + } else { + groupTextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群文本消息
+       * 
+ * + * .core.GroupText groupText = 7; + */ + public Builder setGroupText( + com.akaxin.proto.core.CoreProto.GroupText.Builder builderForValue) { + if (groupTextBuilder_ == null) { + groupText_ = builderForValue.build(); + onChanged(); + } else { + groupTextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群文本消息
+       * 
+ * + * .core.GroupText groupText = 7; + */ + public Builder mergeGroupText(com.akaxin.proto.core.CoreProto.GroupText value) { + if (groupTextBuilder_ == null) { + if (groupText_ != null) { + groupText_ = + com.akaxin.proto.core.CoreProto.GroupText.newBuilder(groupText_).mergeFrom(value).buildPartial(); + } else { + groupText_ = value; + } + onChanged(); + } else { + groupTextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群文本消息
+       * 
+ * + * .core.GroupText groupText = 7; + */ + public Builder clearGroupText() { + if (groupTextBuilder_ == null) { + groupText_ = null; + onChanged(); + } else { + groupText_ = null; + groupTextBuilder_ = null; + } + + return this; + } + /** + *
+       *群文本消息
+       * 
+ * + * .core.GroupText groupText = 7; + */ + public com.akaxin.proto.core.CoreProto.GroupText.Builder getGroupTextBuilder() { + + onChanged(); + return getGroupTextFieldBuilder().getBuilder(); + } + /** + *
+       *群文本消息
+       * 
+ * + * .core.GroupText groupText = 7; + */ + public com.akaxin.proto.core.CoreProto.GroupTextOrBuilder getGroupTextOrBuilder() { + if (groupTextBuilder_ != null) { + return groupTextBuilder_.getMessageOrBuilder(); + } else { + return groupText_ == null ? + com.akaxin.proto.core.CoreProto.GroupText.getDefaultInstance() : groupText_; + } + } + /** + *
+       *群文本消息
+       * 
+ * + * .core.GroupText groupText = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupText, com.akaxin.proto.core.CoreProto.GroupText.Builder, com.akaxin.proto.core.CoreProto.GroupTextOrBuilder> + getGroupTextFieldBuilder() { + if (groupTextBuilder_ == null) { + groupTextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupText, com.akaxin.proto.core.CoreProto.GroupText.Builder, com.akaxin.proto.core.CoreProto.GroupTextOrBuilder>( + getGroupText(), + getParentForChildren(), + isClean()); + groupText_ = null; + } + return groupTextBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupSecretText groupSecretText_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretText, com.akaxin.proto.core.CoreProto.GroupSecretText.Builder, com.akaxin.proto.core.CoreProto.GroupSecretTextOrBuilder> groupSecretTextBuilder_; + /** + *
+       *加密群文本消息
+       * 
+ * + * .core.GroupSecretText groupSecretText = 8; + */ + public boolean hasGroupSecretText() { + return groupSecretTextBuilder_ != null || groupSecretText_ != null; + } + /** + *
+       *加密群文本消息
+       * 
+ * + * .core.GroupSecretText groupSecretText = 8; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretText getGroupSecretText() { + if (groupSecretTextBuilder_ == null) { + return groupSecretText_ == null ? com.akaxin.proto.core.CoreProto.GroupSecretText.getDefaultInstance() : groupSecretText_; + } else { + return groupSecretTextBuilder_.getMessage(); + } + } + /** + *
+       *加密群文本消息
+       * 
+ * + * .core.GroupSecretText groupSecretText = 8; + */ + public Builder setGroupSecretText(com.akaxin.proto.core.CoreProto.GroupSecretText value) { + if (groupSecretTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupSecretText_ = value; + onChanged(); + } else { + groupSecretTextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *加密群文本消息
+       * 
+ * + * .core.GroupSecretText groupSecretText = 8; + */ + public Builder setGroupSecretText( + com.akaxin.proto.core.CoreProto.GroupSecretText.Builder builderForValue) { + if (groupSecretTextBuilder_ == null) { + groupSecretText_ = builderForValue.build(); + onChanged(); + } else { + groupSecretTextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *加密群文本消息
+       * 
+ * + * .core.GroupSecretText groupSecretText = 8; + */ + public Builder mergeGroupSecretText(com.akaxin.proto.core.CoreProto.GroupSecretText value) { + if (groupSecretTextBuilder_ == null) { + if (groupSecretText_ != null) { + groupSecretText_ = + com.akaxin.proto.core.CoreProto.GroupSecretText.newBuilder(groupSecretText_).mergeFrom(value).buildPartial(); + } else { + groupSecretText_ = value; + } + onChanged(); + } else { + groupSecretTextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *加密群文本消息
+       * 
+ * + * .core.GroupSecretText groupSecretText = 8; + */ + public Builder clearGroupSecretText() { + if (groupSecretTextBuilder_ == null) { + groupSecretText_ = null; + onChanged(); + } else { + groupSecretText_ = null; + groupSecretTextBuilder_ = null; + } + + return this; + } + /** + *
+       *加密群文本消息
+       * 
+ * + * .core.GroupSecretText groupSecretText = 8; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretText.Builder getGroupSecretTextBuilder() { + + onChanged(); + return getGroupSecretTextFieldBuilder().getBuilder(); + } + /** + *
+       *加密群文本消息
+       * 
+ * + * .core.GroupSecretText groupSecretText = 8; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretTextOrBuilder getGroupSecretTextOrBuilder() { + if (groupSecretTextBuilder_ != null) { + return groupSecretTextBuilder_.getMessageOrBuilder(); + } else { + return groupSecretText_ == null ? + com.akaxin.proto.core.CoreProto.GroupSecretText.getDefaultInstance() : groupSecretText_; + } + } + /** + *
+       *加密群文本消息
+       * 
+ * + * .core.GroupSecretText groupSecretText = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretText, com.akaxin.proto.core.CoreProto.GroupSecretText.Builder, com.akaxin.proto.core.CoreProto.GroupSecretTextOrBuilder> + getGroupSecretTextFieldBuilder() { + if (groupSecretTextBuilder_ == null) { + groupSecretTextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretText, com.akaxin.proto.core.CoreProto.GroupSecretText.Builder, com.akaxin.proto.core.CoreProto.GroupSecretTextOrBuilder>( + getGroupSecretText(), + getParentForChildren(), + isClean()); + groupSecretText_ = null; + } + return groupSecretTextBuilder_; + } + + private com.akaxin.proto.core.CoreProto.MsgImage image_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgImage, com.akaxin.proto.core.CoreProto.MsgImage.Builder, com.akaxin.proto.core.CoreProto.MsgImageOrBuilder> imageBuilder_; + /** + *
+       *二人图片消息
+       * 
+ * + * .core.MsgImage image = 9; + */ + public boolean hasImage() { + return imageBuilder_ != null || image_ != null; + } + /** + *
+       *二人图片消息
+       * 
+ * + * .core.MsgImage image = 9; + */ + public com.akaxin.proto.core.CoreProto.MsgImage getImage() { + if (imageBuilder_ == null) { + return image_ == null ? com.akaxin.proto.core.CoreProto.MsgImage.getDefaultInstance() : image_; + } else { + return imageBuilder_.getMessage(); + } + } + /** + *
+       *二人图片消息
+       * 
+ * + * .core.MsgImage image = 9; + */ + public Builder setImage(com.akaxin.proto.core.CoreProto.MsgImage value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + image_ = value; + onChanged(); + } else { + imageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *二人图片消息
+       * 
+ * + * .core.MsgImage image = 9; + */ + public Builder setImage( + com.akaxin.proto.core.CoreProto.MsgImage.Builder builderForValue) { + if (imageBuilder_ == null) { + image_ = builderForValue.build(); + onChanged(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *二人图片消息
+       * 
+ * + * .core.MsgImage image = 9; + */ + public Builder mergeImage(com.akaxin.proto.core.CoreProto.MsgImage value) { + if (imageBuilder_ == null) { + if (image_ != null) { + image_ = + com.akaxin.proto.core.CoreProto.MsgImage.newBuilder(image_).mergeFrom(value).buildPartial(); + } else { + image_ = value; + } + onChanged(); + } else { + imageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *二人图片消息
+       * 
+ * + * .core.MsgImage image = 9; + */ + public Builder clearImage() { + if (imageBuilder_ == null) { + image_ = null; + onChanged(); + } else { + image_ = null; + imageBuilder_ = null; + } + + return this; + } + /** + *
+       *二人图片消息
+       * 
+ * + * .core.MsgImage image = 9; + */ + public com.akaxin.proto.core.CoreProto.MsgImage.Builder getImageBuilder() { + + onChanged(); + return getImageFieldBuilder().getBuilder(); + } + /** + *
+       *二人图片消息
+       * 
+ * + * .core.MsgImage image = 9; + */ + public com.akaxin.proto.core.CoreProto.MsgImageOrBuilder getImageOrBuilder() { + if (imageBuilder_ != null) { + return imageBuilder_.getMessageOrBuilder(); + } else { + return image_ == null ? + com.akaxin.proto.core.CoreProto.MsgImage.getDefaultInstance() : image_; + } + } + /** + *
+       *二人图片消息
+       * 
+ * + * .core.MsgImage image = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgImage, com.akaxin.proto.core.CoreProto.MsgImage.Builder, com.akaxin.proto.core.CoreProto.MsgImageOrBuilder> + getImageFieldBuilder() { + if (imageBuilder_ == null) { + imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgImage, com.akaxin.proto.core.CoreProto.MsgImage.Builder, com.akaxin.proto.core.CoreProto.MsgImageOrBuilder>( + getImage(), + getParentForChildren(), + isClean()); + image_ = null; + } + return imageBuilder_; + } + + private com.akaxin.proto.core.CoreProto.MsgSecretImage secretImage_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgSecretImage, com.akaxin.proto.core.CoreProto.MsgSecretImage.Builder, com.akaxin.proto.core.CoreProto.MsgSecretImageOrBuilder> secretImageBuilder_; + /** + *
+       *加密二人图片消息
+       * 
+ * + * .core.MsgSecretImage secretImage = 10; + */ + public boolean hasSecretImage() { + return secretImageBuilder_ != null || secretImage_ != null; + } + /** + *
+       *加密二人图片消息
+       * 
+ * + * .core.MsgSecretImage secretImage = 10; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretImage getSecretImage() { + if (secretImageBuilder_ == null) { + return secretImage_ == null ? com.akaxin.proto.core.CoreProto.MsgSecretImage.getDefaultInstance() : secretImage_; + } else { + return secretImageBuilder_.getMessage(); + } + } + /** + *
+       *加密二人图片消息
+       * 
+ * + * .core.MsgSecretImage secretImage = 10; + */ + public Builder setSecretImage(com.akaxin.proto.core.CoreProto.MsgSecretImage value) { + if (secretImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + secretImage_ = value; + onChanged(); + } else { + secretImageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *加密二人图片消息
+       * 
+ * + * .core.MsgSecretImage secretImage = 10; + */ + public Builder setSecretImage( + com.akaxin.proto.core.CoreProto.MsgSecretImage.Builder builderForValue) { + if (secretImageBuilder_ == null) { + secretImage_ = builderForValue.build(); + onChanged(); + } else { + secretImageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *加密二人图片消息
+       * 
+ * + * .core.MsgSecretImage secretImage = 10; + */ + public Builder mergeSecretImage(com.akaxin.proto.core.CoreProto.MsgSecretImage value) { + if (secretImageBuilder_ == null) { + if (secretImage_ != null) { + secretImage_ = + com.akaxin.proto.core.CoreProto.MsgSecretImage.newBuilder(secretImage_).mergeFrom(value).buildPartial(); + } else { + secretImage_ = value; + } + onChanged(); + } else { + secretImageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *加密二人图片消息
+       * 
+ * + * .core.MsgSecretImage secretImage = 10; + */ + public Builder clearSecretImage() { + if (secretImageBuilder_ == null) { + secretImage_ = null; + onChanged(); + } else { + secretImage_ = null; + secretImageBuilder_ = null; + } + + return this; + } + /** + *
+       *加密二人图片消息
+       * 
+ * + * .core.MsgSecretImage secretImage = 10; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretImage.Builder getSecretImageBuilder() { + + onChanged(); + return getSecretImageFieldBuilder().getBuilder(); + } + /** + *
+       *加密二人图片消息
+       * 
+ * + * .core.MsgSecretImage secretImage = 10; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretImageOrBuilder getSecretImageOrBuilder() { + if (secretImageBuilder_ != null) { + return secretImageBuilder_.getMessageOrBuilder(); + } else { + return secretImage_ == null ? + com.akaxin.proto.core.CoreProto.MsgSecretImage.getDefaultInstance() : secretImage_; + } + } + /** + *
+       *加密二人图片消息
+       * 
+ * + * .core.MsgSecretImage secretImage = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgSecretImage, com.akaxin.proto.core.CoreProto.MsgSecretImage.Builder, com.akaxin.proto.core.CoreProto.MsgSecretImageOrBuilder> + getSecretImageFieldBuilder() { + if (secretImageBuilder_ == null) { + secretImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgSecretImage, com.akaxin.proto.core.CoreProto.MsgSecretImage.Builder, com.akaxin.proto.core.CoreProto.MsgSecretImageOrBuilder>( + getSecretImage(), + getParentForChildren(), + isClean()); + secretImage_ = null; + } + return secretImageBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupImage groupImage_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupImage, com.akaxin.proto.core.CoreProto.GroupImage.Builder, com.akaxin.proto.core.CoreProto.GroupImageOrBuilder> groupImageBuilder_; + /** + *
+       *群图片消息
+       * 
+ * + * .core.GroupImage groupImage = 11; + */ + public boolean hasGroupImage() { + return groupImageBuilder_ != null || groupImage_ != null; + } + /** + *
+       *群图片消息
+       * 
+ * + * .core.GroupImage groupImage = 11; + */ + public com.akaxin.proto.core.CoreProto.GroupImage getGroupImage() { + if (groupImageBuilder_ == null) { + return groupImage_ == null ? com.akaxin.proto.core.CoreProto.GroupImage.getDefaultInstance() : groupImage_; + } else { + return groupImageBuilder_.getMessage(); + } + } + /** + *
+       *群图片消息
+       * 
+ * + * .core.GroupImage groupImage = 11; + */ + public Builder setGroupImage(com.akaxin.proto.core.CoreProto.GroupImage value) { + if (groupImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupImage_ = value; + onChanged(); + } else { + groupImageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群图片消息
+       * 
+ * + * .core.GroupImage groupImage = 11; + */ + public Builder setGroupImage( + com.akaxin.proto.core.CoreProto.GroupImage.Builder builderForValue) { + if (groupImageBuilder_ == null) { + groupImage_ = builderForValue.build(); + onChanged(); + } else { + groupImageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群图片消息
+       * 
+ * + * .core.GroupImage groupImage = 11; + */ + public Builder mergeGroupImage(com.akaxin.proto.core.CoreProto.GroupImage value) { + if (groupImageBuilder_ == null) { + if (groupImage_ != null) { + groupImage_ = + com.akaxin.proto.core.CoreProto.GroupImage.newBuilder(groupImage_).mergeFrom(value).buildPartial(); + } else { + groupImage_ = value; + } + onChanged(); + } else { + groupImageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群图片消息
+       * 
+ * + * .core.GroupImage groupImage = 11; + */ + public Builder clearGroupImage() { + if (groupImageBuilder_ == null) { + groupImage_ = null; + onChanged(); + } else { + groupImage_ = null; + groupImageBuilder_ = null; + } + + return this; + } + /** + *
+       *群图片消息
+       * 
+ * + * .core.GroupImage groupImage = 11; + */ + public com.akaxin.proto.core.CoreProto.GroupImage.Builder getGroupImageBuilder() { + + onChanged(); + return getGroupImageFieldBuilder().getBuilder(); + } + /** + *
+       *群图片消息
+       * 
+ * + * .core.GroupImage groupImage = 11; + */ + public com.akaxin.proto.core.CoreProto.GroupImageOrBuilder getGroupImageOrBuilder() { + if (groupImageBuilder_ != null) { + return groupImageBuilder_.getMessageOrBuilder(); + } else { + return groupImage_ == null ? + com.akaxin.proto.core.CoreProto.GroupImage.getDefaultInstance() : groupImage_; + } + } + /** + *
+       *群图片消息
+       * 
+ * + * .core.GroupImage groupImage = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupImage, com.akaxin.proto.core.CoreProto.GroupImage.Builder, com.akaxin.proto.core.CoreProto.GroupImageOrBuilder> + getGroupImageFieldBuilder() { + if (groupImageBuilder_ == null) { + groupImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupImage, com.akaxin.proto.core.CoreProto.GroupImage.Builder, com.akaxin.proto.core.CoreProto.GroupImageOrBuilder>( + getGroupImage(), + getParentForChildren(), + isClean()); + groupImage_ = null; + } + return groupImageBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupSecretImage groupSecretImage_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretImage, com.akaxin.proto.core.CoreProto.GroupSecretImage.Builder, com.akaxin.proto.core.CoreProto.GroupSecretImageOrBuilder> groupSecretImageBuilder_; + /** + *
+       *加密群图片消息
+       * 
+ * + * .core.GroupSecretImage groupSecretImage = 12; + */ + public boolean hasGroupSecretImage() { + return groupSecretImageBuilder_ != null || groupSecretImage_ != null; + } + /** + *
+       *加密群图片消息
+       * 
+ * + * .core.GroupSecretImage groupSecretImage = 12; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretImage getGroupSecretImage() { + if (groupSecretImageBuilder_ == null) { + return groupSecretImage_ == null ? com.akaxin.proto.core.CoreProto.GroupSecretImage.getDefaultInstance() : groupSecretImage_; + } else { + return groupSecretImageBuilder_.getMessage(); + } + } + /** + *
+       *加密群图片消息
+       * 
+ * + * .core.GroupSecretImage groupSecretImage = 12; + */ + public Builder setGroupSecretImage(com.akaxin.proto.core.CoreProto.GroupSecretImage value) { + if (groupSecretImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupSecretImage_ = value; + onChanged(); + } else { + groupSecretImageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *加密群图片消息
+       * 
+ * + * .core.GroupSecretImage groupSecretImage = 12; + */ + public Builder setGroupSecretImage( + com.akaxin.proto.core.CoreProto.GroupSecretImage.Builder builderForValue) { + if (groupSecretImageBuilder_ == null) { + groupSecretImage_ = builderForValue.build(); + onChanged(); + } else { + groupSecretImageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *加密群图片消息
+       * 
+ * + * .core.GroupSecretImage groupSecretImage = 12; + */ + public Builder mergeGroupSecretImage(com.akaxin.proto.core.CoreProto.GroupSecretImage value) { + if (groupSecretImageBuilder_ == null) { + if (groupSecretImage_ != null) { + groupSecretImage_ = + com.akaxin.proto.core.CoreProto.GroupSecretImage.newBuilder(groupSecretImage_).mergeFrom(value).buildPartial(); + } else { + groupSecretImage_ = value; + } + onChanged(); + } else { + groupSecretImageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *加密群图片消息
+       * 
+ * + * .core.GroupSecretImage groupSecretImage = 12; + */ + public Builder clearGroupSecretImage() { + if (groupSecretImageBuilder_ == null) { + groupSecretImage_ = null; + onChanged(); + } else { + groupSecretImage_ = null; + groupSecretImageBuilder_ = null; + } + + return this; + } + /** + *
+       *加密群图片消息
+       * 
+ * + * .core.GroupSecretImage groupSecretImage = 12; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretImage.Builder getGroupSecretImageBuilder() { + + onChanged(); + return getGroupSecretImageFieldBuilder().getBuilder(); + } + /** + *
+       *加密群图片消息
+       * 
+ * + * .core.GroupSecretImage groupSecretImage = 12; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretImageOrBuilder getGroupSecretImageOrBuilder() { + if (groupSecretImageBuilder_ != null) { + return groupSecretImageBuilder_.getMessageOrBuilder(); + } else { + return groupSecretImage_ == null ? + com.akaxin.proto.core.CoreProto.GroupSecretImage.getDefaultInstance() : groupSecretImage_; + } + } + /** + *
+       *加密群图片消息
+       * 
+ * + * .core.GroupSecretImage groupSecretImage = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretImage, com.akaxin.proto.core.CoreProto.GroupSecretImage.Builder, com.akaxin.proto.core.CoreProto.GroupSecretImageOrBuilder> + getGroupSecretImageFieldBuilder() { + if (groupSecretImageBuilder_ == null) { + groupSecretImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretImage, com.akaxin.proto.core.CoreProto.GroupSecretImage.Builder, com.akaxin.proto.core.CoreProto.GroupSecretImageOrBuilder>( + getGroupSecretImage(), + getParentForChildren(), + isClean()); + groupSecretImage_ = null; + } + return groupSecretImageBuilder_; + } + + private com.akaxin.proto.core.CoreProto.MsgVoice voice_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgVoice, com.akaxin.proto.core.CoreProto.MsgVoice.Builder, com.akaxin.proto.core.CoreProto.MsgVoiceOrBuilder> voiceBuilder_; + /** + *
+       *二人语音消息
+       * 
+ * + * .core.MsgVoice voice = 13; + */ + public boolean hasVoice() { + return voiceBuilder_ != null || voice_ != null; + } + /** + *
+       *二人语音消息
+       * 
+ * + * .core.MsgVoice voice = 13; + */ + public com.akaxin.proto.core.CoreProto.MsgVoice getVoice() { + if (voiceBuilder_ == null) { + return voice_ == null ? com.akaxin.proto.core.CoreProto.MsgVoice.getDefaultInstance() : voice_; + } else { + return voiceBuilder_.getMessage(); + } + } + /** + *
+       *二人语音消息
+       * 
+ * + * .core.MsgVoice voice = 13; + */ + public Builder setVoice(com.akaxin.proto.core.CoreProto.MsgVoice value) { + if (voiceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + voice_ = value; + onChanged(); + } else { + voiceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *二人语音消息
+       * 
+ * + * .core.MsgVoice voice = 13; + */ + public Builder setVoice( + com.akaxin.proto.core.CoreProto.MsgVoice.Builder builderForValue) { + if (voiceBuilder_ == null) { + voice_ = builderForValue.build(); + onChanged(); + } else { + voiceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *二人语音消息
+       * 
+ * + * .core.MsgVoice voice = 13; + */ + public Builder mergeVoice(com.akaxin.proto.core.CoreProto.MsgVoice value) { + if (voiceBuilder_ == null) { + if (voice_ != null) { + voice_ = + com.akaxin.proto.core.CoreProto.MsgVoice.newBuilder(voice_).mergeFrom(value).buildPartial(); + } else { + voice_ = value; + } + onChanged(); + } else { + voiceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *二人语音消息
+       * 
+ * + * .core.MsgVoice voice = 13; + */ + public Builder clearVoice() { + if (voiceBuilder_ == null) { + voice_ = null; + onChanged(); + } else { + voice_ = null; + voiceBuilder_ = null; + } + + return this; + } + /** + *
+       *二人语音消息
+       * 
+ * + * .core.MsgVoice voice = 13; + */ + public com.akaxin.proto.core.CoreProto.MsgVoice.Builder getVoiceBuilder() { + + onChanged(); + return getVoiceFieldBuilder().getBuilder(); + } + /** + *
+       *二人语音消息
+       * 
+ * + * .core.MsgVoice voice = 13; + */ + public com.akaxin.proto.core.CoreProto.MsgVoiceOrBuilder getVoiceOrBuilder() { + if (voiceBuilder_ != null) { + return voiceBuilder_.getMessageOrBuilder(); + } else { + return voice_ == null ? + com.akaxin.proto.core.CoreProto.MsgVoice.getDefaultInstance() : voice_; + } + } + /** + *
+       *二人语音消息
+       * 
+ * + * .core.MsgVoice voice = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgVoice, com.akaxin.proto.core.CoreProto.MsgVoice.Builder, com.akaxin.proto.core.CoreProto.MsgVoiceOrBuilder> + getVoiceFieldBuilder() { + if (voiceBuilder_ == null) { + voiceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgVoice, com.akaxin.proto.core.CoreProto.MsgVoice.Builder, com.akaxin.proto.core.CoreProto.MsgVoiceOrBuilder>( + getVoice(), + getParentForChildren(), + isClean()); + voice_ = null; + } + return voiceBuilder_; + } + + private com.akaxin.proto.core.CoreProto.MsgSecretVoice secretVoice_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgSecretVoice, com.akaxin.proto.core.CoreProto.MsgSecretVoice.Builder, com.akaxin.proto.core.CoreProto.MsgSecretVoiceOrBuilder> secretVoiceBuilder_; + /** + *
+       *加密二人语音消息
+       * 
+ * + * .core.MsgSecretVoice secretVoice = 14; + */ + public boolean hasSecretVoice() { + return secretVoiceBuilder_ != null || secretVoice_ != null; + } + /** + *
+       *加密二人语音消息
+       * 
+ * + * .core.MsgSecretVoice secretVoice = 14; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretVoice getSecretVoice() { + if (secretVoiceBuilder_ == null) { + return secretVoice_ == null ? com.akaxin.proto.core.CoreProto.MsgSecretVoice.getDefaultInstance() : secretVoice_; + } else { + return secretVoiceBuilder_.getMessage(); + } + } + /** + *
+       *加密二人语音消息
+       * 
+ * + * .core.MsgSecretVoice secretVoice = 14; + */ + public Builder setSecretVoice(com.akaxin.proto.core.CoreProto.MsgSecretVoice value) { + if (secretVoiceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + secretVoice_ = value; + onChanged(); + } else { + secretVoiceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *加密二人语音消息
+       * 
+ * + * .core.MsgSecretVoice secretVoice = 14; + */ + public Builder setSecretVoice( + com.akaxin.proto.core.CoreProto.MsgSecretVoice.Builder builderForValue) { + if (secretVoiceBuilder_ == null) { + secretVoice_ = builderForValue.build(); + onChanged(); + } else { + secretVoiceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *加密二人语音消息
+       * 
+ * + * .core.MsgSecretVoice secretVoice = 14; + */ + public Builder mergeSecretVoice(com.akaxin.proto.core.CoreProto.MsgSecretVoice value) { + if (secretVoiceBuilder_ == null) { + if (secretVoice_ != null) { + secretVoice_ = + com.akaxin.proto.core.CoreProto.MsgSecretVoice.newBuilder(secretVoice_).mergeFrom(value).buildPartial(); + } else { + secretVoice_ = value; + } + onChanged(); + } else { + secretVoiceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *加密二人语音消息
+       * 
+ * + * .core.MsgSecretVoice secretVoice = 14; + */ + public Builder clearSecretVoice() { + if (secretVoiceBuilder_ == null) { + secretVoice_ = null; + onChanged(); + } else { + secretVoice_ = null; + secretVoiceBuilder_ = null; + } + + return this; + } + /** + *
+       *加密二人语音消息
+       * 
+ * + * .core.MsgSecretVoice secretVoice = 14; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretVoice.Builder getSecretVoiceBuilder() { + + onChanged(); + return getSecretVoiceFieldBuilder().getBuilder(); + } + /** + *
+       *加密二人语音消息
+       * 
+ * + * .core.MsgSecretVoice secretVoice = 14; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretVoiceOrBuilder getSecretVoiceOrBuilder() { + if (secretVoiceBuilder_ != null) { + return secretVoiceBuilder_.getMessageOrBuilder(); + } else { + return secretVoice_ == null ? + com.akaxin.proto.core.CoreProto.MsgSecretVoice.getDefaultInstance() : secretVoice_; + } + } + /** + *
+       *加密二人语音消息
+       * 
+ * + * .core.MsgSecretVoice secretVoice = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgSecretVoice, com.akaxin.proto.core.CoreProto.MsgSecretVoice.Builder, com.akaxin.proto.core.CoreProto.MsgSecretVoiceOrBuilder> + getSecretVoiceFieldBuilder() { + if (secretVoiceBuilder_ == null) { + secretVoiceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgSecretVoice, com.akaxin.proto.core.CoreProto.MsgSecretVoice.Builder, com.akaxin.proto.core.CoreProto.MsgSecretVoiceOrBuilder>( + getSecretVoice(), + getParentForChildren(), + isClean()); + secretVoice_ = null; + } + return secretVoiceBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupVoice groupVoice_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupVoice, com.akaxin.proto.core.CoreProto.GroupVoice.Builder, com.akaxin.proto.core.CoreProto.GroupVoiceOrBuilder> groupVoiceBuilder_; + /** + *
+       *群语音消息
+       * 
+ * + * .core.GroupVoice groupVoice = 15; + */ + public boolean hasGroupVoice() { + return groupVoiceBuilder_ != null || groupVoice_ != null; + } + /** + *
+       *群语音消息
+       * 
+ * + * .core.GroupVoice groupVoice = 15; + */ + public com.akaxin.proto.core.CoreProto.GroupVoice getGroupVoice() { + if (groupVoiceBuilder_ == null) { + return groupVoice_ == null ? com.akaxin.proto.core.CoreProto.GroupVoice.getDefaultInstance() : groupVoice_; + } else { + return groupVoiceBuilder_.getMessage(); + } + } + /** + *
+       *群语音消息
+       * 
+ * + * .core.GroupVoice groupVoice = 15; + */ + public Builder setGroupVoice(com.akaxin.proto.core.CoreProto.GroupVoice value) { + if (groupVoiceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupVoice_ = value; + onChanged(); + } else { + groupVoiceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群语音消息
+       * 
+ * + * .core.GroupVoice groupVoice = 15; + */ + public Builder setGroupVoice( + com.akaxin.proto.core.CoreProto.GroupVoice.Builder builderForValue) { + if (groupVoiceBuilder_ == null) { + groupVoice_ = builderForValue.build(); + onChanged(); + } else { + groupVoiceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群语音消息
+       * 
+ * + * .core.GroupVoice groupVoice = 15; + */ + public Builder mergeGroupVoice(com.akaxin.proto.core.CoreProto.GroupVoice value) { + if (groupVoiceBuilder_ == null) { + if (groupVoice_ != null) { + groupVoice_ = + com.akaxin.proto.core.CoreProto.GroupVoice.newBuilder(groupVoice_).mergeFrom(value).buildPartial(); + } else { + groupVoice_ = value; + } + onChanged(); + } else { + groupVoiceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群语音消息
+       * 
+ * + * .core.GroupVoice groupVoice = 15; + */ + public Builder clearGroupVoice() { + if (groupVoiceBuilder_ == null) { + groupVoice_ = null; + onChanged(); + } else { + groupVoice_ = null; + groupVoiceBuilder_ = null; + } + + return this; + } + /** + *
+       *群语音消息
+       * 
+ * + * .core.GroupVoice groupVoice = 15; + */ + public com.akaxin.proto.core.CoreProto.GroupVoice.Builder getGroupVoiceBuilder() { + + onChanged(); + return getGroupVoiceFieldBuilder().getBuilder(); + } + /** + *
+       *群语音消息
+       * 
+ * + * .core.GroupVoice groupVoice = 15; + */ + public com.akaxin.proto.core.CoreProto.GroupVoiceOrBuilder getGroupVoiceOrBuilder() { + if (groupVoiceBuilder_ != null) { + return groupVoiceBuilder_.getMessageOrBuilder(); + } else { + return groupVoice_ == null ? + com.akaxin.proto.core.CoreProto.GroupVoice.getDefaultInstance() : groupVoice_; + } + } + /** + *
+       *群语音消息
+       * 
+ * + * .core.GroupVoice groupVoice = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupVoice, com.akaxin.proto.core.CoreProto.GroupVoice.Builder, com.akaxin.proto.core.CoreProto.GroupVoiceOrBuilder> + getGroupVoiceFieldBuilder() { + if (groupVoiceBuilder_ == null) { + groupVoiceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupVoice, com.akaxin.proto.core.CoreProto.GroupVoice.Builder, com.akaxin.proto.core.CoreProto.GroupVoiceOrBuilder>( + getGroupVoice(), + getParentForChildren(), + isClean()); + groupVoice_ = null; + } + return groupVoiceBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupSecretVoice groupSecretVoice_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretVoice, com.akaxin.proto.core.CoreProto.GroupSecretVoice.Builder, com.akaxin.proto.core.CoreProto.GroupSecretVoiceOrBuilder> groupSecretVoiceBuilder_; + /** + *
+       *群加密语音消息
+       * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 16; + */ + public boolean hasGroupSecretVoice() { + return groupSecretVoiceBuilder_ != null || groupSecretVoice_ != null; + } + /** + *
+       *群加密语音消息
+       * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 16; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretVoice getGroupSecretVoice() { + if (groupSecretVoiceBuilder_ == null) { + return groupSecretVoice_ == null ? com.akaxin.proto.core.CoreProto.GroupSecretVoice.getDefaultInstance() : groupSecretVoice_; + } else { + return groupSecretVoiceBuilder_.getMessage(); + } + } + /** + *
+       *群加密语音消息
+       * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 16; + */ + public Builder setGroupSecretVoice(com.akaxin.proto.core.CoreProto.GroupSecretVoice value) { + if (groupSecretVoiceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupSecretVoice_ = value; + onChanged(); + } else { + groupSecretVoiceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群加密语音消息
+       * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 16; + */ + public Builder setGroupSecretVoice( + com.akaxin.proto.core.CoreProto.GroupSecretVoice.Builder builderForValue) { + if (groupSecretVoiceBuilder_ == null) { + groupSecretVoice_ = builderForValue.build(); + onChanged(); + } else { + groupSecretVoiceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群加密语音消息
+       * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 16; + */ + public Builder mergeGroupSecretVoice(com.akaxin.proto.core.CoreProto.GroupSecretVoice value) { + if (groupSecretVoiceBuilder_ == null) { + if (groupSecretVoice_ != null) { + groupSecretVoice_ = + com.akaxin.proto.core.CoreProto.GroupSecretVoice.newBuilder(groupSecretVoice_).mergeFrom(value).buildPartial(); + } else { + groupSecretVoice_ = value; + } + onChanged(); + } else { + groupSecretVoiceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群加密语音消息
+       * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 16; + */ + public Builder clearGroupSecretVoice() { + if (groupSecretVoiceBuilder_ == null) { + groupSecretVoice_ = null; + onChanged(); + } else { + groupSecretVoice_ = null; + groupSecretVoiceBuilder_ = null; + } + + return this; + } + /** + *
+       *群加密语音消息
+       * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 16; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretVoice.Builder getGroupSecretVoiceBuilder() { + + onChanged(); + return getGroupSecretVoiceFieldBuilder().getBuilder(); + } + /** + *
+       *群加密语音消息
+       * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 16; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretVoiceOrBuilder getGroupSecretVoiceOrBuilder() { + if (groupSecretVoiceBuilder_ != null) { + return groupSecretVoiceBuilder_.getMessageOrBuilder(); + } else { + return groupSecretVoice_ == null ? + com.akaxin.proto.core.CoreProto.GroupSecretVoice.getDefaultInstance() : groupSecretVoice_; + } + } + /** + *
+       *群加密语音消息
+       * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretVoice, com.akaxin.proto.core.CoreProto.GroupSecretVoice.Builder, com.akaxin.proto.core.CoreProto.GroupSecretVoiceOrBuilder> + getGroupSecretVoiceFieldBuilder() { + if (groupSecretVoiceBuilder_ == null) { + groupSecretVoiceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretVoice, com.akaxin.proto.core.CoreProto.GroupSecretVoice.Builder, com.akaxin.proto.core.CoreProto.GroupSecretVoiceOrBuilder>( + getGroupSecretVoice(), + getParentForChildren(), + isClean()); + groupSecretVoice_ = null; + } + return groupSecretVoiceBuilder_; + } + + private com.akaxin.proto.core.CoreProto.U2Map u2Map_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2Map, com.akaxin.proto.core.CoreProto.U2Map.Builder, com.akaxin.proto.core.CoreProto.U2MapOrBuilder> u2MapBuilder_; + /** + *
+       *v0.4.3 版本未使用
+       * 
+ * + * .core.U2Map u2Map = 17; + */ + public boolean hasU2Map() { + return u2MapBuilder_ != null || u2Map_ != null; + } + /** + *
+       *v0.4.3 版本未使用
+       * 
+ * + * .core.U2Map u2Map = 17; + */ + public com.akaxin.proto.core.CoreProto.U2Map getU2Map() { + if (u2MapBuilder_ == null) { + return u2Map_ == null ? com.akaxin.proto.core.CoreProto.U2Map.getDefaultInstance() : u2Map_; + } else { + return u2MapBuilder_.getMessage(); + } + } + /** + *
+       *v0.4.3 版本未使用
+       * 
+ * + * .core.U2Map u2Map = 17; + */ + public Builder setU2Map(com.akaxin.proto.core.CoreProto.U2Map value) { + if (u2MapBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + u2Map_ = value; + onChanged(); + } else { + u2MapBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *v0.4.3 版本未使用
+       * 
+ * + * .core.U2Map u2Map = 17; + */ + public Builder setU2Map( + com.akaxin.proto.core.CoreProto.U2Map.Builder builderForValue) { + if (u2MapBuilder_ == null) { + u2Map_ = builderForValue.build(); + onChanged(); + } else { + u2MapBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *v0.4.3 版本未使用
+       * 
+ * + * .core.U2Map u2Map = 17; + */ + public Builder mergeU2Map(com.akaxin.proto.core.CoreProto.U2Map value) { + if (u2MapBuilder_ == null) { + if (u2Map_ != null) { + u2Map_ = + com.akaxin.proto.core.CoreProto.U2Map.newBuilder(u2Map_).mergeFrom(value).buildPartial(); + } else { + u2Map_ = value; + } + onChanged(); + } else { + u2MapBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *v0.4.3 版本未使用
+       * 
+ * + * .core.U2Map u2Map = 17; + */ + public Builder clearU2Map() { + if (u2MapBuilder_ == null) { + u2Map_ = null; + onChanged(); + } else { + u2Map_ = null; + u2MapBuilder_ = null; + } + + return this; + } + /** + *
+       *v0.4.3 版本未使用
+       * 
+ * + * .core.U2Map u2Map = 17; + */ + public com.akaxin.proto.core.CoreProto.U2Map.Builder getU2MapBuilder() { + + onChanged(); + return getU2MapFieldBuilder().getBuilder(); + } + /** + *
+       *v0.4.3 版本未使用
+       * 
+ * + * .core.U2Map u2Map = 17; + */ + public com.akaxin.proto.core.CoreProto.U2MapOrBuilder getU2MapOrBuilder() { + if (u2MapBuilder_ != null) { + return u2MapBuilder_.getMessageOrBuilder(); + } else { + return u2Map_ == null ? + com.akaxin.proto.core.CoreProto.U2Map.getDefaultInstance() : u2Map_; + } + } + /** + *
+       *v0.4.3 版本未使用
+       * 
+ * + * .core.U2Map u2Map = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2Map, com.akaxin.proto.core.CoreProto.U2Map.Builder, com.akaxin.proto.core.CoreProto.U2MapOrBuilder> + getU2MapFieldBuilder() { + if (u2MapBuilder_ == null) { + u2MapBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2Map, com.akaxin.proto.core.CoreProto.U2Map.Builder, com.akaxin.proto.core.CoreProto.U2MapOrBuilder>( + getU2Map(), + getParentForChildren(), + isClean()); + u2Map_ = null; + } + return u2MapBuilder_; + } + + private com.akaxin.proto.core.CoreProto.U2SecretMap u2SecretMap_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2SecretMap, com.akaxin.proto.core.CoreProto.U2SecretMap.Builder, com.akaxin.proto.core.CoreProto.U2SecretMapOrBuilder> u2SecretMapBuilder_; + /** + *
+       *加密地图消息
+       * 
+ * + * .core.U2SecretMap u2SecretMap = 18; + */ + public boolean hasU2SecretMap() { + return u2SecretMapBuilder_ != null || u2SecretMap_ != null; + } + /** + *
+       *加密地图消息
+       * 
+ * + * .core.U2SecretMap u2SecretMap = 18; + */ + public com.akaxin.proto.core.CoreProto.U2SecretMap getU2SecretMap() { + if (u2SecretMapBuilder_ == null) { + return u2SecretMap_ == null ? com.akaxin.proto.core.CoreProto.U2SecretMap.getDefaultInstance() : u2SecretMap_; + } else { + return u2SecretMapBuilder_.getMessage(); + } + } + /** + *
+       *加密地图消息
+       * 
+ * + * .core.U2SecretMap u2SecretMap = 18; + */ + public Builder setU2SecretMap(com.akaxin.proto.core.CoreProto.U2SecretMap value) { + if (u2SecretMapBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + u2SecretMap_ = value; + onChanged(); + } else { + u2SecretMapBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *加密地图消息
+       * 
+ * + * .core.U2SecretMap u2SecretMap = 18; + */ + public Builder setU2SecretMap( + com.akaxin.proto.core.CoreProto.U2SecretMap.Builder builderForValue) { + if (u2SecretMapBuilder_ == null) { + u2SecretMap_ = builderForValue.build(); + onChanged(); + } else { + u2SecretMapBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *加密地图消息
+       * 
+ * + * .core.U2SecretMap u2SecretMap = 18; + */ + public Builder mergeU2SecretMap(com.akaxin.proto.core.CoreProto.U2SecretMap value) { + if (u2SecretMapBuilder_ == null) { + if (u2SecretMap_ != null) { + u2SecretMap_ = + com.akaxin.proto.core.CoreProto.U2SecretMap.newBuilder(u2SecretMap_).mergeFrom(value).buildPartial(); + } else { + u2SecretMap_ = value; + } + onChanged(); + } else { + u2SecretMapBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *加密地图消息
+       * 
+ * + * .core.U2SecretMap u2SecretMap = 18; + */ + public Builder clearU2SecretMap() { + if (u2SecretMapBuilder_ == null) { + u2SecretMap_ = null; + onChanged(); + } else { + u2SecretMap_ = null; + u2SecretMapBuilder_ = null; + } + + return this; + } + /** + *
+       *加密地图消息
+       * 
+ * + * .core.U2SecretMap u2SecretMap = 18; + */ + public com.akaxin.proto.core.CoreProto.U2SecretMap.Builder getU2SecretMapBuilder() { + + onChanged(); + return getU2SecretMapFieldBuilder().getBuilder(); + } + /** + *
+       *加密地图消息
+       * 
+ * + * .core.U2SecretMap u2SecretMap = 18; + */ + public com.akaxin.proto.core.CoreProto.U2SecretMapOrBuilder getU2SecretMapOrBuilder() { + if (u2SecretMapBuilder_ != null) { + return u2SecretMapBuilder_.getMessageOrBuilder(); + } else { + return u2SecretMap_ == null ? + com.akaxin.proto.core.CoreProto.U2SecretMap.getDefaultInstance() : u2SecretMap_; + } + } + /** + *
+       *加密地图消息
+       * 
+ * + * .core.U2SecretMap u2SecretMap = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2SecretMap, com.akaxin.proto.core.CoreProto.U2SecretMap.Builder, com.akaxin.proto.core.CoreProto.U2SecretMapOrBuilder> + getU2SecretMapFieldBuilder() { + if (u2SecretMapBuilder_ == null) { + u2SecretMapBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2SecretMap, com.akaxin.proto.core.CoreProto.U2SecretMap.Builder, com.akaxin.proto.core.CoreProto.U2SecretMapOrBuilder>( + getU2SecretMap(), + getParentForChildren(), + isClean()); + u2SecretMap_ = null; + } + return u2SecretMapBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupMap groupMap_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupMap, com.akaxin.proto.core.CoreProto.GroupMap.Builder, com.akaxin.proto.core.CoreProto.GroupMapOrBuilder> groupMapBuilder_; + /** + *
+       *群地图
+       * 
+ * + * .core.GroupMap groupMap = 19; + */ + public boolean hasGroupMap() { + return groupMapBuilder_ != null || groupMap_ != null; + } + /** + *
+       *群地图
+       * 
+ * + * .core.GroupMap groupMap = 19; + */ + public com.akaxin.proto.core.CoreProto.GroupMap getGroupMap() { + if (groupMapBuilder_ == null) { + return groupMap_ == null ? com.akaxin.proto.core.CoreProto.GroupMap.getDefaultInstance() : groupMap_; + } else { + return groupMapBuilder_.getMessage(); + } + } + /** + *
+       *群地图
+       * 
+ * + * .core.GroupMap groupMap = 19; + */ + public Builder setGroupMap(com.akaxin.proto.core.CoreProto.GroupMap value) { + if (groupMapBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupMap_ = value; + onChanged(); + } else { + groupMapBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群地图
+       * 
+ * + * .core.GroupMap groupMap = 19; + */ + public Builder setGroupMap( + com.akaxin.proto.core.CoreProto.GroupMap.Builder builderForValue) { + if (groupMapBuilder_ == null) { + groupMap_ = builderForValue.build(); + onChanged(); + } else { + groupMapBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群地图
+       * 
+ * + * .core.GroupMap groupMap = 19; + */ + public Builder mergeGroupMap(com.akaxin.proto.core.CoreProto.GroupMap value) { + if (groupMapBuilder_ == null) { + if (groupMap_ != null) { + groupMap_ = + com.akaxin.proto.core.CoreProto.GroupMap.newBuilder(groupMap_).mergeFrom(value).buildPartial(); + } else { + groupMap_ = value; + } + onChanged(); + } else { + groupMapBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群地图
+       * 
+ * + * .core.GroupMap groupMap = 19; + */ + public Builder clearGroupMap() { + if (groupMapBuilder_ == null) { + groupMap_ = null; + onChanged(); + } else { + groupMap_ = null; + groupMapBuilder_ = null; + } + + return this; + } + /** + *
+       *群地图
+       * 
+ * + * .core.GroupMap groupMap = 19; + */ + public com.akaxin.proto.core.CoreProto.GroupMap.Builder getGroupMapBuilder() { + + onChanged(); + return getGroupMapFieldBuilder().getBuilder(); + } + /** + *
+       *群地图
+       * 
+ * + * .core.GroupMap groupMap = 19; + */ + public com.akaxin.proto.core.CoreProto.GroupMapOrBuilder getGroupMapOrBuilder() { + if (groupMapBuilder_ != null) { + return groupMapBuilder_.getMessageOrBuilder(); + } else { + return groupMap_ == null ? + com.akaxin.proto.core.CoreProto.GroupMap.getDefaultInstance() : groupMap_; + } + } + /** + *
+       *群地图
+       * 
+ * + * .core.GroupMap groupMap = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupMap, com.akaxin.proto.core.CoreProto.GroupMap.Builder, com.akaxin.proto.core.CoreProto.GroupMapOrBuilder> + getGroupMapFieldBuilder() { + if (groupMapBuilder_ == null) { + groupMapBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupMap, com.akaxin.proto.core.CoreProto.GroupMap.Builder, com.akaxin.proto.core.CoreProto.GroupMapOrBuilder>( + getGroupMap(), + getParentForChildren(), + isClean()); + groupMap_ = null; + } + return groupMapBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupSecretMap groupSecretMap_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretMap, com.akaxin.proto.core.CoreProto.GroupSecretMap.Builder, com.akaxin.proto.core.CoreProto.GroupSecretMapOrBuilder> groupSecretMapBuilder_; + /** + *
+       *群加密地图
+       * 
+ * + * .core.GroupSecretMap groupSecretMap = 20; + */ + public boolean hasGroupSecretMap() { + return groupSecretMapBuilder_ != null || groupSecretMap_ != null; + } + /** + *
+       *群加密地图
+       * 
+ * + * .core.GroupSecretMap groupSecretMap = 20; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretMap getGroupSecretMap() { + if (groupSecretMapBuilder_ == null) { + return groupSecretMap_ == null ? com.akaxin.proto.core.CoreProto.GroupSecretMap.getDefaultInstance() : groupSecretMap_; + } else { + return groupSecretMapBuilder_.getMessage(); + } + } + /** + *
+       *群加密地图
+       * 
+ * + * .core.GroupSecretMap groupSecretMap = 20; + */ + public Builder setGroupSecretMap(com.akaxin.proto.core.CoreProto.GroupSecretMap value) { + if (groupSecretMapBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupSecretMap_ = value; + onChanged(); + } else { + groupSecretMapBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群加密地图
+       * 
+ * + * .core.GroupSecretMap groupSecretMap = 20; + */ + public Builder setGroupSecretMap( + com.akaxin.proto.core.CoreProto.GroupSecretMap.Builder builderForValue) { + if (groupSecretMapBuilder_ == null) { + groupSecretMap_ = builderForValue.build(); + onChanged(); + } else { + groupSecretMapBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群加密地图
+       * 
+ * + * .core.GroupSecretMap groupSecretMap = 20; + */ + public Builder mergeGroupSecretMap(com.akaxin.proto.core.CoreProto.GroupSecretMap value) { + if (groupSecretMapBuilder_ == null) { + if (groupSecretMap_ != null) { + groupSecretMap_ = + com.akaxin.proto.core.CoreProto.GroupSecretMap.newBuilder(groupSecretMap_).mergeFrom(value).buildPartial(); + } else { + groupSecretMap_ = value; + } + onChanged(); + } else { + groupSecretMapBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群加密地图
+       * 
+ * + * .core.GroupSecretMap groupSecretMap = 20; + */ + public Builder clearGroupSecretMap() { + if (groupSecretMapBuilder_ == null) { + groupSecretMap_ = null; + onChanged(); + } else { + groupSecretMap_ = null; + groupSecretMapBuilder_ = null; + } + + return this; + } + /** + *
+       *群加密地图
+       * 
+ * + * .core.GroupSecretMap groupSecretMap = 20; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretMap.Builder getGroupSecretMapBuilder() { + + onChanged(); + return getGroupSecretMapFieldBuilder().getBuilder(); + } + /** + *
+       *群加密地图
+       * 
+ * + * .core.GroupSecretMap groupSecretMap = 20; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretMapOrBuilder getGroupSecretMapOrBuilder() { + if (groupSecretMapBuilder_ != null) { + return groupSecretMapBuilder_.getMessageOrBuilder(); + } else { + return groupSecretMap_ == null ? + com.akaxin.proto.core.CoreProto.GroupSecretMap.getDefaultInstance() : groupSecretMap_; + } + } + /** + *
+       *群加密地图
+       * 
+ * + * .core.GroupSecretMap groupSecretMap = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretMap, com.akaxin.proto.core.CoreProto.GroupSecretMap.Builder, com.akaxin.proto.core.CoreProto.GroupSecretMapOrBuilder> + getGroupSecretMapFieldBuilder() { + if (groupSecretMapBuilder_ == null) { + groupSecretMapBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretMap, com.akaxin.proto.core.CoreProto.GroupSecretMap.Builder, com.akaxin.proto.core.CoreProto.GroupSecretMapOrBuilder>( + getGroupSecretMap(), + getParentForChildren(), + isClean()); + groupSecretMap_ = null; + } + return groupSecretMapBuilder_; + } + + private com.akaxin.proto.core.CoreProto.U2MsgNotice u2MsgNotice_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2MsgNotice, com.akaxin.proto.core.CoreProto.U2MsgNotice.Builder, com.akaxin.proto.core.CoreProto.U2MsgNoticeOrBuilder> u2MsgNoticeBuilder_; + /** + *
+       *二人消息通知
+       * 
+ * + * .core.U2MsgNotice u2MsgNotice = 21; + */ + public boolean hasU2MsgNotice() { + return u2MsgNoticeBuilder_ != null || u2MsgNotice_ != null; + } + /** + *
+       *二人消息通知
+       * 
+ * + * .core.U2MsgNotice u2MsgNotice = 21; + */ + public com.akaxin.proto.core.CoreProto.U2MsgNotice getU2MsgNotice() { + if (u2MsgNoticeBuilder_ == null) { + return u2MsgNotice_ == null ? com.akaxin.proto.core.CoreProto.U2MsgNotice.getDefaultInstance() : u2MsgNotice_; + } else { + return u2MsgNoticeBuilder_.getMessage(); + } + } + /** + *
+       *二人消息通知
+       * 
+ * + * .core.U2MsgNotice u2MsgNotice = 21; + */ + public Builder setU2MsgNotice(com.akaxin.proto.core.CoreProto.U2MsgNotice value) { + if (u2MsgNoticeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + u2MsgNotice_ = value; + onChanged(); + } else { + u2MsgNoticeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *二人消息通知
+       * 
+ * + * .core.U2MsgNotice u2MsgNotice = 21; + */ + public Builder setU2MsgNotice( + com.akaxin.proto.core.CoreProto.U2MsgNotice.Builder builderForValue) { + if (u2MsgNoticeBuilder_ == null) { + u2MsgNotice_ = builderForValue.build(); + onChanged(); + } else { + u2MsgNoticeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *二人消息通知
+       * 
+ * + * .core.U2MsgNotice u2MsgNotice = 21; + */ + public Builder mergeU2MsgNotice(com.akaxin.proto.core.CoreProto.U2MsgNotice value) { + if (u2MsgNoticeBuilder_ == null) { + if (u2MsgNotice_ != null) { + u2MsgNotice_ = + com.akaxin.proto.core.CoreProto.U2MsgNotice.newBuilder(u2MsgNotice_).mergeFrom(value).buildPartial(); + } else { + u2MsgNotice_ = value; + } + onChanged(); + } else { + u2MsgNoticeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *二人消息通知
+       * 
+ * + * .core.U2MsgNotice u2MsgNotice = 21; + */ + public Builder clearU2MsgNotice() { + if (u2MsgNoticeBuilder_ == null) { + u2MsgNotice_ = null; + onChanged(); + } else { + u2MsgNotice_ = null; + u2MsgNoticeBuilder_ = null; + } + + return this; + } + /** + *
+       *二人消息通知
+       * 
+ * + * .core.U2MsgNotice u2MsgNotice = 21; + */ + public com.akaxin.proto.core.CoreProto.U2MsgNotice.Builder getU2MsgNoticeBuilder() { + + onChanged(); + return getU2MsgNoticeFieldBuilder().getBuilder(); + } + /** + *
+       *二人消息通知
+       * 
+ * + * .core.U2MsgNotice u2MsgNotice = 21; + */ + public com.akaxin.proto.core.CoreProto.U2MsgNoticeOrBuilder getU2MsgNoticeOrBuilder() { + if (u2MsgNoticeBuilder_ != null) { + return u2MsgNoticeBuilder_.getMessageOrBuilder(); + } else { + return u2MsgNotice_ == null ? + com.akaxin.proto.core.CoreProto.U2MsgNotice.getDefaultInstance() : u2MsgNotice_; + } + } + /** + *
+       *二人消息通知
+       * 
+ * + * .core.U2MsgNotice u2MsgNotice = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2MsgNotice, com.akaxin.proto.core.CoreProto.U2MsgNotice.Builder, com.akaxin.proto.core.CoreProto.U2MsgNoticeOrBuilder> + getU2MsgNoticeFieldBuilder() { + if (u2MsgNoticeBuilder_ == null) { + u2MsgNoticeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2MsgNotice, com.akaxin.proto.core.CoreProto.U2MsgNotice.Builder, com.akaxin.proto.core.CoreProto.U2MsgNoticeOrBuilder>( + getU2MsgNotice(), + getParentForChildren(), + isClean()); + u2MsgNotice_ = null; + } + return u2MsgNoticeBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupMsgNotice groupMsgNotice_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupMsgNotice, com.akaxin.proto.core.CoreProto.GroupMsgNotice.Builder, com.akaxin.proto.core.CoreProto.GroupMsgNoticeOrBuilder> groupMsgNoticeBuilder_; + /** + *
+       *群消息通知
+       * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 22; + */ + public boolean hasGroupMsgNotice() { + return groupMsgNoticeBuilder_ != null || groupMsgNotice_ != null; + } + /** + *
+       *群消息通知
+       * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 22; + */ + public com.akaxin.proto.core.CoreProto.GroupMsgNotice getGroupMsgNotice() { + if (groupMsgNoticeBuilder_ == null) { + return groupMsgNotice_ == null ? com.akaxin.proto.core.CoreProto.GroupMsgNotice.getDefaultInstance() : groupMsgNotice_; + } else { + return groupMsgNoticeBuilder_.getMessage(); + } + } + /** + *
+       *群消息通知
+       * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 22; + */ + public Builder setGroupMsgNotice(com.akaxin.proto.core.CoreProto.GroupMsgNotice value) { + if (groupMsgNoticeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupMsgNotice_ = value; + onChanged(); + } else { + groupMsgNoticeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群消息通知
+       * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 22; + */ + public Builder setGroupMsgNotice( + com.akaxin.proto.core.CoreProto.GroupMsgNotice.Builder builderForValue) { + if (groupMsgNoticeBuilder_ == null) { + groupMsgNotice_ = builderForValue.build(); + onChanged(); + } else { + groupMsgNoticeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群消息通知
+       * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 22; + */ + public Builder mergeGroupMsgNotice(com.akaxin.proto.core.CoreProto.GroupMsgNotice value) { + if (groupMsgNoticeBuilder_ == null) { + if (groupMsgNotice_ != null) { + groupMsgNotice_ = + com.akaxin.proto.core.CoreProto.GroupMsgNotice.newBuilder(groupMsgNotice_).mergeFrom(value).buildPartial(); + } else { + groupMsgNotice_ = value; + } + onChanged(); + } else { + groupMsgNoticeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群消息通知
+       * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 22; + */ + public Builder clearGroupMsgNotice() { + if (groupMsgNoticeBuilder_ == null) { + groupMsgNotice_ = null; + onChanged(); + } else { + groupMsgNotice_ = null; + groupMsgNoticeBuilder_ = null; + } + + return this; + } + /** + *
+       *群消息通知
+       * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 22; + */ + public com.akaxin.proto.core.CoreProto.GroupMsgNotice.Builder getGroupMsgNoticeBuilder() { + + onChanged(); + return getGroupMsgNoticeFieldBuilder().getBuilder(); + } + /** + *
+       *群消息通知
+       * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 22; + */ + public com.akaxin.proto.core.CoreProto.GroupMsgNoticeOrBuilder getGroupMsgNoticeOrBuilder() { + if (groupMsgNoticeBuilder_ != null) { + return groupMsgNoticeBuilder_.getMessageOrBuilder(); + } else { + return groupMsgNotice_ == null ? + com.akaxin.proto.core.CoreProto.GroupMsgNotice.getDefaultInstance() : groupMsgNotice_; + } + } + /** + *
+       *群消息通知
+       * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 22; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupMsgNotice, com.akaxin.proto.core.CoreProto.GroupMsgNotice.Builder, com.akaxin.proto.core.CoreProto.GroupMsgNoticeOrBuilder> + getGroupMsgNoticeFieldBuilder() { + if (groupMsgNoticeBuilder_ == null) { + groupMsgNoticeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupMsgNotice, com.akaxin.proto.core.CoreProto.GroupMsgNotice.Builder, com.akaxin.proto.core.CoreProto.GroupMsgNoticeOrBuilder>( + getGroupMsgNotice(), + getParentForChildren(), + isClean()); + groupMsgNotice_ = null; + } + return groupMsgNoticeBuilder_; + } + + private com.akaxin.proto.core.CoreProto.U2Recall u2Recall_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2Recall, com.akaxin.proto.core.CoreProto.U2Recall.Builder, com.akaxin.proto.core.CoreProto.U2RecallOrBuilder> u2RecallBuilder_; + /** + *
+       *二人召回消息
+       * 
+ * + * .core.U2Recall u2Recall = 23; + */ + public boolean hasU2Recall() { + return u2RecallBuilder_ != null || u2Recall_ != null; + } + /** + *
+       *二人召回消息
+       * 
+ * + * .core.U2Recall u2Recall = 23; + */ + public com.akaxin.proto.core.CoreProto.U2Recall getU2Recall() { + if (u2RecallBuilder_ == null) { + return u2Recall_ == null ? com.akaxin.proto.core.CoreProto.U2Recall.getDefaultInstance() : u2Recall_; + } else { + return u2RecallBuilder_.getMessage(); + } + } + /** + *
+       *二人召回消息
+       * 
+ * + * .core.U2Recall u2Recall = 23; + */ + public Builder setU2Recall(com.akaxin.proto.core.CoreProto.U2Recall value) { + if (u2RecallBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + u2Recall_ = value; + onChanged(); + } else { + u2RecallBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *二人召回消息
+       * 
+ * + * .core.U2Recall u2Recall = 23; + */ + public Builder setU2Recall( + com.akaxin.proto.core.CoreProto.U2Recall.Builder builderForValue) { + if (u2RecallBuilder_ == null) { + u2Recall_ = builderForValue.build(); + onChanged(); + } else { + u2RecallBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *二人召回消息
+       * 
+ * + * .core.U2Recall u2Recall = 23; + */ + public Builder mergeU2Recall(com.akaxin.proto.core.CoreProto.U2Recall value) { + if (u2RecallBuilder_ == null) { + if (u2Recall_ != null) { + u2Recall_ = + com.akaxin.proto.core.CoreProto.U2Recall.newBuilder(u2Recall_).mergeFrom(value).buildPartial(); + } else { + u2Recall_ = value; + } + onChanged(); + } else { + u2RecallBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *二人召回消息
+       * 
+ * + * .core.U2Recall u2Recall = 23; + */ + public Builder clearU2Recall() { + if (u2RecallBuilder_ == null) { + u2Recall_ = null; + onChanged(); + } else { + u2Recall_ = null; + u2RecallBuilder_ = null; + } + + return this; + } + /** + *
+       *二人召回消息
+       * 
+ * + * .core.U2Recall u2Recall = 23; + */ + public com.akaxin.proto.core.CoreProto.U2Recall.Builder getU2RecallBuilder() { + + onChanged(); + return getU2RecallFieldBuilder().getBuilder(); + } + /** + *
+       *二人召回消息
+       * 
+ * + * .core.U2Recall u2Recall = 23; + */ + public com.akaxin.proto.core.CoreProto.U2RecallOrBuilder getU2RecallOrBuilder() { + if (u2RecallBuilder_ != null) { + return u2RecallBuilder_.getMessageOrBuilder(); + } else { + return u2Recall_ == null ? + com.akaxin.proto.core.CoreProto.U2Recall.getDefaultInstance() : u2Recall_; + } + } + /** + *
+       *二人召回消息
+       * 
+ * + * .core.U2Recall u2Recall = 23; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2Recall, com.akaxin.proto.core.CoreProto.U2Recall.Builder, com.akaxin.proto.core.CoreProto.U2RecallOrBuilder> + getU2RecallFieldBuilder() { + if (u2RecallBuilder_ == null) { + u2RecallBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2Recall, com.akaxin.proto.core.CoreProto.U2Recall.Builder, com.akaxin.proto.core.CoreProto.U2RecallOrBuilder>( + getU2Recall(), + getParentForChildren(), + isClean()); + u2Recall_ = null; + } + return u2RecallBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupRecall groupRecall_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupRecall, com.akaxin.proto.core.CoreProto.GroupRecall.Builder, com.akaxin.proto.core.CoreProto.GroupRecallOrBuilder> groupRecallBuilder_; + /** + *
+       *群组召回消息
+       * 
+ * + * .core.GroupRecall groupRecall = 24; + */ + public boolean hasGroupRecall() { + return groupRecallBuilder_ != null || groupRecall_ != null; + } + /** + *
+       *群组召回消息
+       * 
+ * + * .core.GroupRecall groupRecall = 24; + */ + public com.akaxin.proto.core.CoreProto.GroupRecall getGroupRecall() { + if (groupRecallBuilder_ == null) { + return groupRecall_ == null ? com.akaxin.proto.core.CoreProto.GroupRecall.getDefaultInstance() : groupRecall_; + } else { + return groupRecallBuilder_.getMessage(); + } + } + /** + *
+       *群组召回消息
+       * 
+ * + * .core.GroupRecall groupRecall = 24; + */ + public Builder setGroupRecall(com.akaxin.proto.core.CoreProto.GroupRecall value) { + if (groupRecallBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupRecall_ = value; + onChanged(); + } else { + groupRecallBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群组召回消息
+       * 
+ * + * .core.GroupRecall groupRecall = 24; + */ + public Builder setGroupRecall( + com.akaxin.proto.core.CoreProto.GroupRecall.Builder builderForValue) { + if (groupRecallBuilder_ == null) { + groupRecall_ = builderForValue.build(); + onChanged(); + } else { + groupRecallBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群组召回消息
+       * 
+ * + * .core.GroupRecall groupRecall = 24; + */ + public Builder mergeGroupRecall(com.akaxin.proto.core.CoreProto.GroupRecall value) { + if (groupRecallBuilder_ == null) { + if (groupRecall_ != null) { + groupRecall_ = + com.akaxin.proto.core.CoreProto.GroupRecall.newBuilder(groupRecall_).mergeFrom(value).buildPartial(); + } else { + groupRecall_ = value; + } + onChanged(); + } else { + groupRecallBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群组召回消息
+       * 
+ * + * .core.GroupRecall groupRecall = 24; + */ + public Builder clearGroupRecall() { + if (groupRecallBuilder_ == null) { + groupRecall_ = null; + onChanged(); + } else { + groupRecall_ = null; + groupRecallBuilder_ = null; + } + + return this; + } + /** + *
+       *群组召回消息
+       * 
+ * + * .core.GroupRecall groupRecall = 24; + */ + public com.akaxin.proto.core.CoreProto.GroupRecall.Builder getGroupRecallBuilder() { + + onChanged(); + return getGroupRecallFieldBuilder().getBuilder(); + } + /** + *
+       *群组召回消息
+       * 
+ * + * .core.GroupRecall groupRecall = 24; + */ + public com.akaxin.proto.core.CoreProto.GroupRecallOrBuilder getGroupRecallOrBuilder() { + if (groupRecallBuilder_ != null) { + return groupRecallBuilder_.getMessageOrBuilder(); + } else { + return groupRecall_ == null ? + com.akaxin.proto.core.CoreProto.GroupRecall.getDefaultInstance() : groupRecall_; + } + } + /** + *
+       *群组召回消息
+       * 
+ * + * .core.GroupRecall groupRecall = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupRecall, com.akaxin.proto.core.CoreProto.GroupRecall.Builder, com.akaxin.proto.core.CoreProto.GroupRecallOrBuilder> + getGroupRecallFieldBuilder() { + if (groupRecallBuilder_ == null) { + groupRecallBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupRecall, com.akaxin.proto.core.CoreProto.GroupRecall.Builder, com.akaxin.proto.core.CoreProto.GroupRecallOrBuilder>( + getGroupRecall(), + getParentForChildren(), + isClean()); + groupRecall_ = null; + } + return groupRecallBuilder_; + } + + private com.akaxin.proto.core.CoreProto.U2Web u2Web_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2Web, com.akaxin.proto.core.CoreProto.U2Web.Builder, com.akaxin.proto.core.CoreProto.U2WebOrBuilder> u2WebBuilder_; + /** + *
+       *为人Web消息
+       * 
+ * + * .core.U2Web u2Web = 25; + */ + public boolean hasU2Web() { + return u2WebBuilder_ != null || u2Web_ != null; + } + /** + *
+       *为人Web消息
+       * 
+ * + * .core.U2Web u2Web = 25; + */ + public com.akaxin.proto.core.CoreProto.U2Web getU2Web() { + if (u2WebBuilder_ == null) { + return u2Web_ == null ? com.akaxin.proto.core.CoreProto.U2Web.getDefaultInstance() : u2Web_; + } else { + return u2WebBuilder_.getMessage(); + } + } + /** + *
+       *为人Web消息
+       * 
+ * + * .core.U2Web u2Web = 25; + */ + public Builder setU2Web(com.akaxin.proto.core.CoreProto.U2Web value) { + if (u2WebBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + u2Web_ = value; + onChanged(); + } else { + u2WebBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *为人Web消息
+       * 
+ * + * .core.U2Web u2Web = 25; + */ + public Builder setU2Web( + com.akaxin.proto.core.CoreProto.U2Web.Builder builderForValue) { + if (u2WebBuilder_ == null) { + u2Web_ = builderForValue.build(); + onChanged(); + } else { + u2WebBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *为人Web消息
+       * 
+ * + * .core.U2Web u2Web = 25; + */ + public Builder mergeU2Web(com.akaxin.proto.core.CoreProto.U2Web value) { + if (u2WebBuilder_ == null) { + if (u2Web_ != null) { + u2Web_ = + com.akaxin.proto.core.CoreProto.U2Web.newBuilder(u2Web_).mergeFrom(value).buildPartial(); + } else { + u2Web_ = value; + } + onChanged(); + } else { + u2WebBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *为人Web消息
+       * 
+ * + * .core.U2Web u2Web = 25; + */ + public Builder clearU2Web() { + if (u2WebBuilder_ == null) { + u2Web_ = null; + onChanged(); + } else { + u2Web_ = null; + u2WebBuilder_ = null; + } + + return this; + } + /** + *
+       *为人Web消息
+       * 
+ * + * .core.U2Web u2Web = 25; + */ + public com.akaxin.proto.core.CoreProto.U2Web.Builder getU2WebBuilder() { + + onChanged(); + return getU2WebFieldBuilder().getBuilder(); + } + /** + *
+       *为人Web消息
+       * 
+ * + * .core.U2Web u2Web = 25; + */ + public com.akaxin.proto.core.CoreProto.U2WebOrBuilder getU2WebOrBuilder() { + if (u2WebBuilder_ != null) { + return u2WebBuilder_.getMessageOrBuilder(); + } else { + return u2Web_ == null ? + com.akaxin.proto.core.CoreProto.U2Web.getDefaultInstance() : u2Web_; + } + } + /** + *
+       *为人Web消息
+       * 
+ * + * .core.U2Web u2Web = 25; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2Web, com.akaxin.proto.core.CoreProto.U2Web.Builder, com.akaxin.proto.core.CoreProto.U2WebOrBuilder> + getU2WebFieldBuilder() { + if (u2WebBuilder_ == null) { + u2WebBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2Web, com.akaxin.proto.core.CoreProto.U2Web.Builder, com.akaxin.proto.core.CoreProto.U2WebOrBuilder>( + getU2Web(), + getParentForChildren(), + isClean()); + u2Web_ = null; + } + return u2WebBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupWeb groupWeb_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupWeb, com.akaxin.proto.core.CoreProto.GroupWeb.Builder, com.akaxin.proto.core.CoreProto.GroupWebOrBuilder> groupWebBuilder_; + /** + *
+       *群组web消息
+       * 
+ * + * .core.GroupWeb groupWeb = 26; + */ + public boolean hasGroupWeb() { + return groupWebBuilder_ != null || groupWeb_ != null; + } + /** + *
+       *群组web消息
+       * 
+ * + * .core.GroupWeb groupWeb = 26; + */ + public com.akaxin.proto.core.CoreProto.GroupWeb getGroupWeb() { + if (groupWebBuilder_ == null) { + return groupWeb_ == null ? com.akaxin.proto.core.CoreProto.GroupWeb.getDefaultInstance() : groupWeb_; + } else { + return groupWebBuilder_.getMessage(); + } + } + /** + *
+       *群组web消息
+       * 
+ * + * .core.GroupWeb groupWeb = 26; + */ + public Builder setGroupWeb(com.akaxin.proto.core.CoreProto.GroupWeb value) { + if (groupWebBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupWeb_ = value; + onChanged(); + } else { + groupWebBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群组web消息
+       * 
+ * + * .core.GroupWeb groupWeb = 26; + */ + public Builder setGroupWeb( + com.akaxin.proto.core.CoreProto.GroupWeb.Builder builderForValue) { + if (groupWebBuilder_ == null) { + groupWeb_ = builderForValue.build(); + onChanged(); + } else { + groupWebBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群组web消息
+       * 
+ * + * .core.GroupWeb groupWeb = 26; + */ + public Builder mergeGroupWeb(com.akaxin.proto.core.CoreProto.GroupWeb value) { + if (groupWebBuilder_ == null) { + if (groupWeb_ != null) { + groupWeb_ = + com.akaxin.proto.core.CoreProto.GroupWeb.newBuilder(groupWeb_).mergeFrom(value).buildPartial(); + } else { + groupWeb_ = value; + } + onChanged(); + } else { + groupWebBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群组web消息
+       * 
+ * + * .core.GroupWeb groupWeb = 26; + */ + public Builder clearGroupWeb() { + if (groupWebBuilder_ == null) { + groupWeb_ = null; + onChanged(); + } else { + groupWeb_ = null; + groupWebBuilder_ = null; + } + + return this; + } + /** + *
+       *群组web消息
+       * 
+ * + * .core.GroupWeb groupWeb = 26; + */ + public com.akaxin.proto.core.CoreProto.GroupWeb.Builder getGroupWebBuilder() { + + onChanged(); + return getGroupWebFieldBuilder().getBuilder(); + } + /** + *
+       *群组web消息
+       * 
+ * + * .core.GroupWeb groupWeb = 26; + */ + public com.akaxin.proto.core.CoreProto.GroupWebOrBuilder getGroupWebOrBuilder() { + if (groupWebBuilder_ != null) { + return groupWebBuilder_.getMessageOrBuilder(); + } else { + return groupWeb_ == null ? + com.akaxin.proto.core.CoreProto.GroupWeb.getDefaultInstance() : groupWeb_; + } + } + /** + *
+       *群组web消息
+       * 
+ * + * .core.GroupWeb groupWeb = 26; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupWeb, com.akaxin.proto.core.CoreProto.GroupWeb.Builder, com.akaxin.proto.core.CoreProto.GroupWebOrBuilder> + getGroupWebFieldBuilder() { + if (groupWebBuilder_ == null) { + groupWebBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupWeb, com.akaxin.proto.core.CoreProto.GroupWeb.Builder, com.akaxin.proto.core.CoreProto.GroupWebOrBuilder>( + getGroupWeb(), + getParentForChildren(), + isClean()); + groupWeb_ = null; + } + return groupWebBuilder_; + } + + private com.akaxin.proto.core.CoreProto.U2WebNotice u2WebNotice_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2WebNotice, com.akaxin.proto.core.CoreProto.U2WebNotice.Builder, com.akaxin.proto.core.CoreProto.U2WebNoticeOrBuilder> u2WebNoticeBuilder_; + /** + *
+       *二人web通知消息
+       * 
+ * + * .core.U2WebNotice u2WebNotice = 27; + */ + public boolean hasU2WebNotice() { + return u2WebNoticeBuilder_ != null || u2WebNotice_ != null; + } + /** + *
+       *二人web通知消息
+       * 
+ * + * .core.U2WebNotice u2WebNotice = 27; + */ + public com.akaxin.proto.core.CoreProto.U2WebNotice getU2WebNotice() { + if (u2WebNoticeBuilder_ == null) { + return u2WebNotice_ == null ? com.akaxin.proto.core.CoreProto.U2WebNotice.getDefaultInstance() : u2WebNotice_; + } else { + return u2WebNoticeBuilder_.getMessage(); + } + } + /** + *
+       *二人web通知消息
+       * 
+ * + * .core.U2WebNotice u2WebNotice = 27; + */ + public Builder setU2WebNotice(com.akaxin.proto.core.CoreProto.U2WebNotice value) { + if (u2WebNoticeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + u2WebNotice_ = value; + onChanged(); + } else { + u2WebNoticeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *二人web通知消息
+       * 
+ * + * .core.U2WebNotice u2WebNotice = 27; + */ + public Builder setU2WebNotice( + com.akaxin.proto.core.CoreProto.U2WebNotice.Builder builderForValue) { + if (u2WebNoticeBuilder_ == null) { + u2WebNotice_ = builderForValue.build(); + onChanged(); + } else { + u2WebNoticeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *二人web通知消息
+       * 
+ * + * .core.U2WebNotice u2WebNotice = 27; + */ + public Builder mergeU2WebNotice(com.akaxin.proto.core.CoreProto.U2WebNotice value) { + if (u2WebNoticeBuilder_ == null) { + if (u2WebNotice_ != null) { + u2WebNotice_ = + com.akaxin.proto.core.CoreProto.U2WebNotice.newBuilder(u2WebNotice_).mergeFrom(value).buildPartial(); + } else { + u2WebNotice_ = value; + } + onChanged(); + } else { + u2WebNoticeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *二人web通知消息
+       * 
+ * + * .core.U2WebNotice u2WebNotice = 27; + */ + public Builder clearU2WebNotice() { + if (u2WebNoticeBuilder_ == null) { + u2WebNotice_ = null; + onChanged(); + } else { + u2WebNotice_ = null; + u2WebNoticeBuilder_ = null; + } + + return this; + } + /** + *
+       *二人web通知消息
+       * 
+ * + * .core.U2WebNotice u2WebNotice = 27; + */ + public com.akaxin.proto.core.CoreProto.U2WebNotice.Builder getU2WebNoticeBuilder() { + + onChanged(); + return getU2WebNoticeFieldBuilder().getBuilder(); + } + /** + *
+       *二人web通知消息
+       * 
+ * + * .core.U2WebNotice u2WebNotice = 27; + */ + public com.akaxin.proto.core.CoreProto.U2WebNoticeOrBuilder getU2WebNoticeOrBuilder() { + if (u2WebNoticeBuilder_ != null) { + return u2WebNoticeBuilder_.getMessageOrBuilder(); + } else { + return u2WebNotice_ == null ? + com.akaxin.proto.core.CoreProto.U2WebNotice.getDefaultInstance() : u2WebNotice_; + } + } + /** + *
+       *二人web通知消息
+       * 
+ * + * .core.U2WebNotice u2WebNotice = 27; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2WebNotice, com.akaxin.proto.core.CoreProto.U2WebNotice.Builder, com.akaxin.proto.core.CoreProto.U2WebNoticeOrBuilder> + getU2WebNoticeFieldBuilder() { + if (u2WebNoticeBuilder_ == null) { + u2WebNoticeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2WebNotice, com.akaxin.proto.core.CoreProto.U2WebNotice.Builder, com.akaxin.proto.core.CoreProto.U2WebNoticeOrBuilder>( + getU2WebNotice(), + getParentForChildren(), + isClean()); + u2WebNotice_ = null; + } + return u2WebNoticeBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupWebNotice groupWebNotice_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupWebNotice, com.akaxin.proto.core.CoreProto.GroupWebNotice.Builder, com.akaxin.proto.core.CoreProto.GroupWebNoticeOrBuilder> groupWebNoticeBuilder_; + /** + *
+       *群组web通知消息
+       * 
+ * + * .core.GroupWebNotice groupWebNotice = 28; + */ + public boolean hasGroupWebNotice() { + return groupWebNoticeBuilder_ != null || groupWebNotice_ != null; + } + /** + *
+       *群组web通知消息
+       * 
+ * + * .core.GroupWebNotice groupWebNotice = 28; + */ + public com.akaxin.proto.core.CoreProto.GroupWebNotice getGroupWebNotice() { + if (groupWebNoticeBuilder_ == null) { + return groupWebNotice_ == null ? com.akaxin.proto.core.CoreProto.GroupWebNotice.getDefaultInstance() : groupWebNotice_; + } else { + return groupWebNoticeBuilder_.getMessage(); + } + } + /** + *
+       *群组web通知消息
+       * 
+ * + * .core.GroupWebNotice groupWebNotice = 28; + */ + public Builder setGroupWebNotice(com.akaxin.proto.core.CoreProto.GroupWebNotice value) { + if (groupWebNoticeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupWebNotice_ = value; + onChanged(); + } else { + groupWebNoticeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群组web通知消息
+       * 
+ * + * .core.GroupWebNotice groupWebNotice = 28; + */ + public Builder setGroupWebNotice( + com.akaxin.proto.core.CoreProto.GroupWebNotice.Builder builderForValue) { + if (groupWebNoticeBuilder_ == null) { + groupWebNotice_ = builderForValue.build(); + onChanged(); + } else { + groupWebNoticeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群组web通知消息
+       * 
+ * + * .core.GroupWebNotice groupWebNotice = 28; + */ + public Builder mergeGroupWebNotice(com.akaxin.proto.core.CoreProto.GroupWebNotice value) { + if (groupWebNoticeBuilder_ == null) { + if (groupWebNotice_ != null) { + groupWebNotice_ = + com.akaxin.proto.core.CoreProto.GroupWebNotice.newBuilder(groupWebNotice_).mergeFrom(value).buildPartial(); + } else { + groupWebNotice_ = value; + } + onChanged(); + } else { + groupWebNoticeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群组web通知消息
+       * 
+ * + * .core.GroupWebNotice groupWebNotice = 28; + */ + public Builder clearGroupWebNotice() { + if (groupWebNoticeBuilder_ == null) { + groupWebNotice_ = null; + onChanged(); + } else { + groupWebNotice_ = null; + groupWebNoticeBuilder_ = null; + } + + return this; + } + /** + *
+       *群组web通知消息
+       * 
+ * + * .core.GroupWebNotice groupWebNotice = 28; + */ + public com.akaxin.proto.core.CoreProto.GroupWebNotice.Builder getGroupWebNoticeBuilder() { + + onChanged(); + return getGroupWebNoticeFieldBuilder().getBuilder(); + } + /** + *
+       *群组web通知消息
+       * 
+ * + * .core.GroupWebNotice groupWebNotice = 28; + */ + public com.akaxin.proto.core.CoreProto.GroupWebNoticeOrBuilder getGroupWebNoticeOrBuilder() { + if (groupWebNoticeBuilder_ != null) { + return groupWebNoticeBuilder_.getMessageOrBuilder(); + } else { + return groupWebNotice_ == null ? + com.akaxin.proto.core.CoreProto.GroupWebNotice.getDefaultInstance() : groupWebNotice_; + } + } + /** + *
+       *群组web通知消息
+       * 
+ * + * .core.GroupWebNotice groupWebNotice = 28; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupWebNotice, com.akaxin.proto.core.CoreProto.GroupWebNotice.Builder, com.akaxin.proto.core.CoreProto.GroupWebNoticeOrBuilder> + getGroupWebNoticeFieldBuilder() { + if (groupWebNoticeBuilder_ == null) { + groupWebNoticeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupWebNotice, com.akaxin.proto.core.CoreProto.GroupWebNotice.Builder, com.akaxin.proto.core.CoreProto.GroupWebNoticeOrBuilder>( + getGroupWebNotice(), + getParentForChildren(), + isClean()); + groupWebNotice_ = null; + } + return groupWebNoticeBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:client.MsgWithPointer) + } + + // @@protoc_insertion_point(class_scope:client.MsgWithPointer) + private static final com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer(); + } + + public static com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MsgWithPointer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MsgWithPointer(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.client.ImStcMessageProto.MsgWithPointer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ImStcMessageResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:client.ImStcMessageResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code client.ImStcMessageResponse} + */ + public static final class ImStcMessageResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:client.ImStcMessageResponse) + ImStcMessageResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImStcMessageResponse.newBuilder() to construct. + private ImStcMessageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImStcMessageResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImStcMessageResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.client.ImStcMessageProto.internal_static_client_ImStcMessageResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.client.ImStcMessageProto.internal_static_client_ImStcMessageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse.class, com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse)) { + return super.equals(obj); + } + com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse other = (com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code client.ImStcMessageResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:client.ImStcMessageResponse) + com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.client.ImStcMessageProto.internal_static_client_ImStcMessageResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.client.ImStcMessageProto.internal_static_client_ImStcMessageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse.class, com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse.Builder.class); + } + + // Construct using com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.client.ImStcMessageProto.internal_static_client_ImStcMessageResponse_descriptor; + } + + public com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse getDefaultInstanceForType() { + return com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse.getDefaultInstance(); + } + + public com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse build() { + com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse buildPartial() { + com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse result = new com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse) { + return mergeFrom((com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse other) { + if (other == com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:client.ImStcMessageResponse) + } + + // @@protoc_insertion_point(class_scope:client.ImStcMessageResponse) + private static final com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse(); + } + + public static com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImStcMessageResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImStcMessageResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.client.ImStcMessageProto.ImStcMessageResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_client_ImStcMessageRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_client_ImStcMessageRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_client_MsgWithPointer_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_client_MsgWithPointer_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_client_ImStcMessageResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_client_ImStcMessageResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033client/im_stc_message.proto\022\006client\032\017c" + + "ore/core.proto\";\n\023ImStcMessageRequest\022$\n" + + "\004list\030\001 \003(\0132\026.client.MsgWithPointer\"\205\010\n\016" + + "MsgWithPointer\022\017\n\007pointer\030\001 \001(\003\022\033\n\004type\030" + + "\002 \001(\0162\r.core.MsgType\022\037\n\006status\030\003 \001(\0132\017.c" + + "ore.MsgStatus\022\033\n\004text\030\005 \001(\0132\r.core.MsgTe" + + "xt\022\'\n\nsecretText\030\006 \001(\0132\023.core.MsgSecretT" + + "ext\022\"\n\tgroupText\030\007 \001(\0132\017.core.GroupText\022" + + ".\n\017groupSecretText\030\010 \001(\0132\025.core.GroupSec" + + "retText\022\035\n\005image\030\t \001(\0132\016.core.MsgImage\022)", + "\n\013secretImage\030\n \001(\0132\024.core.MsgSecretImag" + + "e\022$\n\ngroupImage\030\013 \001(\0132\020.core.GroupImage\022" + + "0\n\020groupSecretImage\030\014 \001(\0132\026.core.GroupSe" + + "cretImage\022\035\n\005voice\030\r \001(\0132\016.core.MsgVoice" + + "\022)\n\013secretVoice\030\016 \001(\0132\024.core.MsgSecretVo" + + "ice\022$\n\ngroupVoice\030\017 \001(\0132\020.core.GroupVoic" + + "e\0220\n\020groupSecretVoice\030\020 \001(\0132\026.core.Group" + + "SecretVoice\022\032\n\005u2Map\030\021 \001(\0132\013.core.U2Map\022" + + "&\n\013u2SecretMap\030\022 \001(\0132\021.core.U2SecretMap\022" + + " \n\010groupMap\030\023 \001(\0132\016.core.GroupMap\022,\n\016gro", + "upSecretMap\030\024 \001(\0132\024.core.GroupSecretMap\022" + + "&\n\013u2MsgNotice\030\025 \001(\0132\021.core.U2MsgNotice\022" + + ",\n\016groupMsgNotice\030\026 \001(\0132\024.core.GroupMsgN" + + "otice\022 \n\010u2Recall\030\027 \001(\0132\016.core.U2Recall\022" + + "&\n\013groupRecall\030\030 \001(\0132\021.core.GroupRecall\022" + + "\032\n\005u2Web\030\031 \001(\0132\013.core.U2Web\022 \n\010groupWeb\030" + + "\032 \001(\0132\016.core.GroupWeb\022&\n\013u2WebNotice\030\033 \001" + + "(\0132\021.core.U2WebNotice\022,\n\016groupWebNotice\030" + + "\034 \001(\0132\024.core.GroupWebNotice\"\026\n\024ImStcMess" + + "ageResponse2[\n\023ImStcMessageService\022D\n\007me", + "ssage\022\033.client.ImStcMessageRequest\032\034.cli" + + "ent.ImStcMessageResponseB,\n\027com.akaxin.p" + + "roto.clientB\021ImStcMessageProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.CoreProto.getDescriptor(), + }, assigner); + internal_static_client_ImStcMessageRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_client_ImStcMessageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_client_ImStcMessageRequest_descriptor, + new java.lang.String[] { "List", }); + internal_static_client_MsgWithPointer_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_client_MsgWithPointer_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_client_MsgWithPointer_descriptor, + new java.lang.String[] { "Pointer", "Type", "Status", "Text", "SecretText", "GroupText", "GroupSecretText", "Image", "SecretImage", "GroupImage", "GroupSecretImage", "Voice", "SecretVoice", "GroupVoice", "GroupSecretVoice", "U2Map", "U2SecretMap", "GroupMap", "GroupSecretMap", "U2MsgNotice", "GroupMsgNotice", "U2Recall", "GroupRecall", "U2Web", "GroupWeb", "U2WebNotice", "GroupWebNotice", }); + internal_static_client_ImStcMessageResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_client_ImStcMessageResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_client_ImStcMessageResponse_descriptor, + new java.lang.String[] { }); + com.akaxin.proto.core.CoreProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImStcNoticeProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImStcNoticeProto.java new file mode 100755 index 0000000..f822530 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImStcNoticeProto.java @@ -0,0 +1,671 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: client/im_stc_notice.proto + +package com.akaxin.proto.client; + +public final class ImStcNoticeProto { + private ImStcNoticeProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code client.NoticeType} + */ + public enum NoticeType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *断开TCP链接,下线通知
+     * 
+ * + * OFFLINE = 0; + */ + OFFLINE(0), + /** + *
+     *新好友申请通知
+     * 
+ * + * APPLY_FRIEND = 1; + */ + APPLY_FRIEND(1), + /** + *
+     *新好友添加通知
+     * 
+ * + * NEW_FRIEND = 2; + */ + NEW_FRIEND(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     *断开TCP链接,下线通知
+     * 
+ * + * OFFLINE = 0; + */ + public static final int OFFLINE_VALUE = 0; + /** + *
+     *新好友申请通知
+     * 
+ * + * APPLY_FRIEND = 1; + */ + public static final int APPLY_FRIEND_VALUE = 1; + /** + *
+     *新好友添加通知
+     * 
+ * + * NEW_FRIEND = 2; + */ + public static final int NEW_FRIEND_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NoticeType valueOf(int value) { + return forNumber(value); + } + + public static NoticeType forNumber(int value) { + switch (value) { + case 0: return OFFLINE; + case 1: return APPLY_FRIEND; + case 2: return NEW_FRIEND; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + NoticeType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NoticeType findValueByNumber(int number) { + return NoticeType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.client.ImStcNoticeProto.getDescriptor().getEnumTypes().get(0); + } + + private static final NoticeType[] VALUES = values(); + + public static NoticeType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private NoticeType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:client.NoticeType) + } + + public interface ImStcNoticeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:client.ImStcNoticeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .client.NoticeType type = 1; + */ + int getTypeValue(); + /** + * .client.NoticeType type = 1; + */ + com.akaxin.proto.client.ImStcNoticeProto.NoticeType getType(); + } + /** + * Protobuf type {@code client.ImStcNoticeRequest} + */ + public static final class ImStcNoticeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:client.ImStcNoticeRequest) + ImStcNoticeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImStcNoticeRequest.newBuilder() to construct. + private ImStcNoticeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImStcNoticeRequest() { + type_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImStcNoticeRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.client.ImStcNoticeProto.internal_static_client_ImStcNoticeRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.client.ImStcNoticeProto.internal_static_client_ImStcNoticeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest.class, com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * .client.NoticeType type = 1; + */ + public int getTypeValue() { + return type_; + } + /** + * .client.NoticeType type = 1; + */ + public com.akaxin.proto.client.ImStcNoticeProto.NoticeType getType() { + com.akaxin.proto.client.ImStcNoticeProto.NoticeType result = com.akaxin.proto.client.ImStcNoticeProto.NoticeType.valueOf(type_); + return result == null ? com.akaxin.proto.client.ImStcNoticeProto.NoticeType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.akaxin.proto.client.ImStcNoticeProto.NoticeType.OFFLINE.getNumber()) { + output.writeEnum(1, type_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.akaxin.proto.client.ImStcNoticeProto.NoticeType.OFFLINE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest)) { + return super.equals(obj); + } + com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest other = (com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest) obj; + + boolean result = true; + result = result && type_ == other.type_; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code client.ImStcNoticeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:client.ImStcNoticeRequest) + com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.client.ImStcNoticeProto.internal_static_client_ImStcNoticeRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.client.ImStcNoticeProto.internal_static_client_ImStcNoticeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest.class, com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest.Builder.class); + } + + // Construct using com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + type_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.client.ImStcNoticeProto.internal_static_client_ImStcNoticeRequest_descriptor; + } + + public com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest getDefaultInstanceForType() { + return com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest.getDefaultInstance(); + } + + public com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest build() { + com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest buildPartial() { + com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest result = new com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest(this); + result.type_ = type_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest) { + return mergeFrom((com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest other) { + if (other == com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + * .client.NoticeType type = 1; + */ + public int getTypeValue() { + return type_; + } + /** + * .client.NoticeType type = 1; + */ + public Builder setTypeValue(int value) { + type_ = value; + onChanged(); + return this; + } + /** + * .client.NoticeType type = 1; + */ + public com.akaxin.proto.client.ImStcNoticeProto.NoticeType getType() { + com.akaxin.proto.client.ImStcNoticeProto.NoticeType result = com.akaxin.proto.client.ImStcNoticeProto.NoticeType.valueOf(type_); + return result == null ? com.akaxin.proto.client.ImStcNoticeProto.NoticeType.UNRECOGNIZED : result; + } + /** + * .client.NoticeType type = 1; + */ + public Builder setType(com.akaxin.proto.client.ImStcNoticeProto.NoticeType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .client.NoticeType type = 1; + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:client.ImStcNoticeRequest) + } + + // @@protoc_insertion_point(class_scope:client.ImStcNoticeRequest) + private static final com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest(); + } + + public static com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImStcNoticeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImStcNoticeRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.client.ImStcNoticeProto.ImStcNoticeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_client_ImStcNoticeRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_client_ImStcNoticeRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032client/im_stc_notice.proto\022\006client\032\017co" + + "re/core.proto\"6\n\022ImStcNoticeRequest\022 \n\004t" + + "ype\030\001 \001(\0162\022.client.NoticeType*;\n\nNoticeT" + + "ype\022\013\n\007OFFLINE\020\000\022\020\n\014APPLY_FRIEND\020\001\022\016\n\nNE" + + "W_FRIEND\020\0022N\n\022ImStcNoticeService\0228\n\006noti" + + "ce\022\032.client.ImStcNoticeRequest\032\022.core.No" + + "neResponseB+\n\027com.akaxin.proto.clientB\020I" + + "mStcNoticeProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.CoreProto.getDescriptor(), + }, assigner); + internal_static_client_ImStcNoticeRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_client_ImStcNoticeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_client_ImStcNoticeRequest_descriptor, + new java.lang.String[] { "Type", }); + com.akaxin.proto.core.CoreProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImStcPongProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImStcPongProto.java new file mode 100755 index 0000000..5a90782 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImStcPongProto.java @@ -0,0 +1,452 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: client/im_stc_pong.proto + +package com.akaxin.proto.client; + +public final class ImStcPongProto { + private ImStcPongProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ImStcPongRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:client.ImStcPongRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   *pong操作不需要request实体
+   * 
+ * + * Protobuf type {@code client.ImStcPongRequest} + */ + public static final class ImStcPongRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:client.ImStcPongRequest) + ImStcPongRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImStcPongRequest.newBuilder() to construct. + private ImStcPongRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImStcPongRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImStcPongRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.client.ImStcPongProto.internal_static_client_ImStcPongRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.client.ImStcPongProto.internal_static_client_ImStcPongRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest.class, com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest)) { + return super.equals(obj); + } + com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest other = (com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *pong操作不需要request实体
+     * 
+ * + * Protobuf type {@code client.ImStcPongRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:client.ImStcPongRequest) + com.akaxin.proto.client.ImStcPongProto.ImStcPongRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.client.ImStcPongProto.internal_static_client_ImStcPongRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.client.ImStcPongProto.internal_static_client_ImStcPongRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest.class, com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest.Builder.class); + } + + // Construct using com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.client.ImStcPongProto.internal_static_client_ImStcPongRequest_descriptor; + } + + public com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest getDefaultInstanceForType() { + return com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest.getDefaultInstance(); + } + + public com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest build() { + com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest buildPartial() { + com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest result = new com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest) { + return mergeFrom((com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest other) { + if (other == com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:client.ImStcPongRequest) + } + + // @@protoc_insertion_point(class_scope:client.ImStcPongRequest) + private static final com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest(); + } + + public static com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImStcPongRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImStcPongRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.client.ImStcPongProto.ImStcPongRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_client_ImStcPongRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_client_ImStcPongRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\030client/im_stc_pong.proto\022\006client\032\017core" + + "/core.proto\"\022\n\020ImStcPongRequest2H\n\020ImStc" + + "PongService\0224\n\004pong\022\030.client.ImStcPongRe" + + "quest\032\022.core.NoneResponseB)\n\027com.akaxin." + + "proto.clientB\016ImStcPongProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.CoreProto.getDescriptor(), + }, assigner); + internal_static_client_ImStcPongRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_client_ImStcPongRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_client_ImStcPongRequest_descriptor, + new java.lang.String[] { }); + com.akaxin.proto.core.CoreProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImStcPsnProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImStcPsnProto.java new file mode 100755 index 0000000..164d1dd --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/client/ImStcPsnProto.java @@ -0,0 +1,444 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: client/im_stc_psn.proto + +package com.akaxin.proto.client; + +public final class ImStcPsnProto { + private ImStcPsnProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ImStcPsnRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:client.ImStcPsnRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code client.ImStcPsnRequest} + */ + public static final class ImStcPsnRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:client.ImStcPsnRequest) + ImStcPsnRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImStcPsnRequest.newBuilder() to construct. + private ImStcPsnRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImStcPsnRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImStcPsnRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.client.ImStcPsnProto.internal_static_client_ImStcPsnRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.client.ImStcPsnProto.internal_static_client_ImStcPsnRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest.class, com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest)) { + return super.equals(obj); + } + com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest other = (com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code client.ImStcPsnRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:client.ImStcPsnRequest) + com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.client.ImStcPsnProto.internal_static_client_ImStcPsnRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.client.ImStcPsnProto.internal_static_client_ImStcPsnRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest.class, com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest.Builder.class); + } + + // Construct using com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.client.ImStcPsnProto.internal_static_client_ImStcPsnRequest_descriptor; + } + + public com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest getDefaultInstanceForType() { + return com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest.getDefaultInstance(); + } + + public com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest build() { + com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest buildPartial() { + com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest result = new com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest) { + return mergeFrom((com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest other) { + if (other == com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:client.ImStcPsnRequest) + } + + // @@protoc_insertion_point(class_scope:client.ImStcPsnRequest) + private static final com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest(); + } + + public static com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImStcPsnRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImStcPsnRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.client.ImStcPsnProto.ImStcPsnRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_client_ImStcPsnRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_client_ImStcPsnRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\027client/im_stc_psn.proto\022\006client\032\017core/" + + "core.proto\"\021\n\017ImStcPsnRequest2E\n\017ImStcPs" + + "nService\0222\n\003psn\022\027.client.ImStcPsnRequest" + + "\032\022.core.NoneResponseB(\n\027com.akaxin.proto" + + ".clientB\rImStcPsnProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.CoreProto.getDescriptor(), + }, assigner); + internal_static_client_ImStcPsnRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_client_ImStcPsnRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_client_ImStcPsnRequest_descriptor, + new java.lang.String[] { }); + com.akaxin.proto.core.CoreProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/core/ClientProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/ClientProto.java new file mode 100755 index 0000000..da714da --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/ClientProto.java @@ -0,0 +1,233 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/client.proto + +package com.akaxin.proto.core; + +public final class ClientProto { + private ClientProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + *
+   *客户端类型
+   * 
+ * + * Protobuf enum {@code core.ClientType} + */ + public enum ClientType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *未知客户端类型
+     * 
+ * + * UNKNOW = 0; + */ + UNKNOW(0), + /** + *
+     *IOS客户端
+     * 
+ * + * IOS = 1; + */ + IOS(1), + /** + *
+     *ANDROID客户端
+     * 
+ * + * ANDROID = 2; + */ + ANDROID(2), + /** + *
+     *小米客户端
+     * 
+ * + * ANDROID_XIAOMI = 3; + */ + ANDROID_XIAOMI(3), + /** + *
+     *华为客户端
+     * 
+ * + * ANDROID_HUAWEI = 4; + */ + ANDROID_HUAWEI(4), + /** + *
+     *OPPO客户端
+     * 
+ * + * ANDROID_OPPO = 5; + */ + ANDROID_OPPO(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     *未知客户端类型
+     * 
+ * + * UNKNOW = 0; + */ + public static final int UNKNOW_VALUE = 0; + /** + *
+     *IOS客户端
+     * 
+ * + * IOS = 1; + */ + public static final int IOS_VALUE = 1; + /** + *
+     *ANDROID客户端
+     * 
+ * + * ANDROID = 2; + */ + public static final int ANDROID_VALUE = 2; + /** + *
+     *小米客户端
+     * 
+ * + * ANDROID_XIAOMI = 3; + */ + public static final int ANDROID_XIAOMI_VALUE = 3; + /** + *
+     *华为客户端
+     * 
+ * + * ANDROID_HUAWEI = 4; + */ + public static final int ANDROID_HUAWEI_VALUE = 4; + /** + *
+     *OPPO客户端
+     * 
+ * + * ANDROID_OPPO = 5; + */ + public static final int ANDROID_OPPO_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ClientType valueOf(int value) { + return forNumber(value); + } + + public static ClientType forNumber(int value) { + switch (value) { + case 0: return UNKNOW; + case 1: return IOS; + case 2: return ANDROID; + case 3: return ANDROID_XIAOMI; + case 4: return ANDROID_HUAWEI; + case 5: return ANDROID_OPPO; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ClientType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ClientType findValueByNumber(int number) { + return ClientType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.ClientProto.getDescriptor().getEnumTypes().get(0); + } + + private static final ClientType[] VALUES = values(); + + public static ClientType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ClientType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.ClientType) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\021core/client.proto\022\004core*h\n\nClientType\022" + + "\n\n\006UNKNOW\020\000\022\007\n\003IOS\020\001\022\013\n\007ANDROID\020\002\022\022\n\016AND" + + "ROID_XIAOMI\020\003\022\022\n\016ANDROID_HUAWEI\020\004\022\020\n\014AND" + + "ROID_OPPO\020\005B$\n\025com.akaxin.proto.coreB\013Cl" + + "ientProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/core/ConfigProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/ConfigProto.java new file mode 100755 index 0000000..3754d8e --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/ConfigProto.java @@ -0,0 +1,4484 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/config.proto + +package com.akaxin.proto.core; + +public final class ConfigProto { + private ConfigProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + *
+   *实名枚举
+   * 
+ * + * Protobuf enum {@code core.RealNameConfig} + */ + public enum RealNameConfig + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *匿名方式
+     * 
+ * + * REALNAME_NO = 0; + */ + REALNAME_NO(0), + /** + *
+     *实名方式,必须用户是实名
+     * 
+ * + * REALNAME_YES = 1; + */ + REALNAME_YES(1), + /** + *
+     *优先实名方式,其次接受非实名用户
+     * 
+ * + * REALNAME_YES_NO = 2; + */ + REALNAME_YES_NO(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     *匿名方式
+     * 
+ * + * REALNAME_NO = 0; + */ + public static final int REALNAME_NO_VALUE = 0; + /** + *
+     *实名方式,必须用户是实名
+     * 
+ * + * REALNAME_YES = 1; + */ + public static final int REALNAME_YES_VALUE = 1; + /** + *
+     *优先实名方式,其次接受非实名用户
+     * 
+ * + * REALNAME_YES_NO = 2; + */ + public static final int REALNAME_YES_NO_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RealNameConfig valueOf(int value) { + return forNumber(value); + } + + public static RealNameConfig forNumber(int value) { + switch (value) { + case 0: return REALNAME_NO; + case 1: return REALNAME_YES; + case 2: return REALNAME_YES_NO; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + RealNameConfig> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RealNameConfig findValueByNumber(int number) { + return RealNameConfig.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.ConfigProto.getDescriptor().getEnumTypes().get(0); + } + + private static final RealNameConfig[] VALUES = values(); + + public static RealNameConfig valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RealNameConfig(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.RealNameConfig) + } + + /** + *
+   *邀请码枚举
+   * 
+ * + * Protobuf enum {@code core.InviteCodeConfig} + */ + public enum InviteCodeConfig + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *不需要
+     * 
+ * + * UIC_NO = 0; + */ + UIC_NO(0), + /** + *
+     *关闭邀请码
+     * 
+ * + * UIC_YES = 1; + */ + UIC_YES(1), + UNRECOGNIZED(-1), + ; + + /** + *
+     *不需要
+     * 
+ * + * UIC_NO = 0; + */ + public static final int UIC_NO_VALUE = 0; + /** + *
+     *关闭邀请码
+     * 
+ * + * UIC_YES = 1; + */ + public static final int UIC_YES_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InviteCodeConfig valueOf(int value) { + return forNumber(value); + } + + public static InviteCodeConfig forNumber(int value) { + switch (value) { + case 0: return UIC_NO; + case 1: return UIC_YES; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + InviteCodeConfig> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public InviteCodeConfig findValueByNumber(int number) { + return InviteCodeConfig.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.ConfigProto.getDescriptor().getEnumTypes().get(1); + } + + private static final InviteCodeConfig[] VALUES = values(); + + public static InviteCodeConfig valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private InviteCodeConfig(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.InviteCodeConfig) + } + + /** + *
+   *站点开启,关闭状态
+   * 
+ * + * Protobuf enum {@code core.SiteStatusConfig} + */ + public enum SiteStatusConfig + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *站点关闭状态
+     * 
+ * + * CLOSE = 0; + */ + CLOSE(0), + /** + *
+     *站点开启状态
+     * 
+ * + * OPEN = 1; + */ + OPEN(1), + UNRECOGNIZED(-1), + ; + + /** + *
+     *站点关闭状态
+     * 
+ * + * CLOSE = 0; + */ + public static final int CLOSE_VALUE = 0; + /** + *
+     *站点开启状态
+     * 
+ * + * OPEN = 1; + */ + public static final int OPEN_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SiteStatusConfig valueOf(int value) { + return forNumber(value); + } + + public static SiteStatusConfig forNumber(int value) { + switch (value) { + case 0: return CLOSE; + case 1: return OPEN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + SiteStatusConfig> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SiteStatusConfig findValueByNumber(int number) { + return SiteStatusConfig.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.ConfigProto.getDescriptor().getEnumTypes().get(2); + } + + private static final SiteStatusConfig[] VALUES = values(); + + public static SiteStatusConfig valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SiteStatusConfig(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.SiteStatusConfig) + } + + /** + *
+   *二人加密状态枚举
+   * 
+ * + * Protobuf enum {@code core.U2EncryptionConfig} + */ + public enum U2EncryptionConfig + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *二人加密关闭
+     * 
+ * + * U2_CLOSE = 0; + */ + U2_CLOSE(0), + /** + *
+     *二人加密开启
+     * 
+ * + * U2_OPEN = 1; + */ + U2_OPEN(1), + UNRECOGNIZED(-1), + ; + + /** + *
+     *二人加密关闭
+     * 
+ * + * U2_CLOSE = 0; + */ + public static final int U2_CLOSE_VALUE = 0; + /** + *
+     *二人加密开启
+     * 
+ * + * U2_OPEN = 1; + */ + public static final int U2_OPEN_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static U2EncryptionConfig valueOf(int value) { + return forNumber(value); + } + + public static U2EncryptionConfig forNumber(int value) { + switch (value) { + case 0: return U2_CLOSE; + case 1: return U2_OPEN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + U2EncryptionConfig> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public U2EncryptionConfig findValueByNumber(int number) { + return U2EncryptionConfig.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.ConfigProto.getDescriptor().getEnumTypes().get(3); + } + + private static final U2EncryptionConfig[] VALUES = values(); + + public static U2EncryptionConfig valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private U2EncryptionConfig(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.U2EncryptionConfig) + } + + /** + *
+   *站点后台管理配置key
+   * 
+ * + * Protobuf enum {@code core.ConfigKey} + */ + public enum ConfigKey + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *站点地址
+     * 
+ * + * SITE_ADDRESS = 0; + */ + SITE_ADDRESS(0), + /** + *
+     *站点端口
+     * 
+ * + * SITE_PORT = 1; + */ + SITE_PORT(1), + /** + *
+     *站点名称
+     * 
+ * + * SITE_NAME = 2; + */ + SITE_NAME(2), + /** + *
+     *站点logo
+     * 
+ * + * SITE_LOGO = 3; + */ + SITE_LOGO(3), + /** + *
+     *站点版本
+     * 
+ * + * SITE_VERSION = 4; + */ + SITE_VERSION(4), + /** + *
+     *站点介绍
+     * 
+ * + * SITE_INTRODUCTION = 5; + */ + SITE_INTRODUCTION(5), + /** + *
+     *实名状态
+     * 
+ * + * REALNAME_STATUS = 6; + */ + REALNAME_STATUS(6), + /** + *
+     *站点支持群最大成员数
+     * 
+ * + * GROUP_MEMBERS_COUNT = 7; + */ + GROUP_MEMBERS_COUNT(7), + /** + *
+     *站点图片支持最大尺寸
+     * 
+ * + * PIC_SIZE = 8; + */ + PIC_SIZE(8), + /** + *
+     *站点图片存放位置
+     * 
+ * + * PIC_PATH = 9; + */ + PIC_PATH(9), + /** + *
+     *站点状态,站点关闭(status=0)/站点开启(status=1)
+     * 
+ * + * SITE_STATUS = 10; + */ + SITE_STATUS(10), + /** + *
+     *站点关闭情况下,需要一个说明
+     * 
+ * + * SITE_STATUS_INFO = 11; + */ + SITE_STATUS_INFO(11), + /** + *
+     *站点超级管理员,唯一一个用户
+     * 
+ * + * SITE_ADMIN = 12; + */ + SITE_ADMIN(12), + /** + *
+     *站点http服务地址
+     * 
+ * + * SITE_HTTP_ADDRESS = 13; + */ + SITE_HTTP_ADDRESS(13), + /** + *
+     *站点http服务地址ip
+     * 
+ * + * SITE_HTTP_PORT = 14; + */ + SITE_HTTP_PORT(14), + /** + *
+     *二人消息绝密功能是否开启
+     * 
+ * + * U2_ENCRYPTION_STATUS = 15; + */ + U2_ENCRYPTION_STATUS(15), + /** + *
+     *数据库路径
+     * 
+ * + * DB_PATH = 16; + */ + DB_PATH(16), + /** + *
+     *PushClientStatus
+     * 
+ * + * PUSH_CLIENT_STATUS = 17; + */ + PUSH_CLIENT_STATUS(17), + /** + *
+     *系统的日志级别 DEBUG/INFO/ERROR
+     * 
+ * + * LOG_LEVEL = 18; + */ + LOG_LEVEL(18), + /** + *
+     *站点管理员,多个用户,用“,”隔开
+     * 
+ * + * SITE_MANAGER = 19; + */ + SITE_MANAGER(19), + /** + *
+     *邀请码状态
+     * 
+ * + * INVITE_CODE_STATUS = 20; + */ + INVITE_CODE_STATUS(20), + /** + *
+     *默认添加的用户好友
+     * 
+ * + * DEFAULT_USER_FRIENDS = 21; + */ + DEFAULT_USER_FRIENDS(21), + /** + *
+     *默认添加的用户群组
+     * 
+ * + * DEFAULT_USER_GROUPS = 22; + */ + DEFAULT_USER_GROUPS(22), + /** + *
+     *是否允许添加还有
+     * 
+ * + * CONFIG_FRIEND_REQUEST = 23; + */ + CONFIG_FRIEND_REQUEST(23), + /** + *
+     *是否允许添加群组
+     * 
+ * + * CONFIG_CREATE_GROUP = 24; + */ + CONFIG_CREATE_GROUP(24), + /** + *
+     *群二维码过期时间
+     * 
+ * + * GROUP_QR_EXPIRE_TIME = 25; + */ + GROUP_QR_EXPIRE_TIME(25), + UNRECOGNIZED(-1), + ; + + /** + *
+     *站点地址
+     * 
+ * + * SITE_ADDRESS = 0; + */ + public static final int SITE_ADDRESS_VALUE = 0; + /** + *
+     *站点端口
+     * 
+ * + * SITE_PORT = 1; + */ + public static final int SITE_PORT_VALUE = 1; + /** + *
+     *站点名称
+     * 
+ * + * SITE_NAME = 2; + */ + public static final int SITE_NAME_VALUE = 2; + /** + *
+     *站点logo
+     * 
+ * + * SITE_LOGO = 3; + */ + public static final int SITE_LOGO_VALUE = 3; + /** + *
+     *站点版本
+     * 
+ * + * SITE_VERSION = 4; + */ + public static final int SITE_VERSION_VALUE = 4; + /** + *
+     *站点介绍
+     * 
+ * + * SITE_INTRODUCTION = 5; + */ + public static final int SITE_INTRODUCTION_VALUE = 5; + /** + *
+     *实名状态
+     * 
+ * + * REALNAME_STATUS = 6; + */ + public static final int REALNAME_STATUS_VALUE = 6; + /** + *
+     *站点支持群最大成员数
+     * 
+ * + * GROUP_MEMBERS_COUNT = 7; + */ + public static final int GROUP_MEMBERS_COUNT_VALUE = 7; + /** + *
+     *站点图片支持最大尺寸
+     * 
+ * + * PIC_SIZE = 8; + */ + public static final int PIC_SIZE_VALUE = 8; + /** + *
+     *站点图片存放位置
+     * 
+ * + * PIC_PATH = 9; + */ + public static final int PIC_PATH_VALUE = 9; + /** + *
+     *站点状态,站点关闭(status=0)/站点开启(status=1)
+     * 
+ * + * SITE_STATUS = 10; + */ + public static final int SITE_STATUS_VALUE = 10; + /** + *
+     *站点关闭情况下,需要一个说明
+     * 
+ * + * SITE_STATUS_INFO = 11; + */ + public static final int SITE_STATUS_INFO_VALUE = 11; + /** + *
+     *站点超级管理员,唯一一个用户
+     * 
+ * + * SITE_ADMIN = 12; + */ + public static final int SITE_ADMIN_VALUE = 12; + /** + *
+     *站点http服务地址
+     * 
+ * + * SITE_HTTP_ADDRESS = 13; + */ + public static final int SITE_HTTP_ADDRESS_VALUE = 13; + /** + *
+     *站点http服务地址ip
+     * 
+ * + * SITE_HTTP_PORT = 14; + */ + public static final int SITE_HTTP_PORT_VALUE = 14; + /** + *
+     *二人消息绝密功能是否开启
+     * 
+ * + * U2_ENCRYPTION_STATUS = 15; + */ + public static final int U2_ENCRYPTION_STATUS_VALUE = 15; + /** + *
+     *数据库路径
+     * 
+ * + * DB_PATH = 16; + */ + public static final int DB_PATH_VALUE = 16; + /** + *
+     *PushClientStatus
+     * 
+ * + * PUSH_CLIENT_STATUS = 17; + */ + public static final int PUSH_CLIENT_STATUS_VALUE = 17; + /** + *
+     *系统的日志级别 DEBUG/INFO/ERROR
+     * 
+ * + * LOG_LEVEL = 18; + */ + public static final int LOG_LEVEL_VALUE = 18; + /** + *
+     *站点管理员,多个用户,用“,”隔开
+     * 
+ * + * SITE_MANAGER = 19; + */ + public static final int SITE_MANAGER_VALUE = 19; + /** + *
+     *邀请码状态
+     * 
+ * + * INVITE_CODE_STATUS = 20; + */ + public static final int INVITE_CODE_STATUS_VALUE = 20; + /** + *
+     *默认添加的用户好友
+     * 
+ * + * DEFAULT_USER_FRIENDS = 21; + */ + public static final int DEFAULT_USER_FRIENDS_VALUE = 21; + /** + *
+     *默认添加的用户群组
+     * 
+ * + * DEFAULT_USER_GROUPS = 22; + */ + public static final int DEFAULT_USER_GROUPS_VALUE = 22; + /** + *
+     *是否允许添加还有
+     * 
+ * + * CONFIG_FRIEND_REQUEST = 23; + */ + public static final int CONFIG_FRIEND_REQUEST_VALUE = 23; + /** + *
+     *是否允许添加群组
+     * 
+ * + * CONFIG_CREATE_GROUP = 24; + */ + public static final int CONFIG_CREATE_GROUP_VALUE = 24; + /** + *
+     *群二维码过期时间
+     * 
+ * + * GROUP_QR_EXPIRE_TIME = 25; + */ + public static final int GROUP_QR_EXPIRE_TIME_VALUE = 25; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConfigKey valueOf(int value) { + return forNumber(value); + } + + public static ConfigKey forNumber(int value) { + switch (value) { + case 0: return SITE_ADDRESS; + case 1: return SITE_PORT; + case 2: return SITE_NAME; + case 3: return SITE_LOGO; + case 4: return SITE_VERSION; + case 5: return SITE_INTRODUCTION; + case 6: return REALNAME_STATUS; + case 7: return GROUP_MEMBERS_COUNT; + case 8: return PIC_SIZE; + case 9: return PIC_PATH; + case 10: return SITE_STATUS; + case 11: return SITE_STATUS_INFO; + case 12: return SITE_ADMIN; + case 13: return SITE_HTTP_ADDRESS; + case 14: return SITE_HTTP_PORT; + case 15: return U2_ENCRYPTION_STATUS; + case 16: return DB_PATH; + case 17: return PUSH_CLIENT_STATUS; + case 18: return LOG_LEVEL; + case 19: return SITE_MANAGER; + case 20: return INVITE_CODE_STATUS; + case 21: return DEFAULT_USER_FRIENDS; + case 22: return DEFAULT_USER_GROUPS; + case 23: return CONFIG_FRIEND_REQUEST; + case 24: return CONFIG_CREATE_GROUP; + case 25: return GROUP_QR_EXPIRE_TIME; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ConfigKey> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ConfigKey findValueByNumber(int number) { + return ConfigKey.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.ConfigProto.getDescriptor().getEnumTypes().get(4); + } + + private static final ConfigKey[] VALUES = values(); + + public static ConfigKey valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ConfigKey(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.ConfigKey) + } + + /** + *
+   *站点发送PUSH给客户端的三种状态
+   * 
+ * + * Protobuf enum {@code core.PushClientStatus} + */ + public enum PushClientStatus + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *站点不发送push给客户端
+     * 
+ * + * PUSH_NO = 0; + */ + PUSH_NO(0), + /** + *
+     *站点发送PUSH不展示文本内容
+     * 
+ * + * PUSH_HIDDEN_TEXT = 1; + */ + PUSH_HIDDEN_TEXT(1), + /** + *
+     *站点发送PUSH显示文本内容
+     * 
+ * + * PUSH_DISPLAY_TEXT = 2; + */ + PUSH_DISPLAY_TEXT(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     *站点不发送push给客户端
+     * 
+ * + * PUSH_NO = 0; + */ + public static final int PUSH_NO_VALUE = 0; + /** + *
+     *站点发送PUSH不展示文本内容
+     * 
+ * + * PUSH_HIDDEN_TEXT = 1; + */ + public static final int PUSH_HIDDEN_TEXT_VALUE = 1; + /** + *
+     *站点发送PUSH显示文本内容
+     * 
+ * + * PUSH_DISPLAY_TEXT = 2; + */ + public static final int PUSH_DISPLAY_TEXT_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PushClientStatus valueOf(int value) { + return forNumber(value); + } + + public static PushClientStatus forNumber(int value) { + switch (value) { + case 0: return PUSH_NO; + case 1: return PUSH_HIDDEN_TEXT; + case 2: return PUSH_DISPLAY_TEXT; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PushClientStatus> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PushClientStatus findValueByNumber(int number) { + return PushClientStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.ConfigProto.getDescriptor().getEnumTypes().get(5); + } + + private static final PushClientStatus[] VALUES = values(); + + public static PushClientStatus valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PushClientStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.PushClientStatus) + } + + /** + *
+   * 是否允许用户加好友(发送好友请求)
+   * 默认值为YES
+   * enum的0值必须为默认值
+   * https://developers.google.com/protocol-buffers/docs/proto3#enum
+   * 
+ * + * Protobuf enum {@code core.ConfigFriendRequest} + */ + public enum ConfigFriendRequest + implements com.google.protobuf.ProtocolMessageEnum { + /** + * ConfigFriendRequest_YES = 0; + */ + ConfigFriendRequest_YES(0), + /** + * ConfigFriendRequest_NO = 1; + */ + ConfigFriendRequest_NO(1), + UNRECOGNIZED(-1), + ; + + /** + * ConfigFriendRequest_YES = 0; + */ + public static final int ConfigFriendRequest_YES_VALUE = 0; + /** + * ConfigFriendRequest_NO = 1; + */ + public static final int ConfigFriendRequest_NO_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConfigFriendRequest valueOf(int value) { + return forNumber(value); + } + + public static ConfigFriendRequest forNumber(int value) { + switch (value) { + case 0: return ConfigFriendRequest_YES; + case 1: return ConfigFriendRequest_NO; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ConfigFriendRequest> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ConfigFriendRequest findValueByNumber(int number) { + return ConfigFriendRequest.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.ConfigProto.getDescriptor().getEnumTypes().get(6); + } + + private static final ConfigFriendRequest[] VALUES = values(); + + public static ConfigFriendRequest valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ConfigFriendRequest(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.ConfigFriendRequest) + } + + /** + *
+   * 是否允许用户创建群组
+   * 默认值为YES
+   * enum的0值必须为默认值
+   * https://developers.google.com/protocol-buffers/docs/proto3#enum
+   * 
+ * + * Protobuf enum {@code core.ConfigCreateGroup} + */ + public enum ConfigCreateGroup + implements com.google.protobuf.ProtocolMessageEnum { + /** + * ConfigCreateGroup_YES = 0; + */ + ConfigCreateGroup_YES(0), + /** + * ConfigCreateGroup_NO = 1; + */ + ConfigCreateGroup_NO(1), + UNRECOGNIZED(-1), + ; + + /** + * ConfigCreateGroup_YES = 0; + */ + public static final int ConfigCreateGroup_YES_VALUE = 0; + /** + * ConfigCreateGroup_NO = 1; + */ + public static final int ConfigCreateGroup_NO_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConfigCreateGroup valueOf(int value) { + return forNumber(value); + } + + public static ConfigCreateGroup forNumber(int value) { + switch (value) { + case 0: return ConfigCreateGroup_YES; + case 1: return ConfigCreateGroup_NO; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ConfigCreateGroup> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ConfigCreateGroup findValueByNumber(int number) { + return ConfigCreateGroup.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.ConfigProto.getDescriptor().getEnumTypes().get(7); + } + + private static final ConfigCreateGroup[] VALUES = values(); + + public static ConfigCreateGroup valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ConfigCreateGroup(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.ConfigCreateGroup) + } + + /** + * Protobuf enum {@code core.ConfigGroupQRExpireTime} + */ + public enum ConfigGroupQRExpireTime + implements com.google.protobuf.ProtocolMessageEnum { + /** + * EXPIRE_1_DAY = 0; + */ + EXPIRE_1_DAY(0), + /** + * EXPIRE_7_DAYS = 1; + */ + EXPIRE_7_DAYS(1), + /** + * EXPIRE_14_DAYS = 2; + */ + EXPIRE_14_DAYS(2), + UNRECOGNIZED(-1), + ; + + /** + * EXPIRE_1_DAY = 0; + */ + public static final int EXPIRE_1_DAY_VALUE = 0; + /** + * EXPIRE_7_DAYS = 1; + */ + public static final int EXPIRE_7_DAYS_VALUE = 1; + /** + * EXPIRE_14_DAYS = 2; + */ + public static final int EXPIRE_14_DAYS_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConfigGroupQRExpireTime valueOf(int value) { + return forNumber(value); + } + + public static ConfigGroupQRExpireTime forNumber(int value) { + switch (value) { + case 0: return EXPIRE_1_DAY; + case 1: return EXPIRE_7_DAYS; + case 2: return EXPIRE_14_DAYS; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ConfigGroupQRExpireTime> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ConfigGroupQRExpireTime findValueByNumber(int number) { + return ConfigGroupQRExpireTime.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.ConfigProto.getDescriptor().getEnumTypes().get(8); + } + + private static final ConfigGroupQRExpireTime[] VALUES = values(); + + public static ConfigGroupQRExpireTime valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ConfigGroupQRExpireTime(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.ConfigGroupQRExpireTime) + } + + public interface SiteConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.SiteConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *站点ip
+     * 
+ * + * string site_address = 1; + */ + java.lang.String getSiteAddress(); + /** + *
+     *站点ip
+     * 
+ * + * string site_address = 1; + */ + com.google.protobuf.ByteString + getSiteAddressBytes(); + + /** + *
+     *站点地址
+     * 
+ * + * int32 site_port = 2; + */ + int getSitePort(); + + /** + *
+     *站点名称
+     * 
+ * + * string site_name = 3; + */ + java.lang.String getSiteName(); + /** + *
+     *站点名称
+     * 
+ * + * string site_name = 3; + */ + com.google.protobuf.ByteString + getSiteNameBytes(); + + /** + *
+     *站点logo
+     * 
+ * + * string site_logo = 4; + */ + java.lang.String getSiteLogo(); + /** + *
+     *站点logo
+     * 
+ * + * string site_logo = 4; + */ + com.google.protobuf.ByteString + getSiteLogoBytes(); + + /** + *
+     *站点版本
+     * 
+ * + * string site_version = 5; + */ + java.lang.String getSiteVersion(); + /** + *
+     *站点版本
+     * 
+ * + * string site_version = 5; + */ + com.google.protobuf.ByteString + getSiteVersionBytes(); + + /** + *
+     *站点介绍
+     * 
+ * + * string site_introduction = 6; + */ + java.lang.String getSiteIntroduction(); + /** + *
+     *站点介绍
+     * 
+ * + * string site_introduction = 6; + */ + com.google.protobuf.ByteString + getSiteIntroductionBytes(); + + /** + *
+     *站点是否需要实名
+     * 
+ * + * .core.RealNameConfig real_name_config = 7; + */ + int getRealNameConfigValue(); + /** + *
+     *站点是否需要实名
+     * 
+ * + * .core.RealNameConfig real_name_config = 7; + */ + com.akaxin.proto.core.ConfigProto.RealNameConfig getRealNameConfig(); + + /** + *
+     *支持图片大小(width x length)
+     * 
+ * + * string pic_size = 8; + */ + java.lang.String getPicSize(); + /** + *
+     *支持图片大小(width x length)
+     * 
+ * + * string pic_size = 8; + */ + com.google.protobuf.ByteString + getPicSizeBytes(); + + /** + *
+     *站点状态
+     * 
+ * + * .core.SiteStatusConfig site_status_config = 9; + */ + int getSiteStatusConfigValue(); + /** + *
+     *站点状态
+     * 
+ * + * .core.SiteStatusConfig site_status_config = 9; + */ + com.akaxin.proto.core.ConfigProto.SiteStatusConfig getSiteStatusConfig(); + + /** + *
+     *站点状态说明,一般关闭站点情况使用
+     * 
+ * + * string site_status_info = 10; + */ + java.lang.String getSiteStatusInfo(); + /** + *
+     *站点状态说明,一般关闭站点情况使用
+     * 
+ * + * string site_status_info = 10; + */ + com.google.protobuf.ByteString + getSiteStatusInfoBytes(); + + /** + *
+     *二人消息加密状态
+     * 
+ * + * .core.U2EncryptionConfig u2_encryption_config = 11; + */ + int getU2EncryptionConfigValue(); + /** + *
+     *二人消息加密状态
+     * 
+ * + * .core.U2EncryptionConfig u2_encryption_config = 11; + */ + com.akaxin.proto.core.ConfigProto.U2EncryptionConfig getU2EncryptionConfig(); + + /** + *
+     *站点注册是否需要邀请码
+     * 
+ * + * .core.InviteCodeConfig invite_code_config = 12; + */ + int getInviteCodeConfigValue(); + /** + *
+     *站点注册是否需要邀请码
+     * 
+ * + * .core.InviteCodeConfig invite_code_config = 12; + */ + com.akaxin.proto.core.ConfigProto.InviteCodeConfig getInviteCodeConfig(); + } + /** + *
+   * 站点配置信息
+   * 
+ * + * Protobuf type {@code core.SiteConfig} + */ + public static final class SiteConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.SiteConfig) + SiteConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use SiteConfig.newBuilder() to construct. + private SiteConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SiteConfig() { + siteAddress_ = ""; + sitePort_ = 0; + siteName_ = ""; + siteLogo_ = ""; + siteVersion_ = ""; + siteIntroduction_ = ""; + realNameConfig_ = 0; + picSize_ = ""; + siteStatusConfig_ = 0; + siteStatusInfo_ = ""; + u2EncryptionConfig_ = 0; + inviteCodeConfig_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SiteConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteAddress_ = s; + break; + } + case 16: { + + sitePort_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteName_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + siteLogo_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + siteVersion_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + siteIntroduction_ = s; + break; + } + case 56: { + int rawValue = input.readEnum(); + + realNameConfig_ = rawValue; + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + picSize_ = s; + break; + } + case 72: { + int rawValue = input.readEnum(); + + siteStatusConfig_ = rawValue; + break; + } + case 82: { + java.lang.String s = input.readStringRequireUtf8(); + + siteStatusInfo_ = s; + break; + } + case 88: { + int rawValue = input.readEnum(); + + u2EncryptionConfig_ = rawValue; + break; + } + case 96: { + int rawValue = input.readEnum(); + + inviteCodeConfig_ = rawValue; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.ConfigProto.internal_static_core_SiteConfig_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.ConfigProto.internal_static_core_SiteConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.ConfigProto.SiteConfig.class, com.akaxin.proto.core.ConfigProto.SiteConfig.Builder.class); + } + + public static final int SITE_ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object siteAddress_; + /** + *
+     *站点ip
+     * 
+ * + * string site_address = 1; + */ + public java.lang.String getSiteAddress() { + java.lang.Object ref = siteAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteAddress_ = s; + return s; + } + } + /** + *
+     *站点ip
+     * 
+ * + * string site_address = 1; + */ + public com.google.protobuf.ByteString + getSiteAddressBytes() { + java.lang.Object ref = siteAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_PORT_FIELD_NUMBER = 2; + private int sitePort_; + /** + *
+     *站点地址
+     * 
+ * + * int32 site_port = 2; + */ + public int getSitePort() { + return sitePort_; + } + + public static final int SITE_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object siteName_; + /** + *
+     *站点名称
+     * 
+ * + * string site_name = 3; + */ + public java.lang.String getSiteName() { + java.lang.Object ref = siteName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteName_ = s; + return s; + } + } + /** + *
+     *站点名称
+     * 
+ * + * string site_name = 3; + */ + public com.google.protobuf.ByteString + getSiteNameBytes() { + java.lang.Object ref = siteName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_LOGO_FIELD_NUMBER = 4; + private volatile java.lang.Object siteLogo_; + /** + *
+     *站点logo
+     * 
+ * + * string site_logo = 4; + */ + public java.lang.String getSiteLogo() { + java.lang.Object ref = siteLogo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteLogo_ = s; + return s; + } + } + /** + *
+     *站点logo
+     * 
+ * + * string site_logo = 4; + */ + public com.google.protobuf.ByteString + getSiteLogoBytes() { + java.lang.Object ref = siteLogo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteLogo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_VERSION_FIELD_NUMBER = 5; + private volatile java.lang.Object siteVersion_; + /** + *
+     *站点版本
+     * 
+ * + * string site_version = 5; + */ + public java.lang.String getSiteVersion() { + java.lang.Object ref = siteVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteVersion_ = s; + return s; + } + } + /** + *
+     *站点版本
+     * 
+ * + * string site_version = 5; + */ + public com.google.protobuf.ByteString + getSiteVersionBytes() { + java.lang.Object ref = siteVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_INTRODUCTION_FIELD_NUMBER = 6; + private volatile java.lang.Object siteIntroduction_; + /** + *
+     *站点介绍
+     * 
+ * + * string site_introduction = 6; + */ + public java.lang.String getSiteIntroduction() { + java.lang.Object ref = siteIntroduction_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteIntroduction_ = s; + return s; + } + } + /** + *
+     *站点介绍
+     * 
+ * + * string site_introduction = 6; + */ + public com.google.protobuf.ByteString + getSiteIntroductionBytes() { + java.lang.Object ref = siteIntroduction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteIntroduction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REAL_NAME_CONFIG_FIELD_NUMBER = 7; + private int realNameConfig_; + /** + *
+     *站点是否需要实名
+     * 
+ * + * .core.RealNameConfig real_name_config = 7; + */ + public int getRealNameConfigValue() { + return realNameConfig_; + } + /** + *
+     *站点是否需要实名
+     * 
+ * + * .core.RealNameConfig real_name_config = 7; + */ + public com.akaxin.proto.core.ConfigProto.RealNameConfig getRealNameConfig() { + com.akaxin.proto.core.ConfigProto.RealNameConfig result = com.akaxin.proto.core.ConfigProto.RealNameConfig.valueOf(realNameConfig_); + return result == null ? com.akaxin.proto.core.ConfigProto.RealNameConfig.UNRECOGNIZED : result; + } + + public static final int PIC_SIZE_FIELD_NUMBER = 8; + private volatile java.lang.Object picSize_; + /** + *
+     *支持图片大小(width x length)
+     * 
+ * + * string pic_size = 8; + */ + public java.lang.String getPicSize() { + java.lang.Object ref = picSize_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + picSize_ = s; + return s; + } + } + /** + *
+     *支持图片大小(width x length)
+     * 
+ * + * string pic_size = 8; + */ + public com.google.protobuf.ByteString + getPicSizeBytes() { + java.lang.Object ref = picSize_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + picSize_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_STATUS_CONFIG_FIELD_NUMBER = 9; + private int siteStatusConfig_; + /** + *
+     *站点状态
+     * 
+ * + * .core.SiteStatusConfig site_status_config = 9; + */ + public int getSiteStatusConfigValue() { + return siteStatusConfig_; + } + /** + *
+     *站点状态
+     * 
+ * + * .core.SiteStatusConfig site_status_config = 9; + */ + public com.akaxin.proto.core.ConfigProto.SiteStatusConfig getSiteStatusConfig() { + com.akaxin.proto.core.ConfigProto.SiteStatusConfig result = com.akaxin.proto.core.ConfigProto.SiteStatusConfig.valueOf(siteStatusConfig_); + return result == null ? com.akaxin.proto.core.ConfigProto.SiteStatusConfig.UNRECOGNIZED : result; + } + + public static final int SITE_STATUS_INFO_FIELD_NUMBER = 10; + private volatile java.lang.Object siteStatusInfo_; + /** + *
+     *站点状态说明,一般关闭站点情况使用
+     * 
+ * + * string site_status_info = 10; + */ + public java.lang.String getSiteStatusInfo() { + java.lang.Object ref = siteStatusInfo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteStatusInfo_ = s; + return s; + } + } + /** + *
+     *站点状态说明,一般关闭站点情况使用
+     * 
+ * + * string site_status_info = 10; + */ + public com.google.protobuf.ByteString + getSiteStatusInfoBytes() { + java.lang.Object ref = siteStatusInfo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteStatusInfo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int U2_ENCRYPTION_CONFIG_FIELD_NUMBER = 11; + private int u2EncryptionConfig_; + /** + *
+     *二人消息加密状态
+     * 
+ * + * .core.U2EncryptionConfig u2_encryption_config = 11; + */ + public int getU2EncryptionConfigValue() { + return u2EncryptionConfig_; + } + /** + *
+     *二人消息加密状态
+     * 
+ * + * .core.U2EncryptionConfig u2_encryption_config = 11; + */ + public com.akaxin.proto.core.ConfigProto.U2EncryptionConfig getU2EncryptionConfig() { + com.akaxin.proto.core.ConfigProto.U2EncryptionConfig result = com.akaxin.proto.core.ConfigProto.U2EncryptionConfig.valueOf(u2EncryptionConfig_); + return result == null ? com.akaxin.proto.core.ConfigProto.U2EncryptionConfig.UNRECOGNIZED : result; + } + + public static final int INVITE_CODE_CONFIG_FIELD_NUMBER = 12; + private int inviteCodeConfig_; + /** + *
+     *站点注册是否需要邀请码
+     * 
+ * + * .core.InviteCodeConfig invite_code_config = 12; + */ + public int getInviteCodeConfigValue() { + return inviteCodeConfig_; + } + /** + *
+     *站点注册是否需要邀请码
+     * 
+ * + * .core.InviteCodeConfig invite_code_config = 12; + */ + public com.akaxin.proto.core.ConfigProto.InviteCodeConfig getInviteCodeConfig() { + com.akaxin.proto.core.ConfigProto.InviteCodeConfig result = com.akaxin.proto.core.ConfigProto.InviteCodeConfig.valueOf(inviteCodeConfig_); + return result == null ? com.akaxin.proto.core.ConfigProto.InviteCodeConfig.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteAddress_); + } + if (sitePort_ != 0) { + output.writeInt32(2, sitePort_); + } + if (!getSiteNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteName_); + } + if (!getSiteLogoBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, siteLogo_); + } + if (!getSiteVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, siteVersion_); + } + if (!getSiteIntroductionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, siteIntroduction_); + } + if (realNameConfig_ != com.akaxin.proto.core.ConfigProto.RealNameConfig.REALNAME_NO.getNumber()) { + output.writeEnum(7, realNameConfig_); + } + if (!getPicSizeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, picSize_); + } + if (siteStatusConfig_ != com.akaxin.proto.core.ConfigProto.SiteStatusConfig.CLOSE.getNumber()) { + output.writeEnum(9, siteStatusConfig_); + } + if (!getSiteStatusInfoBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, siteStatusInfo_); + } + if (u2EncryptionConfig_ != com.akaxin.proto.core.ConfigProto.U2EncryptionConfig.U2_CLOSE.getNumber()) { + output.writeEnum(11, u2EncryptionConfig_); + } + if (inviteCodeConfig_ != com.akaxin.proto.core.ConfigProto.InviteCodeConfig.UIC_NO.getNumber()) { + output.writeEnum(12, inviteCodeConfig_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteAddress_); + } + if (sitePort_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, sitePort_); + } + if (!getSiteNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteName_); + } + if (!getSiteLogoBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, siteLogo_); + } + if (!getSiteVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, siteVersion_); + } + if (!getSiteIntroductionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, siteIntroduction_); + } + if (realNameConfig_ != com.akaxin.proto.core.ConfigProto.RealNameConfig.REALNAME_NO.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, realNameConfig_); + } + if (!getPicSizeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, picSize_); + } + if (siteStatusConfig_ != com.akaxin.proto.core.ConfigProto.SiteStatusConfig.CLOSE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, siteStatusConfig_); + } + if (!getSiteStatusInfoBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, siteStatusInfo_); + } + if (u2EncryptionConfig_ != com.akaxin.proto.core.ConfigProto.U2EncryptionConfig.U2_CLOSE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(11, u2EncryptionConfig_); + } + if (inviteCodeConfig_ != com.akaxin.proto.core.ConfigProto.InviteCodeConfig.UIC_NO.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(12, inviteCodeConfig_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.ConfigProto.SiteConfig)) { + return super.equals(obj); + } + com.akaxin.proto.core.ConfigProto.SiteConfig other = (com.akaxin.proto.core.ConfigProto.SiteConfig) obj; + + boolean result = true; + result = result && getSiteAddress() + .equals(other.getSiteAddress()); + result = result && (getSitePort() + == other.getSitePort()); + result = result && getSiteName() + .equals(other.getSiteName()); + result = result && getSiteLogo() + .equals(other.getSiteLogo()); + result = result && getSiteVersion() + .equals(other.getSiteVersion()); + result = result && getSiteIntroduction() + .equals(other.getSiteIntroduction()); + result = result && realNameConfig_ == other.realNameConfig_; + result = result && getPicSize() + .equals(other.getPicSize()); + result = result && siteStatusConfig_ == other.siteStatusConfig_; + result = result && getSiteStatusInfo() + .equals(other.getSiteStatusInfo()); + result = result && u2EncryptionConfig_ == other.u2EncryptionConfig_; + result = result && inviteCodeConfig_ == other.inviteCodeConfig_; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getSiteAddress().hashCode(); + hash = (37 * hash) + SITE_PORT_FIELD_NUMBER; + hash = (53 * hash) + getSitePort(); + hash = (37 * hash) + SITE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getSiteName().hashCode(); + hash = (37 * hash) + SITE_LOGO_FIELD_NUMBER; + hash = (53 * hash) + getSiteLogo().hashCode(); + hash = (37 * hash) + SITE_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getSiteVersion().hashCode(); + hash = (37 * hash) + SITE_INTRODUCTION_FIELD_NUMBER; + hash = (53 * hash) + getSiteIntroduction().hashCode(); + hash = (37 * hash) + REAL_NAME_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + realNameConfig_; + hash = (37 * hash) + PIC_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPicSize().hashCode(); + hash = (37 * hash) + SITE_STATUS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + siteStatusConfig_; + hash = (37 * hash) + SITE_STATUS_INFO_FIELD_NUMBER; + hash = (53 * hash) + getSiteStatusInfo().hashCode(); + hash = (37 * hash) + U2_ENCRYPTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + u2EncryptionConfig_; + hash = (37 * hash) + INVITE_CODE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + inviteCodeConfig_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.ConfigProto.SiteConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.ConfigProto.SiteConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.ConfigProto.SiteConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.ConfigProto.SiteConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.ConfigProto.SiteConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.ConfigProto.SiteConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.ConfigProto.SiteConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.ConfigProto.SiteConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.ConfigProto.SiteConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.ConfigProto.SiteConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.ConfigProto.SiteConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.ConfigProto.SiteConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.ConfigProto.SiteConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * 站点配置信息
+     * 
+ * + * Protobuf type {@code core.SiteConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.SiteConfig) + com.akaxin.proto.core.ConfigProto.SiteConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.ConfigProto.internal_static_core_SiteConfig_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.ConfigProto.internal_static_core_SiteConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.ConfigProto.SiteConfig.class, com.akaxin.proto.core.ConfigProto.SiteConfig.Builder.class); + } + + // Construct using com.akaxin.proto.core.ConfigProto.SiteConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteAddress_ = ""; + + sitePort_ = 0; + + siteName_ = ""; + + siteLogo_ = ""; + + siteVersion_ = ""; + + siteIntroduction_ = ""; + + realNameConfig_ = 0; + + picSize_ = ""; + + siteStatusConfig_ = 0; + + siteStatusInfo_ = ""; + + u2EncryptionConfig_ = 0; + + inviteCodeConfig_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.ConfigProto.internal_static_core_SiteConfig_descriptor; + } + + public com.akaxin.proto.core.ConfigProto.SiteConfig getDefaultInstanceForType() { + return com.akaxin.proto.core.ConfigProto.SiteConfig.getDefaultInstance(); + } + + public com.akaxin.proto.core.ConfigProto.SiteConfig build() { + com.akaxin.proto.core.ConfigProto.SiteConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.ConfigProto.SiteConfig buildPartial() { + com.akaxin.proto.core.ConfigProto.SiteConfig result = new com.akaxin.proto.core.ConfigProto.SiteConfig(this); + result.siteAddress_ = siteAddress_; + result.sitePort_ = sitePort_; + result.siteName_ = siteName_; + result.siteLogo_ = siteLogo_; + result.siteVersion_ = siteVersion_; + result.siteIntroduction_ = siteIntroduction_; + result.realNameConfig_ = realNameConfig_; + result.picSize_ = picSize_; + result.siteStatusConfig_ = siteStatusConfig_; + result.siteStatusInfo_ = siteStatusInfo_; + result.u2EncryptionConfig_ = u2EncryptionConfig_; + result.inviteCodeConfig_ = inviteCodeConfig_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.ConfigProto.SiteConfig) { + return mergeFrom((com.akaxin.proto.core.ConfigProto.SiteConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.ConfigProto.SiteConfig other) { + if (other == com.akaxin.proto.core.ConfigProto.SiteConfig.getDefaultInstance()) return this; + if (!other.getSiteAddress().isEmpty()) { + siteAddress_ = other.siteAddress_; + onChanged(); + } + if (other.getSitePort() != 0) { + setSitePort(other.getSitePort()); + } + if (!other.getSiteName().isEmpty()) { + siteName_ = other.siteName_; + onChanged(); + } + if (!other.getSiteLogo().isEmpty()) { + siteLogo_ = other.siteLogo_; + onChanged(); + } + if (!other.getSiteVersion().isEmpty()) { + siteVersion_ = other.siteVersion_; + onChanged(); + } + if (!other.getSiteIntroduction().isEmpty()) { + siteIntroduction_ = other.siteIntroduction_; + onChanged(); + } + if (other.realNameConfig_ != 0) { + setRealNameConfigValue(other.getRealNameConfigValue()); + } + if (!other.getPicSize().isEmpty()) { + picSize_ = other.picSize_; + onChanged(); + } + if (other.siteStatusConfig_ != 0) { + setSiteStatusConfigValue(other.getSiteStatusConfigValue()); + } + if (!other.getSiteStatusInfo().isEmpty()) { + siteStatusInfo_ = other.siteStatusInfo_; + onChanged(); + } + if (other.u2EncryptionConfig_ != 0) { + setU2EncryptionConfigValue(other.getU2EncryptionConfigValue()); + } + if (other.inviteCodeConfig_ != 0) { + setInviteCodeConfigValue(other.getInviteCodeConfigValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.ConfigProto.SiteConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.ConfigProto.SiteConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteAddress_ = ""; + /** + *
+       *站点ip
+       * 
+ * + * string site_address = 1; + */ + public java.lang.String getSiteAddress() { + java.lang.Object ref = siteAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *站点ip
+       * 
+ * + * string site_address = 1; + */ + public com.google.protobuf.ByteString + getSiteAddressBytes() { + java.lang.Object ref = siteAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *站点ip
+       * 
+ * + * string site_address = 1; + */ + public Builder setSiteAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteAddress_ = value; + onChanged(); + return this; + } + /** + *
+       *站点ip
+       * 
+ * + * string site_address = 1; + */ + public Builder clearSiteAddress() { + + siteAddress_ = getDefaultInstance().getSiteAddress(); + onChanged(); + return this; + } + /** + *
+       *站点ip
+       * 
+ * + * string site_address = 1; + */ + public Builder setSiteAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteAddress_ = value; + onChanged(); + return this; + } + + private int sitePort_ ; + /** + *
+       *站点地址
+       * 
+ * + * int32 site_port = 2; + */ + public int getSitePort() { + return sitePort_; + } + /** + *
+       *站点地址
+       * 
+ * + * int32 site_port = 2; + */ + public Builder setSitePort(int value) { + + sitePort_ = value; + onChanged(); + return this; + } + /** + *
+       *站点地址
+       * 
+ * + * int32 site_port = 2; + */ + public Builder clearSitePort() { + + sitePort_ = 0; + onChanged(); + return this; + } + + private java.lang.Object siteName_ = ""; + /** + *
+       *站点名称
+       * 
+ * + * string site_name = 3; + */ + public java.lang.String getSiteName() { + java.lang.Object ref = siteName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *站点名称
+       * 
+ * + * string site_name = 3; + */ + public com.google.protobuf.ByteString + getSiteNameBytes() { + java.lang.Object ref = siteName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *站点名称
+       * 
+ * + * string site_name = 3; + */ + public Builder setSiteName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteName_ = value; + onChanged(); + return this; + } + /** + *
+       *站点名称
+       * 
+ * + * string site_name = 3; + */ + public Builder clearSiteName() { + + siteName_ = getDefaultInstance().getSiteName(); + onChanged(); + return this; + } + /** + *
+       *站点名称
+       * 
+ * + * string site_name = 3; + */ + public Builder setSiteNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteName_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteLogo_ = ""; + /** + *
+       *站点logo
+       * 
+ * + * string site_logo = 4; + */ + public java.lang.String getSiteLogo() { + java.lang.Object ref = siteLogo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteLogo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *站点logo
+       * 
+ * + * string site_logo = 4; + */ + public com.google.protobuf.ByteString + getSiteLogoBytes() { + java.lang.Object ref = siteLogo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteLogo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *站点logo
+       * 
+ * + * string site_logo = 4; + */ + public Builder setSiteLogo( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteLogo_ = value; + onChanged(); + return this; + } + /** + *
+       *站点logo
+       * 
+ * + * string site_logo = 4; + */ + public Builder clearSiteLogo() { + + siteLogo_ = getDefaultInstance().getSiteLogo(); + onChanged(); + return this; + } + /** + *
+       *站点logo
+       * 
+ * + * string site_logo = 4; + */ + public Builder setSiteLogoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteLogo_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteVersion_ = ""; + /** + *
+       *站点版本
+       * 
+ * + * string site_version = 5; + */ + public java.lang.String getSiteVersion() { + java.lang.Object ref = siteVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *站点版本
+       * 
+ * + * string site_version = 5; + */ + public com.google.protobuf.ByteString + getSiteVersionBytes() { + java.lang.Object ref = siteVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *站点版本
+       * 
+ * + * string site_version = 5; + */ + public Builder setSiteVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteVersion_ = value; + onChanged(); + return this; + } + /** + *
+       *站点版本
+       * 
+ * + * string site_version = 5; + */ + public Builder clearSiteVersion() { + + siteVersion_ = getDefaultInstance().getSiteVersion(); + onChanged(); + return this; + } + /** + *
+       *站点版本
+       * 
+ * + * string site_version = 5; + */ + public Builder setSiteVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteVersion_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteIntroduction_ = ""; + /** + *
+       *站点介绍
+       * 
+ * + * string site_introduction = 6; + */ + public java.lang.String getSiteIntroduction() { + java.lang.Object ref = siteIntroduction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteIntroduction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *站点介绍
+       * 
+ * + * string site_introduction = 6; + */ + public com.google.protobuf.ByteString + getSiteIntroductionBytes() { + java.lang.Object ref = siteIntroduction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteIntroduction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *站点介绍
+       * 
+ * + * string site_introduction = 6; + */ + public Builder setSiteIntroduction( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteIntroduction_ = value; + onChanged(); + return this; + } + /** + *
+       *站点介绍
+       * 
+ * + * string site_introduction = 6; + */ + public Builder clearSiteIntroduction() { + + siteIntroduction_ = getDefaultInstance().getSiteIntroduction(); + onChanged(); + return this; + } + /** + *
+       *站点介绍
+       * 
+ * + * string site_introduction = 6; + */ + public Builder setSiteIntroductionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteIntroduction_ = value; + onChanged(); + return this; + } + + private int realNameConfig_ = 0; + /** + *
+       *站点是否需要实名
+       * 
+ * + * .core.RealNameConfig real_name_config = 7; + */ + public int getRealNameConfigValue() { + return realNameConfig_; + } + /** + *
+       *站点是否需要实名
+       * 
+ * + * .core.RealNameConfig real_name_config = 7; + */ + public Builder setRealNameConfigValue(int value) { + realNameConfig_ = value; + onChanged(); + return this; + } + /** + *
+       *站点是否需要实名
+       * 
+ * + * .core.RealNameConfig real_name_config = 7; + */ + public com.akaxin.proto.core.ConfigProto.RealNameConfig getRealNameConfig() { + com.akaxin.proto.core.ConfigProto.RealNameConfig result = com.akaxin.proto.core.ConfigProto.RealNameConfig.valueOf(realNameConfig_); + return result == null ? com.akaxin.proto.core.ConfigProto.RealNameConfig.UNRECOGNIZED : result; + } + /** + *
+       *站点是否需要实名
+       * 
+ * + * .core.RealNameConfig real_name_config = 7; + */ + public Builder setRealNameConfig(com.akaxin.proto.core.ConfigProto.RealNameConfig value) { + if (value == null) { + throw new NullPointerException(); + } + + realNameConfig_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       *站点是否需要实名
+       * 
+ * + * .core.RealNameConfig real_name_config = 7; + */ + public Builder clearRealNameConfig() { + + realNameConfig_ = 0; + onChanged(); + return this; + } + + private java.lang.Object picSize_ = ""; + /** + *
+       *支持图片大小(width x length)
+       * 
+ * + * string pic_size = 8; + */ + public java.lang.String getPicSize() { + java.lang.Object ref = picSize_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + picSize_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *支持图片大小(width x length)
+       * 
+ * + * string pic_size = 8; + */ + public com.google.protobuf.ByteString + getPicSizeBytes() { + java.lang.Object ref = picSize_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + picSize_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *支持图片大小(width x length)
+       * 
+ * + * string pic_size = 8; + */ + public Builder setPicSize( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + picSize_ = value; + onChanged(); + return this; + } + /** + *
+       *支持图片大小(width x length)
+       * 
+ * + * string pic_size = 8; + */ + public Builder clearPicSize() { + + picSize_ = getDefaultInstance().getPicSize(); + onChanged(); + return this; + } + /** + *
+       *支持图片大小(width x length)
+       * 
+ * + * string pic_size = 8; + */ + public Builder setPicSizeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + picSize_ = value; + onChanged(); + return this; + } + + private int siteStatusConfig_ = 0; + /** + *
+       *站点状态
+       * 
+ * + * .core.SiteStatusConfig site_status_config = 9; + */ + public int getSiteStatusConfigValue() { + return siteStatusConfig_; + } + /** + *
+       *站点状态
+       * 
+ * + * .core.SiteStatusConfig site_status_config = 9; + */ + public Builder setSiteStatusConfigValue(int value) { + siteStatusConfig_ = value; + onChanged(); + return this; + } + /** + *
+       *站点状态
+       * 
+ * + * .core.SiteStatusConfig site_status_config = 9; + */ + public com.akaxin.proto.core.ConfigProto.SiteStatusConfig getSiteStatusConfig() { + com.akaxin.proto.core.ConfigProto.SiteStatusConfig result = com.akaxin.proto.core.ConfigProto.SiteStatusConfig.valueOf(siteStatusConfig_); + return result == null ? com.akaxin.proto.core.ConfigProto.SiteStatusConfig.UNRECOGNIZED : result; + } + /** + *
+       *站点状态
+       * 
+ * + * .core.SiteStatusConfig site_status_config = 9; + */ + public Builder setSiteStatusConfig(com.akaxin.proto.core.ConfigProto.SiteStatusConfig value) { + if (value == null) { + throw new NullPointerException(); + } + + siteStatusConfig_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       *站点状态
+       * 
+ * + * .core.SiteStatusConfig site_status_config = 9; + */ + public Builder clearSiteStatusConfig() { + + siteStatusConfig_ = 0; + onChanged(); + return this; + } + + private java.lang.Object siteStatusInfo_ = ""; + /** + *
+       *站点状态说明,一般关闭站点情况使用
+       * 
+ * + * string site_status_info = 10; + */ + public java.lang.String getSiteStatusInfo() { + java.lang.Object ref = siteStatusInfo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteStatusInfo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *站点状态说明,一般关闭站点情况使用
+       * 
+ * + * string site_status_info = 10; + */ + public com.google.protobuf.ByteString + getSiteStatusInfoBytes() { + java.lang.Object ref = siteStatusInfo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteStatusInfo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *站点状态说明,一般关闭站点情况使用
+       * 
+ * + * string site_status_info = 10; + */ + public Builder setSiteStatusInfo( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteStatusInfo_ = value; + onChanged(); + return this; + } + /** + *
+       *站点状态说明,一般关闭站点情况使用
+       * 
+ * + * string site_status_info = 10; + */ + public Builder clearSiteStatusInfo() { + + siteStatusInfo_ = getDefaultInstance().getSiteStatusInfo(); + onChanged(); + return this; + } + /** + *
+       *站点状态说明,一般关闭站点情况使用
+       * 
+ * + * string site_status_info = 10; + */ + public Builder setSiteStatusInfoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteStatusInfo_ = value; + onChanged(); + return this; + } + + private int u2EncryptionConfig_ = 0; + /** + *
+       *二人消息加密状态
+       * 
+ * + * .core.U2EncryptionConfig u2_encryption_config = 11; + */ + public int getU2EncryptionConfigValue() { + return u2EncryptionConfig_; + } + /** + *
+       *二人消息加密状态
+       * 
+ * + * .core.U2EncryptionConfig u2_encryption_config = 11; + */ + public Builder setU2EncryptionConfigValue(int value) { + u2EncryptionConfig_ = value; + onChanged(); + return this; + } + /** + *
+       *二人消息加密状态
+       * 
+ * + * .core.U2EncryptionConfig u2_encryption_config = 11; + */ + public com.akaxin.proto.core.ConfigProto.U2EncryptionConfig getU2EncryptionConfig() { + com.akaxin.proto.core.ConfigProto.U2EncryptionConfig result = com.akaxin.proto.core.ConfigProto.U2EncryptionConfig.valueOf(u2EncryptionConfig_); + return result == null ? com.akaxin.proto.core.ConfigProto.U2EncryptionConfig.UNRECOGNIZED : result; + } + /** + *
+       *二人消息加密状态
+       * 
+ * + * .core.U2EncryptionConfig u2_encryption_config = 11; + */ + public Builder setU2EncryptionConfig(com.akaxin.proto.core.ConfigProto.U2EncryptionConfig value) { + if (value == null) { + throw new NullPointerException(); + } + + u2EncryptionConfig_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       *二人消息加密状态
+       * 
+ * + * .core.U2EncryptionConfig u2_encryption_config = 11; + */ + public Builder clearU2EncryptionConfig() { + + u2EncryptionConfig_ = 0; + onChanged(); + return this; + } + + private int inviteCodeConfig_ = 0; + /** + *
+       *站点注册是否需要邀请码
+       * 
+ * + * .core.InviteCodeConfig invite_code_config = 12; + */ + public int getInviteCodeConfigValue() { + return inviteCodeConfig_; + } + /** + *
+       *站点注册是否需要邀请码
+       * 
+ * + * .core.InviteCodeConfig invite_code_config = 12; + */ + public Builder setInviteCodeConfigValue(int value) { + inviteCodeConfig_ = value; + onChanged(); + return this; + } + /** + *
+       *站点注册是否需要邀请码
+       * 
+ * + * .core.InviteCodeConfig invite_code_config = 12; + */ + public com.akaxin.proto.core.ConfigProto.InviteCodeConfig getInviteCodeConfig() { + com.akaxin.proto.core.ConfigProto.InviteCodeConfig result = com.akaxin.proto.core.ConfigProto.InviteCodeConfig.valueOf(inviteCodeConfig_); + return result == null ? com.akaxin.proto.core.ConfigProto.InviteCodeConfig.UNRECOGNIZED : result; + } + /** + *
+       *站点注册是否需要邀请码
+       * 
+ * + * .core.InviteCodeConfig invite_code_config = 12; + */ + public Builder setInviteCodeConfig(com.akaxin.proto.core.ConfigProto.InviteCodeConfig value) { + if (value == null) { + throw new NullPointerException(); + } + + inviteCodeConfig_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       *站点注册是否需要邀请码
+       * 
+ * + * .core.InviteCodeConfig invite_code_config = 12; + */ + public Builder clearInviteCodeConfig() { + + inviteCodeConfig_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.SiteConfig) + } + + // @@protoc_insertion_point(class_scope:core.SiteConfig) + private static final com.akaxin.proto.core.ConfigProto.SiteConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.ConfigProto.SiteConfig(); + } + + public static com.akaxin.proto.core.ConfigProto.SiteConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public SiteConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SiteConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.ConfigProto.SiteConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SiteBackConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.SiteBackConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * map<int32, string> site_config = 1; + */ + int getSiteConfigCount(); + /** + * map<int32, string> site_config = 1; + */ + boolean containsSiteConfig( + int key); + /** + * Use {@link #getSiteConfigMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getSiteConfig(); + /** + * map<int32, string> site_config = 1; + */ + java.util.Map + getSiteConfigMap(); + /** + * map<int32, string> site_config = 1; + */ + + java.lang.String getSiteConfigOrDefault( + int key, + java.lang.String defaultValue); + /** + * map<int32, string> site_config = 1; + */ + + java.lang.String getSiteConfigOrThrow( + int key); + } + /** + *
+   *站点后台管理配置
+   * 
+ * + * Protobuf type {@code core.SiteBackConfig} + */ + public static final class SiteBackConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.SiteBackConfig) + SiteBackConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use SiteBackConfig.newBuilder() to construct. + private SiteBackConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SiteBackConfig() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SiteBackConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + siteConfig_ = com.google.protobuf.MapField.newMapField( + SiteConfigDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + siteConfig__ = input.readMessage( + SiteConfigDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + siteConfig_.getMutableMap().put( + siteConfig__.getKey(), siteConfig__.getValue()); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.ConfigProto.internal_static_core_SiteBackConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetSiteConfig(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.ConfigProto.internal_static_core_SiteBackConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.ConfigProto.SiteBackConfig.class, com.akaxin.proto.core.ConfigProto.SiteBackConfig.Builder.class); + } + + public static final int SITE_CONFIG_FIELD_NUMBER = 1; + private static final class SiteConfigDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.akaxin.proto.core.ConfigProto.internal_static_core_SiteBackConfig_SiteConfigEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.String> siteConfig_; + private com.google.protobuf.MapField + internalGetSiteConfig() { + if (siteConfig_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SiteConfigDefaultEntryHolder.defaultEntry); + } + return siteConfig_; + } + + public int getSiteConfigCount() { + return internalGetSiteConfig().getMap().size(); + } + /** + * map<int32, string> site_config = 1; + */ + + public boolean containsSiteConfig( + int key) { + + return internalGetSiteConfig().getMap().containsKey(key); + } + /** + * Use {@link #getSiteConfigMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getSiteConfig() { + return getSiteConfigMap(); + } + /** + * map<int32, string> site_config = 1; + */ + + public java.util.Map getSiteConfigMap() { + return internalGetSiteConfig().getMap(); + } + /** + * map<int32, string> site_config = 1; + */ + + public java.lang.String getSiteConfigOrDefault( + int key, + java.lang.String defaultValue) { + + java.util.Map map = + internalGetSiteConfig().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<int32, string> site_config = 1; + */ + + public java.lang.String getSiteConfigOrThrow( + int key) { + + java.util.Map map = + internalGetSiteConfig().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetSiteConfig(), + SiteConfigDefaultEntryHolder.defaultEntry, + 1); + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetSiteConfig().getMap().entrySet()) { + com.google.protobuf.MapEntry + siteConfig__ = SiteConfigDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, siteConfig__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.ConfigProto.SiteBackConfig)) { + return super.equals(obj); + } + com.akaxin.proto.core.ConfigProto.SiteBackConfig other = (com.akaxin.proto.core.ConfigProto.SiteBackConfig) obj; + + boolean result = true; + result = result && internalGetSiteConfig().equals( + other.internalGetSiteConfig()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetSiteConfig().getMap().isEmpty()) { + hash = (37 * hash) + SITE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + internalGetSiteConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.ConfigProto.SiteBackConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.ConfigProto.SiteBackConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.ConfigProto.SiteBackConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.ConfigProto.SiteBackConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.ConfigProto.SiteBackConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.ConfigProto.SiteBackConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.ConfigProto.SiteBackConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.ConfigProto.SiteBackConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.ConfigProto.SiteBackConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.ConfigProto.SiteBackConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.ConfigProto.SiteBackConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.ConfigProto.SiteBackConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.ConfigProto.SiteBackConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *站点后台管理配置
+     * 
+ * + * Protobuf type {@code core.SiteBackConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.SiteBackConfig) + com.akaxin.proto.core.ConfigProto.SiteBackConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.ConfigProto.internal_static_core_SiteBackConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetSiteConfig(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableSiteConfig(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.ConfigProto.internal_static_core_SiteBackConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.ConfigProto.SiteBackConfig.class, com.akaxin.proto.core.ConfigProto.SiteBackConfig.Builder.class); + } + + // Construct using com.akaxin.proto.core.ConfigProto.SiteBackConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + internalGetMutableSiteConfig().clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.ConfigProto.internal_static_core_SiteBackConfig_descriptor; + } + + public com.akaxin.proto.core.ConfigProto.SiteBackConfig getDefaultInstanceForType() { + return com.akaxin.proto.core.ConfigProto.SiteBackConfig.getDefaultInstance(); + } + + public com.akaxin.proto.core.ConfigProto.SiteBackConfig build() { + com.akaxin.proto.core.ConfigProto.SiteBackConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.ConfigProto.SiteBackConfig buildPartial() { + com.akaxin.proto.core.ConfigProto.SiteBackConfig result = new com.akaxin.proto.core.ConfigProto.SiteBackConfig(this); + int from_bitField0_ = bitField0_; + result.siteConfig_ = internalGetSiteConfig(); + result.siteConfig_.makeImmutable(); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.ConfigProto.SiteBackConfig) { + return mergeFrom((com.akaxin.proto.core.ConfigProto.SiteBackConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.ConfigProto.SiteBackConfig other) { + if (other == com.akaxin.proto.core.ConfigProto.SiteBackConfig.getDefaultInstance()) return this; + internalGetMutableSiteConfig().mergeFrom( + other.internalGetSiteConfig()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.ConfigProto.SiteBackConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.ConfigProto.SiteBackConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.String> siteConfig_; + private com.google.protobuf.MapField + internalGetSiteConfig() { + if (siteConfig_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SiteConfigDefaultEntryHolder.defaultEntry); + } + return siteConfig_; + } + private com.google.protobuf.MapField + internalGetMutableSiteConfig() { + onChanged();; + if (siteConfig_ == null) { + siteConfig_ = com.google.protobuf.MapField.newMapField( + SiteConfigDefaultEntryHolder.defaultEntry); + } + if (!siteConfig_.isMutable()) { + siteConfig_ = siteConfig_.copy(); + } + return siteConfig_; + } + + public int getSiteConfigCount() { + return internalGetSiteConfig().getMap().size(); + } + /** + * map<int32, string> site_config = 1; + */ + + public boolean containsSiteConfig( + int key) { + + return internalGetSiteConfig().getMap().containsKey(key); + } + /** + * Use {@link #getSiteConfigMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getSiteConfig() { + return getSiteConfigMap(); + } + /** + * map<int32, string> site_config = 1; + */ + + public java.util.Map getSiteConfigMap() { + return internalGetSiteConfig().getMap(); + } + /** + * map<int32, string> site_config = 1; + */ + + public java.lang.String getSiteConfigOrDefault( + int key, + java.lang.String defaultValue) { + + java.util.Map map = + internalGetSiteConfig().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<int32, string> site_config = 1; + */ + + public java.lang.String getSiteConfigOrThrow( + int key) { + + java.util.Map map = + internalGetSiteConfig().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearSiteConfig() { + internalGetMutableSiteConfig().getMutableMap() + .clear(); + return this; + } + /** + * map<int32, string> site_config = 1; + */ + + public Builder removeSiteConfig( + int key) { + + internalGetMutableSiteConfig().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableSiteConfig() { + return internalGetMutableSiteConfig().getMutableMap(); + } + /** + * map<int32, string> site_config = 1; + */ + public Builder putSiteConfig( + int key, + java.lang.String value) { + + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableSiteConfig().getMutableMap() + .put(key, value); + return this; + } + /** + * map<int32, string> site_config = 1; + */ + + public Builder putAllSiteConfig( + java.util.Map values) { + internalGetMutableSiteConfig().getMutableMap() + .putAll(values); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.SiteBackConfig) + } + + // @@protoc_insertion_point(class_scope:core.SiteBackConfig) + private static final com.akaxin.proto.core.ConfigProto.SiteBackConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.ConfigProto.SiteBackConfig(); + } + + public static com.akaxin.proto.core.ConfigProto.SiteBackConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public SiteBackConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SiteBackConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.ConfigProto.SiteBackConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_SiteConfig_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_SiteConfig_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_SiteBackConfig_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_SiteBackConfig_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_SiteBackConfig_SiteConfigEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_SiteBackConfig_SiteConfigEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\021core/config.proto\022\004core\"\210\003\n\nSiteConfig" + + "\022\024\n\014site_address\030\001 \001(\t\022\021\n\tsite_port\030\002 \001(" + + "\005\022\021\n\tsite_name\030\003 \001(\t\022\021\n\tsite_logo\030\004 \001(\t\022" + + "\024\n\014site_version\030\005 \001(\t\022\031\n\021site_introducti" + + "on\030\006 \001(\t\022.\n\020real_name_config\030\007 \001(\0162\024.cor" + + "e.RealNameConfig\022\020\n\010pic_size\030\010 \001(\t\0222\n\022si" + + "te_status_config\030\t \001(\0162\026.core.SiteStatus" + + "Config\022\030\n\020site_status_info\030\n \001(\t\0226\n\024u2_e" + + "ncryption_config\030\013 \001(\0162\030.core.U2Encrypti" + + "onConfig\0222\n\022invite_code_config\030\014 \001(\0162\026.c", + "ore.InviteCodeConfig\"~\n\016SiteBackConfig\0229" + + "\n\013site_config\030\001 \003(\0132$.core.SiteBackConfi" + + "g.SiteConfigEntry\0321\n\017SiteConfigEntry\022\013\n\003" + + "key\030\001 \001(\005\022\r\n\005value\030\002 \001(\t:\0028\001*H\n\016RealName" + + "Config\022\017\n\013REALNAME_NO\020\000\022\020\n\014REALNAME_YES\020" + + "\001\022\023\n\017REALNAME_YES_NO\020\002*+\n\020InviteCodeConf" + + "ig\022\n\n\006UIC_NO\020\000\022\013\n\007UIC_YES\020\001*\'\n\020SiteStatu" + + "sConfig\022\t\n\005CLOSE\020\000\022\010\n\004OPEN\020\001*/\n\022U2Encryp" + + "tionConfig\022\014\n\010U2_CLOSE\020\000\022\013\n\007U2_OPEN\020\001*\230\004" + + "\n\tConfigKey\022\020\n\014SITE_ADDRESS\020\000\022\r\n\tSITE_PO", + "RT\020\001\022\r\n\tSITE_NAME\020\002\022\r\n\tSITE_LOGO\020\003\022\020\n\014SI" + + "TE_VERSION\020\004\022\025\n\021SITE_INTRODUCTION\020\005\022\023\n\017R" + + "EALNAME_STATUS\020\006\022\027\n\023GROUP_MEMBERS_COUNT\020" + + "\007\022\014\n\010PIC_SIZE\020\010\022\014\n\010PIC_PATH\020\t\022\017\n\013SITE_ST" + + "ATUS\020\n\022\024\n\020SITE_STATUS_INFO\020\013\022\016\n\nSITE_ADM" + + "IN\020\014\022\025\n\021SITE_HTTP_ADDRESS\020\r\022\022\n\016SITE_HTTP" + + "_PORT\020\016\022\030\n\024U2_ENCRYPTION_STATUS\020\017\022\013\n\007DB_" + + "PATH\020\020\022\026\n\022PUSH_CLIENT_STATUS\020\021\022\r\n\tLOG_LE" + + "VEL\020\022\022\020\n\014SITE_MANAGER\020\023\022\026\n\022INVITE_CODE_S" + + "TATUS\020\024\022\030\n\024DEFAULT_USER_FRIENDS\020\025\022\027\n\023DEF", + "AULT_USER_GROUPS\020\026\022\031\n\025CONFIG_FRIEND_REQU" + + "EST\020\027\022\027\n\023CONFIG_CREATE_GROUP\020\030\022\030\n\024GROUP_" + + "QR_EXPIRE_TIME\020\031*L\n\020PushClientStatus\022\013\n\007" + + "PUSH_NO\020\000\022\024\n\020PUSH_HIDDEN_TEXT\020\001\022\025\n\021PUSH_" + + "DISPLAY_TEXT\020\002*N\n\023ConfigFriendRequest\022\033\n" + + "\027ConfigFriendRequest_YES\020\000\022\032\n\026ConfigFrie" + + "ndRequest_NO\020\001*H\n\021ConfigCreateGroup\022\031\n\025C" + + "onfigCreateGroup_YES\020\000\022\030\n\024ConfigCreateGr" + + "oup_NO\020\001*R\n\027ConfigGroupQRExpireTime\022\020\n\014E" + + "XPIRE_1_DAY\020\000\022\021\n\rEXPIRE_7_DAYS\020\001\022\022\n\016EXPI", + "RE_14_DAYS\020\002B$\n\025com.akaxin.proto.coreB\013C" + + "onfigProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_core_SiteConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_core_SiteConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_SiteConfig_descriptor, + new java.lang.String[] { "SiteAddress", "SitePort", "SiteName", "SiteLogo", "SiteVersion", "SiteIntroduction", "RealNameConfig", "PicSize", "SiteStatusConfig", "SiteStatusInfo", "U2EncryptionConfig", "InviteCodeConfig", }); + internal_static_core_SiteBackConfig_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_core_SiteBackConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_SiteBackConfig_descriptor, + new java.lang.String[] { "SiteConfig", }); + internal_static_core_SiteBackConfig_SiteConfigEntry_descriptor = + internal_static_core_SiteBackConfig_descriptor.getNestedTypes().get(0); + internal_static_core_SiteBackConfig_SiteConfigEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_SiteBackConfig_SiteConfigEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/core/CoreProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/CoreProto.java new file mode 100755 index 0000000..78f552d --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/CoreProto.java @@ -0,0 +1,34811 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/core.proto + +package com.akaxin.proto.core; + +public final class CoreProto { + private CoreProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code core.HeaderKey} + */ + public enum HeaderKey + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *0-500 分配给CLIENT_SOCKET
+     * 
+ * + * CLIENT_SOCKET_VERSION = 0; + */ + CLIENT_SOCKET_VERSION(0), + /** + * CLIENT_SOCKET_SITE_SESSION_ID = 1; + */ + CLIENT_SOCKET_SITE_SESSION_ID(1), + /** + * CLIENT_SOCKET_PLATFORM_SESSION_ID = 2; + */ + CLIENT_SOCKET_PLATFORM_SESSION_ID(2), + /** + * CLIENT_SOCKET_DEVICE_ID = 3; + */ + CLIENT_SOCKET_DEVICE_ID(3), + /** + *
+     *客户端正在使用的语言, cn/en
+     * 
+ * + * CLIENT_SOCKET_LANGUAGE = 4; + */ + CLIENT_SOCKET_LANGUAGE(4), + /** + *
+     *客户端类型,见client.proto中的ClientType
+     * 
+ * + * CLIENT_SOCKET_TYPE = 5; + */ + CLIENT_SOCKET_TYPE(5), + /** + *
+     *501-1000 分配给CLIENT_REQUEST
+     * 
+ * + * CLIENT_REQUEST_REFERER = 501; + */ + CLIENT_REQUEST_REFERER(501), + /** + *
+     *客户端访问的服务host
+     * 
+ * + * CLIENT_REQUEST_SERVER_HOST = 502; + */ + CLIENT_REQUEST_SERVER_HOST(502), + /** + *
+     *客户端访问的服务port
+     * 
+ * + * CLIENT_REQUEST_SERVER_PORT = 503; + */ + CLIENT_REQUEST_SERVER_PORT(503), + /** + *
+     *1001-2000 分配给SITE_SERVER
+     * 
+ * + * SITE_SERVER_VERSION = 1001; + */ + SITE_SERVER_VERSION(1001), + /** + *
+     *服务端host
+     * 
+ * + * SITE_SERVER_HOST = 1002; + */ + SITE_SERVER_HOST(1002), + /** + *
+     *服务端port
+     * 
+ * + * SITE_SERVER_PORT = 1003; + */ + SITE_SERVER_PORT(1003), + /** + *
+     *3001-4000 分配给PLUGIN
+     * 
+ * + * PLUGIN_CLIENT_REFERER = 3001; + */ + PLUGIN_CLIENT_REFERER(3001), + UNRECOGNIZED(-1), + ; + + /** + *
+     *0-500 分配给CLIENT_SOCKET
+     * 
+ * + * CLIENT_SOCKET_VERSION = 0; + */ + public static final int CLIENT_SOCKET_VERSION_VALUE = 0; + /** + * CLIENT_SOCKET_SITE_SESSION_ID = 1; + */ + public static final int CLIENT_SOCKET_SITE_SESSION_ID_VALUE = 1; + /** + * CLIENT_SOCKET_PLATFORM_SESSION_ID = 2; + */ + public static final int CLIENT_SOCKET_PLATFORM_SESSION_ID_VALUE = 2; + /** + * CLIENT_SOCKET_DEVICE_ID = 3; + */ + public static final int CLIENT_SOCKET_DEVICE_ID_VALUE = 3; + /** + *
+     *客户端正在使用的语言, cn/en
+     * 
+ * + * CLIENT_SOCKET_LANGUAGE = 4; + */ + public static final int CLIENT_SOCKET_LANGUAGE_VALUE = 4; + /** + *
+     *客户端类型,见client.proto中的ClientType
+     * 
+ * + * CLIENT_SOCKET_TYPE = 5; + */ + public static final int CLIENT_SOCKET_TYPE_VALUE = 5; + /** + *
+     *501-1000 分配给CLIENT_REQUEST
+     * 
+ * + * CLIENT_REQUEST_REFERER = 501; + */ + public static final int CLIENT_REQUEST_REFERER_VALUE = 501; + /** + *
+     *客户端访问的服务host
+     * 
+ * + * CLIENT_REQUEST_SERVER_HOST = 502; + */ + public static final int CLIENT_REQUEST_SERVER_HOST_VALUE = 502; + /** + *
+     *客户端访问的服务port
+     * 
+ * + * CLIENT_REQUEST_SERVER_PORT = 503; + */ + public static final int CLIENT_REQUEST_SERVER_PORT_VALUE = 503; + /** + *
+     *1001-2000 分配给SITE_SERVER
+     * 
+ * + * SITE_SERVER_VERSION = 1001; + */ + public static final int SITE_SERVER_VERSION_VALUE = 1001; + /** + *
+     *服务端host
+     * 
+ * + * SITE_SERVER_HOST = 1002; + */ + public static final int SITE_SERVER_HOST_VALUE = 1002; + /** + *
+     *服务端port
+     * 
+ * + * SITE_SERVER_PORT = 1003; + */ + public static final int SITE_SERVER_PORT_VALUE = 1003; + /** + *
+     *3001-4000 分配给PLUGIN
+     * 
+ * + * PLUGIN_CLIENT_REFERER = 3001; + */ + public static final int PLUGIN_CLIENT_REFERER_VALUE = 3001; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HeaderKey valueOf(int value) { + return forNumber(value); + } + + public static HeaderKey forNumber(int value) { + switch (value) { + case 0: return CLIENT_SOCKET_VERSION; + case 1: return CLIENT_SOCKET_SITE_SESSION_ID; + case 2: return CLIENT_SOCKET_PLATFORM_SESSION_ID; + case 3: return CLIENT_SOCKET_DEVICE_ID; + case 4: return CLIENT_SOCKET_LANGUAGE; + case 5: return CLIENT_SOCKET_TYPE; + case 501: return CLIENT_REQUEST_REFERER; + case 502: return CLIENT_REQUEST_SERVER_HOST; + case 503: return CLIENT_REQUEST_SERVER_PORT; + case 1001: return SITE_SERVER_VERSION; + case 1002: return SITE_SERVER_HOST; + case 1003: return SITE_SERVER_PORT; + case 3001: return PLUGIN_CLIENT_REFERER; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + HeaderKey> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HeaderKey findValueByNumber(int number) { + return HeaderKey.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.getDescriptor().getEnumTypes().get(0); + } + + private static final HeaderKey[] VALUES = values(); + + public static HeaderKey valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HeaderKey(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.HeaderKey) + } + + /** + *
+   *以下内容为共用消息内容
+   *消息类型
+   * 
+ * + * Protobuf enum {@code core.MsgType} + */ + public enum MsgType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *系统通知
+     * 
+ * + * NOTICE = 0; + */ + NOTICE(0), + /** + *
+     *每条发送的消息,发送一个消息状态的回执
+     * 
+ * + * MSG_STATUS = 1; + */ + MSG_STATUS(1), + /** + *
+     *二人文本消息
+     * 
+ * + * TEXT = 3; + */ + TEXT(3), + /** + *
+     *加密二人文本消息
+     * 
+ * + * SECRET_TEXT = 4; + */ + SECRET_TEXT(4), + /** + *
+     *群聊文本消息
+     * 
+ * + * GROUP_TEXT = 5; + */ + GROUP_TEXT(5), + /** + *
+     *群聊加密文本消息(暂未使用)
+     * 
+ * + * GROUP_SECRET_TEXT = 6; + */ + GROUP_SECRET_TEXT(6), + /** + *
+     *二人图片消息
+     * 
+ * + * IMAGE = 7; + */ + IMAGE(7), + /** + *
+     *二人加密图片消息
+     * 
+ * + * SECRET_IMAGE = 8; + */ + SECRET_IMAGE(8), + /** + *
+     *群图片消息
+     * 
+ * + * GROUP_IMAGE = 9; + */ + GROUP_IMAGE(9), + /** + *
+     *群加密图片(暂未使用)
+     * 
+ * + * GROUP_SECRET_IMAGE = 10; + */ + GROUP_SECRET_IMAGE(10), + /** + *
+     *二人语音消息
+     * 
+ * + * VOICE = 11; + */ + VOICE(11), + /** + *
+     *二人加密语音
+     * 
+ * + * SECRET_VOICE = 12; + */ + SECRET_VOICE(12), + /** + *
+     *群语音
+     * 
+ * + * GROUP_VOICE = 13; + */ + GROUP_VOICE(13), + /** + *
+     *群加密语音(暂未使用)
+     * 
+ * + * GROUP_SECRET_VOICE = 14; + */ + GROUP_SECRET_VOICE(14), + /** + *
+     *二人地图
+     * 
+ * + * U2_MAP = 15; + */ + U2_MAP(15), + /** + *
+     *二人加密地图消息
+     * 
+ * + * U2_SECRET_MAP = 16; + */ + U2_SECRET_MAP(16), + /** + *
+     *群地图
+     * 
+ * + * GROUP_MAP = 17; + */ + GROUP_MAP(17), + /** + *
+     *群加密地图消息
+     * 
+ * + * GROUP_SECRET_MAP = 18; + */ + GROUP_SECRET_MAP(18), + /** + *
+     *二人:消息中的通知消息
+     * 
+ * + * U2_NOTICE = 19; + */ + U2_NOTICE(19), + /** + *
+     *群:消息中的通知消息
+     * 
+ * + * GROUP_NOTICE = 20; + */ + GROUP_NOTICE(20), + /** + *
+     *二人撤回消息
+     * 
+ * + * U2_RECALL = 21; + */ + U2_RECALL(21), + /** + *
+     *群撤回消息
+     * 
+ * + * GROUP_RECALL = 22; + */ + GROUP_RECALL(22), + /** + *
+     *二人:消息中的WEB内嵌消息
+     * 
+ * + * U2_WEB = 23; + */ + U2_WEB(23), + /** + *
+     *群:消息中的WEB内嵌消息
+     * 
+ * + * GROUP_WEB = 24; + */ + GROUP_WEB(24), + /** + *
+     *二人:内嵌WEB通知消息
+     * 
+ * + * U2_WEB_NOTICE = 25; + */ + U2_WEB_NOTICE(25), + /** + *
+     *群:内嵌WEB通知消息
+     * 
+ * + * GROUP_WEB_NOTICE = 26; + */ + GROUP_WEB_NOTICE(26), + UNRECOGNIZED(-1), + ; + + /** + *
+     *系统通知
+     * 
+ * + * NOTICE = 0; + */ + public static final int NOTICE_VALUE = 0; + /** + *
+     *每条发送的消息,发送一个消息状态的回执
+     * 
+ * + * MSG_STATUS = 1; + */ + public static final int MSG_STATUS_VALUE = 1; + /** + *
+     *二人文本消息
+     * 
+ * + * TEXT = 3; + */ + public static final int TEXT_VALUE = 3; + /** + *
+     *加密二人文本消息
+     * 
+ * + * SECRET_TEXT = 4; + */ + public static final int SECRET_TEXT_VALUE = 4; + /** + *
+     *群聊文本消息
+     * 
+ * + * GROUP_TEXT = 5; + */ + public static final int GROUP_TEXT_VALUE = 5; + /** + *
+     *群聊加密文本消息(暂未使用)
+     * 
+ * + * GROUP_SECRET_TEXT = 6; + */ + public static final int GROUP_SECRET_TEXT_VALUE = 6; + /** + *
+     *二人图片消息
+     * 
+ * + * IMAGE = 7; + */ + public static final int IMAGE_VALUE = 7; + /** + *
+     *二人加密图片消息
+     * 
+ * + * SECRET_IMAGE = 8; + */ + public static final int SECRET_IMAGE_VALUE = 8; + /** + *
+     *群图片消息
+     * 
+ * + * GROUP_IMAGE = 9; + */ + public static final int GROUP_IMAGE_VALUE = 9; + /** + *
+     *群加密图片(暂未使用)
+     * 
+ * + * GROUP_SECRET_IMAGE = 10; + */ + public static final int GROUP_SECRET_IMAGE_VALUE = 10; + /** + *
+     *二人语音消息
+     * 
+ * + * VOICE = 11; + */ + public static final int VOICE_VALUE = 11; + /** + *
+     *二人加密语音
+     * 
+ * + * SECRET_VOICE = 12; + */ + public static final int SECRET_VOICE_VALUE = 12; + /** + *
+     *群语音
+     * 
+ * + * GROUP_VOICE = 13; + */ + public static final int GROUP_VOICE_VALUE = 13; + /** + *
+     *群加密语音(暂未使用)
+     * 
+ * + * GROUP_SECRET_VOICE = 14; + */ + public static final int GROUP_SECRET_VOICE_VALUE = 14; + /** + *
+     *二人地图
+     * 
+ * + * U2_MAP = 15; + */ + public static final int U2_MAP_VALUE = 15; + /** + *
+     *二人加密地图消息
+     * 
+ * + * U2_SECRET_MAP = 16; + */ + public static final int U2_SECRET_MAP_VALUE = 16; + /** + *
+     *群地图
+     * 
+ * + * GROUP_MAP = 17; + */ + public static final int GROUP_MAP_VALUE = 17; + /** + *
+     *群加密地图消息
+     * 
+ * + * GROUP_SECRET_MAP = 18; + */ + public static final int GROUP_SECRET_MAP_VALUE = 18; + /** + *
+     *二人:消息中的通知消息
+     * 
+ * + * U2_NOTICE = 19; + */ + public static final int U2_NOTICE_VALUE = 19; + /** + *
+     *群:消息中的通知消息
+     * 
+ * + * GROUP_NOTICE = 20; + */ + public static final int GROUP_NOTICE_VALUE = 20; + /** + *
+     *二人撤回消息
+     * 
+ * + * U2_RECALL = 21; + */ + public static final int U2_RECALL_VALUE = 21; + /** + *
+     *群撤回消息
+     * 
+ * + * GROUP_RECALL = 22; + */ + public static final int GROUP_RECALL_VALUE = 22; + /** + *
+     *二人:消息中的WEB内嵌消息
+     * 
+ * + * U2_WEB = 23; + */ + public static final int U2_WEB_VALUE = 23; + /** + *
+     *群:消息中的WEB内嵌消息
+     * 
+ * + * GROUP_WEB = 24; + */ + public static final int GROUP_WEB_VALUE = 24; + /** + *
+     *二人:内嵌WEB通知消息
+     * 
+ * + * U2_WEB_NOTICE = 25; + */ + public static final int U2_WEB_NOTICE_VALUE = 25; + /** + *
+     *群:内嵌WEB通知消息
+     * 
+ * + * GROUP_WEB_NOTICE = 26; + */ + public static final int GROUP_WEB_NOTICE_VALUE = 26; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MsgType valueOf(int value) { + return forNumber(value); + } + + public static MsgType forNumber(int value) { + switch (value) { + case 0: return NOTICE; + case 1: return MSG_STATUS; + case 3: return TEXT; + case 4: return SECRET_TEXT; + case 5: return GROUP_TEXT; + case 6: return GROUP_SECRET_TEXT; + case 7: return IMAGE; + case 8: return SECRET_IMAGE; + case 9: return GROUP_IMAGE; + case 10: return GROUP_SECRET_IMAGE; + case 11: return VOICE; + case 12: return SECRET_VOICE; + case 13: return GROUP_VOICE; + case 14: return GROUP_SECRET_VOICE; + case 15: return U2_MAP; + case 16: return U2_SECRET_MAP; + case 17: return GROUP_MAP; + case 18: return GROUP_SECRET_MAP; + case 19: return U2_NOTICE; + case 20: return GROUP_NOTICE; + case 21: return U2_RECALL; + case 22: return GROUP_RECALL; + case 23: return U2_WEB; + case 24: return GROUP_WEB; + case 25: return U2_WEB_NOTICE; + case 26: return GROUP_WEB_NOTICE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + MsgType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MsgType findValueByNumber(int number) { + return MsgType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.getDescriptor().getEnumTypes().get(1); + } + + private static final MsgType[] VALUES = values(); + + public static MsgType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MsgType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.MsgType) + } + + public interface ErrorInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.ErrorInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * string code = 1; + */ + java.lang.String getCode(); + /** + * string code = 1; + */ + com.google.protobuf.ByteString + getCodeBytes(); + + /** + * string info = 2; + */ + java.lang.String getInfo(); + /** + * string info = 2; + */ + com.google.protobuf.ByteString + getInfoBytes(); + } + /** + *
+   * 错误信息
+   *code="success" 请求成功
+   *code="error" 请求失败,客户端不做任何处理
+   *code="error.alter" 请求失败,客户端展示错误info
+   *code="error.session" api请求||im请求校验session失败
+   *code="error.login.need_register" 用户登陆返回此值需要告诉用户注册
+   *code="error.login.needRegister" 用户登陆返回此值需要告诉用户注册
+   *code="error.phone.same" 用户绑定身份,表示二者已经存在绑定
+   * 
+ * + * Protobuf type {@code core.ErrorInfo} + */ + public static final class ErrorInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.ErrorInfo) + ErrorInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ErrorInfo.newBuilder() to construct. + private ErrorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ErrorInfo() { + code_ = ""; + info_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ErrorInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + code_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + info_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_ErrorInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_ErrorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.ErrorInfo.class, com.akaxin.proto.core.CoreProto.ErrorInfo.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + private volatile java.lang.Object code_; + /** + * string code = 1; + */ + public java.lang.String getCode() { + java.lang.Object ref = code_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + code_ = s; + return s; + } + } + /** + * string code = 1; + */ + public com.google.protobuf.ByteString + getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + code_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INFO_FIELD_NUMBER = 2; + private volatile java.lang.Object info_; + /** + * string info = 2; + */ + public java.lang.String getInfo() { + java.lang.Object ref = info_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + info_ = s; + return s; + } + } + /** + * string info = 2; + */ + public com.google.protobuf.ByteString + getInfoBytes() { + java.lang.Object ref = info_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + info_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, code_); + } + if (!getInfoBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, info_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, code_); + } + if (!getInfoBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, info_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.ErrorInfo)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.ErrorInfo other = (com.akaxin.proto.core.CoreProto.ErrorInfo) obj; + + boolean result = true; + result = result && getCode() + .equals(other.getCode()); + result = result && getInfo() + .equals(other.getInfo()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode().hashCode(); + hash = (37 * hash) + INFO_FIELD_NUMBER; + hash = (53 * hash) + getInfo().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.ErrorInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.ErrorInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.ErrorInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.ErrorInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.ErrorInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.ErrorInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.ErrorInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.ErrorInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.ErrorInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.ErrorInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.ErrorInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.ErrorInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.ErrorInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * 错误信息
+     *code="success" 请求成功
+     *code="error" 请求失败,客户端不做任何处理
+     *code="error.alter" 请求失败,客户端展示错误info
+     *code="error.session" api请求||im请求校验session失败
+     *code="error.login.need_register" 用户登陆返回此值需要告诉用户注册
+     *code="error.login.needRegister" 用户登陆返回此值需要告诉用户注册
+     *code="error.phone.same" 用户绑定身份,表示二者已经存在绑定
+     * 
+ * + * Protobuf type {@code core.ErrorInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.ErrorInfo) + com.akaxin.proto.core.CoreProto.ErrorInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_ErrorInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_ErrorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.ErrorInfo.class, com.akaxin.proto.core.CoreProto.ErrorInfo.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.ErrorInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + code_ = ""; + + info_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_ErrorInfo_descriptor; + } + + public com.akaxin.proto.core.CoreProto.ErrorInfo getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.ErrorInfo.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.ErrorInfo build() { + com.akaxin.proto.core.CoreProto.ErrorInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.ErrorInfo buildPartial() { + com.akaxin.proto.core.CoreProto.ErrorInfo result = new com.akaxin.proto.core.CoreProto.ErrorInfo(this); + result.code_ = code_; + result.info_ = info_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.ErrorInfo) { + return mergeFrom((com.akaxin.proto.core.CoreProto.ErrorInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.ErrorInfo other) { + if (other == com.akaxin.proto.core.CoreProto.ErrorInfo.getDefaultInstance()) return this; + if (!other.getCode().isEmpty()) { + code_ = other.code_; + onChanged(); + } + if (!other.getInfo().isEmpty()) { + info_ = other.info_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.ErrorInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.ErrorInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object code_ = ""; + /** + * string code = 1; + */ + public java.lang.String getCode() { + java.lang.Object ref = code_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + code_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string code = 1; + */ + public com.google.protobuf.ByteString + getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + code_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string code = 1; + */ + public Builder setCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + code_ = value; + onChanged(); + return this; + } + /** + * string code = 1; + */ + public Builder clearCode() { + + code_ = getDefaultInstance().getCode(); + onChanged(); + return this; + } + /** + * string code = 1; + */ + public Builder setCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + code_ = value; + onChanged(); + return this; + } + + private java.lang.Object info_ = ""; + /** + * string info = 2; + */ + public java.lang.String getInfo() { + java.lang.Object ref = info_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + info_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string info = 2; + */ + public com.google.protobuf.ByteString + getInfoBytes() { + java.lang.Object ref = info_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + info_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string info = 2; + */ + public Builder setInfo( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + info_ = value; + onChanged(); + return this; + } + /** + * string info = 2; + */ + public Builder clearInfo() { + + info_ = getDefaultInstance().getInfo(); + onChanged(); + return this; + } + /** + * string info = 2; + */ + public Builder setInfoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + info_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.ErrorInfo) + } + + // @@protoc_insertion_point(class_scope:core.ErrorInfo) + private static final com.akaxin.proto.core.CoreProto.ErrorInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.ErrorInfo(); + } + + public static com.akaxin.proto.core.CoreProto.ErrorInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ErrorInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ErrorInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.ErrorInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface NoneResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.NoneResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * 代表无响应,用户编写rpc service时,因为protobuf要求idl文件中必须包含一个返回值
+   * 
+ * + * Protobuf type {@code core.NoneResponse} + */ + public static final class NoneResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.NoneResponse) + NoneResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use NoneResponse.newBuilder() to construct. + private NoneResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NoneResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NoneResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_NoneResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_NoneResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.NoneResponse.class, com.akaxin.proto.core.CoreProto.NoneResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.NoneResponse)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.NoneResponse other = (com.akaxin.proto.core.CoreProto.NoneResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.NoneResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.NoneResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.NoneResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.NoneResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.NoneResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.NoneResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.NoneResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.NoneResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.NoneResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.NoneResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.NoneResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.NoneResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.NoneResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * 代表无响应,用户编写rpc service时,因为protobuf要求idl文件中必须包含一个返回值
+     * 
+ * + * Protobuf type {@code core.NoneResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.NoneResponse) + com.akaxin.proto.core.CoreProto.NoneResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_NoneResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_NoneResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.NoneResponse.class, com.akaxin.proto.core.CoreProto.NoneResponse.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.NoneResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_NoneResponse_descriptor; + } + + public com.akaxin.proto.core.CoreProto.NoneResponse getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.NoneResponse.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.NoneResponse build() { + com.akaxin.proto.core.CoreProto.NoneResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.NoneResponse buildPartial() { + com.akaxin.proto.core.CoreProto.NoneResponse result = new com.akaxin.proto.core.CoreProto.NoneResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.NoneResponse) { + return mergeFrom((com.akaxin.proto.core.CoreProto.NoneResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.NoneResponse other) { + if (other == com.akaxin.proto.core.CoreProto.NoneResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.NoneResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.NoneResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.NoneResponse) + } + + // @@protoc_insertion_point(class_scope:core.NoneResponse) + private static final com.akaxin.proto.core.CoreProto.NoneResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.NoneResponse(); + } + + public static com.akaxin.proto.core.CoreProto.NoneResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public NoneResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NoneResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.NoneResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TransportPackageDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.TransportPackageData) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *错误信息,如果err不为null,data很有可能是无用的。
+     * 
+ * + * .core.ErrorInfo err = 1; + */ + boolean hasErr(); + /** + *
+     *错误信息,如果err不为null,data很有可能是无用的。
+     * 
+ * + * .core.ErrorInfo err = 1; + */ + com.akaxin.proto.core.CoreProto.ErrorInfo getErr(); + /** + *
+     *错误信息,如果err不为null,data很有可能是无用的。
+     * 
+ * + * .core.ErrorInfo err = 1; + */ + com.akaxin.proto.core.CoreProto.ErrorInfoOrBuilder getErrOrBuilder(); + + /** + *
+     *业务Data,由业务逻辑自己解析
+     * 
+ * + * bytes data = 2; + */ + com.google.protobuf.ByteString getData(); + + /** + *
+     *非业务逻辑的必要数据
+     * 分为两个级别:Socket级 与 Request级
+     * Socket级:只在链接建立后的第一个请求中传递,在链接的整个生命周期都有效。
+     * Request级:在每一次请求中都可能会变化并传递。
+     * 
+ * + * map<int32, string> header = 3; + */ + int getHeaderCount(); + /** + *
+     *非业务逻辑的必要数据
+     * 分为两个级别:Socket级 与 Request级
+     * Socket级:只在链接建立后的第一个请求中传递,在链接的整个生命周期都有效。
+     * Request级:在每一次请求中都可能会变化并传递。
+     * 
+ * + * map<int32, string> header = 3; + */ + boolean containsHeader( + int key); + /** + * Use {@link #getHeaderMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getHeader(); + /** + *
+     *非业务逻辑的必要数据
+     * 分为两个级别:Socket级 与 Request级
+     * Socket级:只在链接建立后的第一个请求中传递,在链接的整个生命周期都有效。
+     * Request级:在每一次请求中都可能会变化并传递。
+     * 
+ * + * map<int32, string> header = 3; + */ + java.util.Map + getHeaderMap(); + /** + *
+     *非业务逻辑的必要数据
+     * 分为两个级别:Socket级 与 Request级
+     * Socket级:只在链接建立后的第一个请求中传递,在链接的整个生命周期都有效。
+     * Request级:在每一次请求中都可能会变化并传递。
+     * 
+ * + * map<int32, string> header = 3; + */ + + java.lang.String getHeaderOrDefault( + int key, + java.lang.String defaultValue); + /** + *
+     *非业务逻辑的必要数据
+     * 分为两个级别:Socket级 与 Request级
+     * Socket级:只在链接建立后的第一个请求中传递,在链接的整个生命周期都有效。
+     * Request级:在每一次请求中都可能会变化并传递。
+     * 
+ * + * map<int32, string> header = 3; + */ + + java.lang.String getHeaderOrThrow( + int key); + } + /** + *
+   * 数据包中的数据部分
+   * 
+ * + * Protobuf type {@code core.TransportPackageData} + */ + public static final class TransportPackageData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.TransportPackageData) + TransportPackageDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransportPackageData.newBuilder() to construct. + private TransportPackageData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TransportPackageData() { + data_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TransportPackageData( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.CoreProto.ErrorInfo.Builder subBuilder = null; + if (err_ != null) { + subBuilder = err_.toBuilder(); + } + err_ = input.readMessage(com.akaxin.proto.core.CoreProto.ErrorInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(err_); + err_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + + data_ = input.readBytes(); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + header_ = com.google.protobuf.MapField.newMapField( + HeaderDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry + header__ = input.readMessage( + HeaderDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + header_.getMutableMap().put( + header__.getKey(), header__.getValue()); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_TransportPackageData_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetHeader(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_TransportPackageData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.TransportPackageData.class, com.akaxin.proto.core.CoreProto.TransportPackageData.Builder.class); + } + + private int bitField0_; + public static final int ERR_FIELD_NUMBER = 1; + private com.akaxin.proto.core.CoreProto.ErrorInfo err_; + /** + *
+     *错误信息,如果err不为null,data很有可能是无用的。
+     * 
+ * + * .core.ErrorInfo err = 1; + */ + public boolean hasErr() { + return err_ != null; + } + /** + *
+     *错误信息,如果err不为null,data很有可能是无用的。
+     * 
+ * + * .core.ErrorInfo err = 1; + */ + public com.akaxin.proto.core.CoreProto.ErrorInfo getErr() { + return err_ == null ? com.akaxin.proto.core.CoreProto.ErrorInfo.getDefaultInstance() : err_; + } + /** + *
+     *错误信息,如果err不为null,data很有可能是无用的。
+     * 
+ * + * .core.ErrorInfo err = 1; + */ + public com.akaxin.proto.core.CoreProto.ErrorInfoOrBuilder getErrOrBuilder() { + return getErr(); + } + + public static final int DATA_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString data_; + /** + *
+     *业务Data,由业务逻辑自己解析
+     * 
+ * + * bytes data = 2; + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + + public static final int HEADER_FIELD_NUMBER = 3; + private static final class HeaderDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.akaxin.proto.core.CoreProto.internal_static_core_TransportPackageData_HeaderEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.String> header_; + private com.google.protobuf.MapField + internalGetHeader() { + if (header_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HeaderDefaultEntryHolder.defaultEntry); + } + return header_; + } + + public int getHeaderCount() { + return internalGetHeader().getMap().size(); + } + /** + *
+     *非业务逻辑的必要数据
+     * 分为两个级别:Socket级 与 Request级
+     * Socket级:只在链接建立后的第一个请求中传递,在链接的整个生命周期都有效。
+     * Request级:在每一次请求中都可能会变化并传递。
+     * 
+ * + * map<int32, string> header = 3; + */ + + public boolean containsHeader( + int key) { + + return internalGetHeader().getMap().containsKey(key); + } + /** + * Use {@link #getHeaderMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getHeader() { + return getHeaderMap(); + } + /** + *
+     *非业务逻辑的必要数据
+     * 分为两个级别:Socket级 与 Request级
+     * Socket级:只在链接建立后的第一个请求中传递,在链接的整个生命周期都有效。
+     * Request级:在每一次请求中都可能会变化并传递。
+     * 
+ * + * map<int32, string> header = 3; + */ + + public java.util.Map getHeaderMap() { + return internalGetHeader().getMap(); + } + /** + *
+     *非业务逻辑的必要数据
+     * 分为两个级别:Socket级 与 Request级
+     * Socket级:只在链接建立后的第一个请求中传递,在链接的整个生命周期都有效。
+     * Request级:在每一次请求中都可能会变化并传递。
+     * 
+ * + * map<int32, string> header = 3; + */ + + public java.lang.String getHeaderOrDefault( + int key, + java.lang.String defaultValue) { + + java.util.Map map = + internalGetHeader().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     *非业务逻辑的必要数据
+     * 分为两个级别:Socket级 与 Request级
+     * Socket级:只在链接建立后的第一个请求中传递,在链接的整个生命周期都有效。
+     * Request级:在每一次请求中都可能会变化并传递。
+     * 
+ * + * map<int32, string> header = 3; + */ + + public java.lang.String getHeaderOrThrow( + int key) { + + java.util.Map map = + internalGetHeader().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (err_ != null) { + output.writeMessage(1, getErr()); + } + if (!data_.isEmpty()) { + output.writeBytes(2, data_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetHeader(), + HeaderDefaultEntryHolder.defaultEntry, + 3); + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (err_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getErr()); + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, data_); + } + for (java.util.Map.Entry entry + : internalGetHeader().getMap().entrySet()) { + com.google.protobuf.MapEntry + header__ = HeaderDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, header__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.TransportPackageData)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.TransportPackageData other = (com.akaxin.proto.core.CoreProto.TransportPackageData) obj; + + boolean result = true; + result = result && (hasErr() == other.hasErr()); + if (hasErr()) { + result = result && getErr() + .equals(other.getErr()); + } + result = result && getData() + .equals(other.getData()); + result = result && internalGetHeader().equals( + other.internalGetHeader()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasErr()) { + hash = (37 * hash) + ERR_FIELD_NUMBER; + hash = (53 * hash) + getErr().hashCode(); + } + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + if (!internalGetHeader().getMap().isEmpty()) { + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + internalGetHeader().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.TransportPackageData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.TransportPackageData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.TransportPackageData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.TransportPackageData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.TransportPackageData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.TransportPackageData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.TransportPackageData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.TransportPackageData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.TransportPackageData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.TransportPackageData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.TransportPackageData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.TransportPackageData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.TransportPackageData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * 数据包中的数据部分
+     * 
+ * + * Protobuf type {@code core.TransportPackageData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.TransportPackageData) + com.akaxin.proto.core.CoreProto.TransportPackageDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_TransportPackageData_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetHeader(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 3: + return internalGetMutableHeader(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_TransportPackageData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.TransportPackageData.class, com.akaxin.proto.core.CoreProto.TransportPackageData.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.TransportPackageData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (errBuilder_ == null) { + err_ = null; + } else { + err_ = null; + errBuilder_ = null; + } + data_ = com.google.protobuf.ByteString.EMPTY; + + internalGetMutableHeader().clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_TransportPackageData_descriptor; + } + + public com.akaxin.proto.core.CoreProto.TransportPackageData getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.TransportPackageData.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.TransportPackageData build() { + com.akaxin.proto.core.CoreProto.TransportPackageData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.TransportPackageData buildPartial() { + com.akaxin.proto.core.CoreProto.TransportPackageData result = new com.akaxin.proto.core.CoreProto.TransportPackageData(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (errBuilder_ == null) { + result.err_ = err_; + } else { + result.err_ = errBuilder_.build(); + } + result.data_ = data_; + result.header_ = internalGetHeader(); + result.header_.makeImmutable(); + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.TransportPackageData) { + return mergeFrom((com.akaxin.proto.core.CoreProto.TransportPackageData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.TransportPackageData other) { + if (other == com.akaxin.proto.core.CoreProto.TransportPackageData.getDefaultInstance()) return this; + if (other.hasErr()) { + mergeErr(other.getErr()); + } + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + internalGetMutableHeader().mergeFrom( + other.internalGetHeader()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.TransportPackageData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.TransportPackageData) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.akaxin.proto.core.CoreProto.ErrorInfo err_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.ErrorInfo, com.akaxin.proto.core.CoreProto.ErrorInfo.Builder, com.akaxin.proto.core.CoreProto.ErrorInfoOrBuilder> errBuilder_; + /** + *
+       *错误信息,如果err不为null,data很有可能是无用的。
+       * 
+ * + * .core.ErrorInfo err = 1; + */ + public boolean hasErr() { + return errBuilder_ != null || err_ != null; + } + /** + *
+       *错误信息,如果err不为null,data很有可能是无用的。
+       * 
+ * + * .core.ErrorInfo err = 1; + */ + public com.akaxin.proto.core.CoreProto.ErrorInfo getErr() { + if (errBuilder_ == null) { + return err_ == null ? com.akaxin.proto.core.CoreProto.ErrorInfo.getDefaultInstance() : err_; + } else { + return errBuilder_.getMessage(); + } + } + /** + *
+       *错误信息,如果err不为null,data很有可能是无用的。
+       * 
+ * + * .core.ErrorInfo err = 1; + */ + public Builder setErr(com.akaxin.proto.core.CoreProto.ErrorInfo value) { + if (errBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + err_ = value; + onChanged(); + } else { + errBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *错误信息,如果err不为null,data很有可能是无用的。
+       * 
+ * + * .core.ErrorInfo err = 1; + */ + public Builder setErr( + com.akaxin.proto.core.CoreProto.ErrorInfo.Builder builderForValue) { + if (errBuilder_ == null) { + err_ = builderForValue.build(); + onChanged(); + } else { + errBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *错误信息,如果err不为null,data很有可能是无用的。
+       * 
+ * + * .core.ErrorInfo err = 1; + */ + public Builder mergeErr(com.akaxin.proto.core.CoreProto.ErrorInfo value) { + if (errBuilder_ == null) { + if (err_ != null) { + err_ = + com.akaxin.proto.core.CoreProto.ErrorInfo.newBuilder(err_).mergeFrom(value).buildPartial(); + } else { + err_ = value; + } + onChanged(); + } else { + errBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *错误信息,如果err不为null,data很有可能是无用的。
+       * 
+ * + * .core.ErrorInfo err = 1; + */ + public Builder clearErr() { + if (errBuilder_ == null) { + err_ = null; + onChanged(); + } else { + err_ = null; + errBuilder_ = null; + } + + return this; + } + /** + *
+       *错误信息,如果err不为null,data很有可能是无用的。
+       * 
+ * + * .core.ErrorInfo err = 1; + */ + public com.akaxin.proto.core.CoreProto.ErrorInfo.Builder getErrBuilder() { + + onChanged(); + return getErrFieldBuilder().getBuilder(); + } + /** + *
+       *错误信息,如果err不为null,data很有可能是无用的。
+       * 
+ * + * .core.ErrorInfo err = 1; + */ + public com.akaxin.proto.core.CoreProto.ErrorInfoOrBuilder getErrOrBuilder() { + if (errBuilder_ != null) { + return errBuilder_.getMessageOrBuilder(); + } else { + return err_ == null ? + com.akaxin.proto.core.CoreProto.ErrorInfo.getDefaultInstance() : err_; + } + } + /** + *
+       *错误信息,如果err不为null,data很有可能是无用的。
+       * 
+ * + * .core.ErrorInfo err = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.ErrorInfo, com.akaxin.proto.core.CoreProto.ErrorInfo.Builder, com.akaxin.proto.core.CoreProto.ErrorInfoOrBuilder> + getErrFieldBuilder() { + if (errBuilder_ == null) { + errBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.ErrorInfo, com.akaxin.proto.core.CoreProto.ErrorInfo.Builder, com.akaxin.proto.core.CoreProto.ErrorInfoOrBuilder>( + getErr(), + getParentForChildren(), + isClean()); + err_ = null; + } + return errBuilder_; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       *业务Data,由业务逻辑自己解析
+       * 
+ * + * bytes data = 2; + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + *
+       *业务Data,由业务逻辑自己解析
+       * 
+ * + * bytes data = 2; + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + data_ = value; + onChanged(); + return this; + } + /** + *
+       *业务Data,由业务逻辑自己解析
+       * 
+ * + * bytes data = 2; + */ + public Builder clearData() { + + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.String> header_; + private com.google.protobuf.MapField + internalGetHeader() { + if (header_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HeaderDefaultEntryHolder.defaultEntry); + } + return header_; + } + private com.google.protobuf.MapField + internalGetMutableHeader() { + onChanged();; + if (header_ == null) { + header_ = com.google.protobuf.MapField.newMapField( + HeaderDefaultEntryHolder.defaultEntry); + } + if (!header_.isMutable()) { + header_ = header_.copy(); + } + return header_; + } + + public int getHeaderCount() { + return internalGetHeader().getMap().size(); + } + /** + *
+       *非业务逻辑的必要数据
+       * 分为两个级别:Socket级 与 Request级
+       * Socket级:只在链接建立后的第一个请求中传递,在链接的整个生命周期都有效。
+       * Request级:在每一次请求中都可能会变化并传递。
+       * 
+ * + * map<int32, string> header = 3; + */ + + public boolean containsHeader( + int key) { + + return internalGetHeader().getMap().containsKey(key); + } + /** + * Use {@link #getHeaderMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getHeader() { + return getHeaderMap(); + } + /** + *
+       *非业务逻辑的必要数据
+       * 分为两个级别:Socket级 与 Request级
+       * Socket级:只在链接建立后的第一个请求中传递,在链接的整个生命周期都有效。
+       * Request级:在每一次请求中都可能会变化并传递。
+       * 
+ * + * map<int32, string> header = 3; + */ + + public java.util.Map getHeaderMap() { + return internalGetHeader().getMap(); + } + /** + *
+       *非业务逻辑的必要数据
+       * 分为两个级别:Socket级 与 Request级
+       * Socket级:只在链接建立后的第一个请求中传递,在链接的整个生命周期都有效。
+       * Request级:在每一次请求中都可能会变化并传递。
+       * 
+ * + * map<int32, string> header = 3; + */ + + public java.lang.String getHeaderOrDefault( + int key, + java.lang.String defaultValue) { + + java.util.Map map = + internalGetHeader().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       *非业务逻辑的必要数据
+       * 分为两个级别:Socket级 与 Request级
+       * Socket级:只在链接建立后的第一个请求中传递,在链接的整个生命周期都有效。
+       * Request级:在每一次请求中都可能会变化并传递。
+       * 
+ * + * map<int32, string> header = 3; + */ + + public java.lang.String getHeaderOrThrow( + int key) { + + java.util.Map map = + internalGetHeader().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearHeader() { + internalGetMutableHeader().getMutableMap() + .clear(); + return this; + } + /** + *
+       *非业务逻辑的必要数据
+       * 分为两个级别:Socket级 与 Request级
+       * Socket级:只在链接建立后的第一个请求中传递,在链接的整个生命周期都有效。
+       * Request级:在每一次请求中都可能会变化并传递。
+       * 
+ * + * map<int32, string> header = 3; + */ + + public Builder removeHeader( + int key) { + + internalGetMutableHeader().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableHeader() { + return internalGetMutableHeader().getMutableMap(); + } + /** + *
+       *非业务逻辑的必要数据
+       * 分为两个级别:Socket级 与 Request级
+       * Socket级:只在链接建立后的第一个请求中传递,在链接的整个生命周期都有效。
+       * Request级:在每一次请求中都可能会变化并传递。
+       * 
+ * + * map<int32, string> header = 3; + */ + public Builder putHeader( + int key, + java.lang.String value) { + + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableHeader().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       *非业务逻辑的必要数据
+       * 分为两个级别:Socket级 与 Request级
+       * Socket级:只在链接建立后的第一个请求中传递,在链接的整个生命周期都有效。
+       * Request级:在每一次请求中都可能会变化并传递。
+       * 
+ * + * map<int32, string> header = 3; + */ + + public Builder putAllHeader( + java.util.Map values) { + internalGetMutableHeader().getMutableMap() + .putAll(values); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.TransportPackageData) + } + + // @@protoc_insertion_point(class_scope:core.TransportPackageData) + private static final com.akaxin.proto.core.CoreProto.TransportPackageData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.TransportPackageData(); + } + + public static com.akaxin.proto.core.CoreProto.TransportPackageData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public TransportPackageData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransportPackageData(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.TransportPackageData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MsgStatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.MsgStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * int32 msg_status = 2; + */ + int getMsgStatus(); + + /** + *
+     * msg_server_time 等于此条消息在服务器数据库的值
+     * 如果是发送成功的状态,此值有效。
+     * 为什么不使用服务器下发这条请求时的即时时间?
+     * 这样的话,可以脱离状态,随意的重发来保证成功。
+     * @since v2
+     * @todo 补充v2之前版本对此字段的处理逻辑(默认使用msg_time_send的值)
+     * 
+ * + * int64 msg_server_time = 3; + */ + long getMsgServerTime(); + + /** + *
+     * @since v6
+     * 
+ * + * int32 msg_pointer = 4; + */ + int getMsgPointer(); + } + /** + *
+   **
+   * msg_status:1 发送成功
+   * msg_status:0 默认状态
+   * msg_status:-1 用户非好友关系,二人消息发送失败
+   * msg_status:-2 用户非群成员,群消息发送失败
+   * 
+ * + * Protobuf type {@code core.MsgStatus} + */ + public static final class MsgStatus extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.MsgStatus) + MsgStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use MsgStatus.newBuilder() to construct. + private MsgStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MsgStatus() { + msgId_ = ""; + msgStatus_ = 0; + msgServerTime_ = 0L; + msgPointer_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MsgStatus( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 16: { + + msgStatus_ = input.readInt32(); + break; + } + case 24: { + + msgServerTime_ = input.readInt64(); + break; + } + case 32: { + + msgPointer_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgStatus_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.MsgStatus.class, com.akaxin.proto.core.CoreProto.MsgStatus.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MSG_STATUS_FIELD_NUMBER = 2; + private int msgStatus_; + /** + * int32 msg_status = 2; + */ + public int getMsgStatus() { + return msgStatus_; + } + + public static final int MSG_SERVER_TIME_FIELD_NUMBER = 3; + private long msgServerTime_; + /** + *
+     * msg_server_time 等于此条消息在服务器数据库的值
+     * 如果是发送成功的状态,此值有效。
+     * 为什么不使用服务器下发这条请求时的即时时间?
+     * 这样的话,可以脱离状态,随意的重发来保证成功。
+     * @since v2
+     * @todo 补充v2之前版本对此字段的处理逻辑(默认使用msg_time_send的值)
+     * 
+ * + * int64 msg_server_time = 3; + */ + public long getMsgServerTime() { + return msgServerTime_; + } + + public static final int MSG_POINTER_FIELD_NUMBER = 4; + private int msgPointer_; + /** + *
+     * @since v6
+     * 
+ * + * int32 msg_pointer = 4; + */ + public int getMsgPointer() { + return msgPointer_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (msgStatus_ != 0) { + output.writeInt32(2, msgStatus_); + } + if (msgServerTime_ != 0L) { + output.writeInt64(3, msgServerTime_); + } + if (msgPointer_ != 0) { + output.writeInt32(4, msgPointer_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (msgStatus_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, msgStatus_); + } + if (msgServerTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, msgServerTime_); + } + if (msgPointer_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, msgPointer_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.MsgStatus)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.MsgStatus other = (com.akaxin.proto.core.CoreProto.MsgStatus) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && (getMsgStatus() + == other.getMsgStatus()); + result = result && (getMsgServerTime() + == other.getMsgServerTime()); + result = result && (getMsgPointer() + == other.getMsgPointer()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + MSG_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getMsgStatus(); + hash = (37 * hash) + MSG_SERVER_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMsgServerTime()); + hash = (37 * hash) + MSG_POINTER_FIELD_NUMBER; + hash = (53 * hash) + getMsgPointer(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.MsgStatus parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgStatus parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgStatus parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgStatus parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgStatus parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgStatus parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgStatus parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgStatus parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgStatus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.MsgStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     * msg_status:1 发送成功
+     * msg_status:0 默认状态
+     * msg_status:-1 用户非好友关系,二人消息发送失败
+     * msg_status:-2 用户非群成员,群消息发送失败
+     * 
+ * + * Protobuf type {@code core.MsgStatus} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.MsgStatus) + com.akaxin.proto.core.CoreProto.MsgStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgStatus_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.MsgStatus.class, com.akaxin.proto.core.CoreProto.MsgStatus.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.MsgStatus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + msgStatus_ = 0; + + msgServerTime_ = 0L; + + msgPointer_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgStatus_descriptor; + } + + public com.akaxin.proto.core.CoreProto.MsgStatus getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.MsgStatus.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.MsgStatus build() { + com.akaxin.proto.core.CoreProto.MsgStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.MsgStatus buildPartial() { + com.akaxin.proto.core.CoreProto.MsgStatus result = new com.akaxin.proto.core.CoreProto.MsgStatus(this); + result.msgId_ = msgId_; + result.msgStatus_ = msgStatus_; + result.msgServerTime_ = msgServerTime_; + result.msgPointer_ = msgPointer_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.MsgStatus) { + return mergeFrom((com.akaxin.proto.core.CoreProto.MsgStatus)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.MsgStatus other) { + if (other == com.akaxin.proto.core.CoreProto.MsgStatus.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (other.getMsgStatus() != 0) { + setMsgStatus(other.getMsgStatus()); + } + if (other.getMsgServerTime() != 0L) { + setMsgServerTime(other.getMsgServerTime()); + } + if (other.getMsgPointer() != 0) { + setMsgPointer(other.getMsgPointer()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.MsgStatus parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.MsgStatus) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private int msgStatus_ ; + /** + * int32 msg_status = 2; + */ + public int getMsgStatus() { + return msgStatus_; + } + /** + * int32 msg_status = 2; + */ + public Builder setMsgStatus(int value) { + + msgStatus_ = value; + onChanged(); + return this; + } + /** + * int32 msg_status = 2; + */ + public Builder clearMsgStatus() { + + msgStatus_ = 0; + onChanged(); + return this; + } + + private long msgServerTime_ ; + /** + *
+       * msg_server_time 等于此条消息在服务器数据库的值
+       * 如果是发送成功的状态,此值有效。
+       * 为什么不使用服务器下发这条请求时的即时时间?
+       * 这样的话,可以脱离状态,随意的重发来保证成功。
+       * @since v2
+       * @todo 补充v2之前版本对此字段的处理逻辑(默认使用msg_time_send的值)
+       * 
+ * + * int64 msg_server_time = 3; + */ + public long getMsgServerTime() { + return msgServerTime_; + } + /** + *
+       * msg_server_time 等于此条消息在服务器数据库的值
+       * 如果是发送成功的状态,此值有效。
+       * 为什么不使用服务器下发这条请求时的即时时间?
+       * 这样的话,可以脱离状态,随意的重发来保证成功。
+       * @since v2
+       * @todo 补充v2之前版本对此字段的处理逻辑(默认使用msg_time_send的值)
+       * 
+ * + * int64 msg_server_time = 3; + */ + public Builder setMsgServerTime(long value) { + + msgServerTime_ = value; + onChanged(); + return this; + } + /** + *
+       * msg_server_time 等于此条消息在服务器数据库的值
+       * 如果是发送成功的状态,此值有效。
+       * 为什么不使用服务器下发这条请求时的即时时间?
+       * 这样的话,可以脱离状态,随意的重发来保证成功。
+       * @since v2
+       * @todo 补充v2之前版本对此字段的处理逻辑(默认使用msg_time_send的值)
+       * 
+ * + * int64 msg_server_time = 3; + */ + public Builder clearMsgServerTime() { + + msgServerTime_ = 0L; + onChanged(); + return this; + } + + private int msgPointer_ ; + /** + *
+       * @since v6
+       * 
+ * + * int32 msg_pointer = 4; + */ + public int getMsgPointer() { + return msgPointer_; + } + /** + *
+       * @since v6
+       * 
+ * + * int32 msg_pointer = 4; + */ + public Builder setMsgPointer(int value) { + + msgPointer_ = value; + onChanged(); + return this; + } + /** + *
+       * @since v6
+       * 
+ * + * int32 msg_pointer = 4; + */ + public Builder clearMsgPointer() { + + msgPointer_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.MsgStatus) + } + + // @@protoc_insertion_point(class_scope:core.MsgStatus) + private static final com.akaxin.proto.core.CoreProto.MsgStatus DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.MsgStatus(); + } + + public static com.akaxin.proto.core.CoreProto.MsgStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MsgStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MsgStatus(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.MsgStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MsgTextOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.MsgText) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + * string site_friend_id = 3; + */ + java.lang.String getSiteFriendId(); + /** + * string site_friend_id = 3; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + + /** + * bytes text = 4; + */ + com.google.protobuf.ByteString getText(); + + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 5; + */ + long getTime(); + } + /** + *
+   *普通文本消息
+   * 
+ * + * Protobuf type {@code core.MsgText} + */ + public static final class MsgText extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.MsgText) + MsgTextOrBuilder { + private static final long serialVersionUID = 0L; + // Use MsgText.newBuilder() to construct. + private MsgText(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MsgText() { + msgId_ = ""; + siteUserId_ = ""; + siteFriendId_ = ""; + text_ = com.google.protobuf.ByteString.EMPTY; + time_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MsgText( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + case 34: { + + text_ = input.readBytes(); + break; + } + case 40: { + + time_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgText_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgText_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.MsgText.class, com.akaxin.proto.core.CoreProto.MsgText.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteFriendId_; + /** + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEXT_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString text_; + /** + * bytes text = 4; + */ + public com.google.protobuf.ByteString getText() { + return text_; + } + + public static final int TIME_FIELD_NUMBER = 5; + private long time_; + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 5; + */ + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteFriendId_); + } + if (!text_.isEmpty()) { + output.writeBytes(4, text_); + } + if (time_ != 0L) { + output.writeInt64(5, time_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteFriendId_); + } + if (!text_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, text_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, time_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.MsgText)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.MsgText other = (com.akaxin.proto.core.CoreProto.MsgText) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && getText() + .equals(other.getText()); + result = result && (getTime() + == other.getTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.MsgText parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgText parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgText parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgText parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgText parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgText parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgText parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgText parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgText parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgText parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgText parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgText parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.MsgText prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *普通文本消息
+     * 
+ * + * Protobuf type {@code core.MsgText} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.MsgText) + com.akaxin.proto.core.CoreProto.MsgTextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgText_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgText_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.MsgText.class, com.akaxin.proto.core.CoreProto.MsgText.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.MsgText.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteFriendId_ = ""; + + text_ = com.google.protobuf.ByteString.EMPTY; + + time_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgText_descriptor; + } + + public com.akaxin.proto.core.CoreProto.MsgText getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.MsgText.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.MsgText build() { + com.akaxin.proto.core.CoreProto.MsgText result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.MsgText buildPartial() { + com.akaxin.proto.core.CoreProto.MsgText result = new com.akaxin.proto.core.CoreProto.MsgText(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteFriendId_ = siteFriendId_; + result.text_ = text_; + result.time_ = time_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.MsgText) { + return mergeFrom((com.akaxin.proto.core.CoreProto.MsgText)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.MsgText other) { + if (other == com.akaxin.proto.core.CoreProto.MsgText.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + if (other.getText() != com.google.protobuf.ByteString.EMPTY) { + setText(other.getText()); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.MsgText parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.MsgText) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_friend_id = 3; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + * string site_friend_id = 3; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + * string site_friend_id = 3; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString text_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes text = 4; + */ + public com.google.protobuf.ByteString getText() { + return text_; + } + /** + * bytes text = 4; + */ + public Builder setText(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + * bytes text = 4; + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 5; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 5; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 5; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.MsgText) + } + + // @@protoc_insertion_point(class_scope:core.MsgText) + private static final com.akaxin.proto.core.CoreProto.MsgText DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.MsgText(); + } + + public static com.akaxin.proto.core.CoreProto.MsgText getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MsgText parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MsgText(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.MsgText getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MsgSecretTextOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.MsgSecretText) + com.google.protobuf.MessageOrBuilder { + + /** + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + * string site_friend_id = 3; + */ + java.lang.String getSiteFriendId(); + /** + * string site_friend_id = 3; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + + /** + * bytes text = 4; + */ + com.google.protobuf.ByteString getText(); + + /** + *
+     *加密key,base64
+     * 
+ * + * string base64_ts_key = 5; + */ + java.lang.String getBase64TsKey(); + /** + *
+     *加密key,base64
+     * 
+ * + * string base64_ts_key = 5; + */ + com.google.protobuf.ByteString + getBase64TsKeyBytes(); + + /** + * string to_device_id = 6; + */ + java.lang.String getToDeviceId(); + /** + * string to_device_id = 6; + */ + com.google.protobuf.ByteString + getToDeviceIdBytes(); + + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + long getTime(); + } + /** + *
+   *加密文本消息
+   * 
+ * + * Protobuf type {@code core.MsgSecretText} + */ + public static final class MsgSecretText extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.MsgSecretText) + MsgSecretTextOrBuilder { + private static final long serialVersionUID = 0L; + // Use MsgSecretText.newBuilder() to construct. + private MsgSecretText(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MsgSecretText() { + msgId_ = ""; + siteUserId_ = ""; + siteFriendId_ = ""; + text_ = com.google.protobuf.ByteString.EMPTY; + base64TsKey_ = ""; + toDeviceId_ = ""; + time_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MsgSecretText( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + case 34: { + + text_ = input.readBytes(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + base64TsKey_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + toDeviceId_ = s; + break; + } + case 56: { + + time_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgSecretText_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgSecretText_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.MsgSecretText.class, com.akaxin.proto.core.CoreProto.MsgSecretText.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteFriendId_; + /** + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEXT_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString text_; + /** + * bytes text = 4; + */ + public com.google.protobuf.ByteString getText() { + return text_; + } + + public static final int BASE64_TS_KEY_FIELD_NUMBER = 5; + private volatile java.lang.Object base64TsKey_; + /** + *
+     *加密key,base64
+     * 
+ * + * string base64_ts_key = 5; + */ + public java.lang.String getBase64TsKey() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64TsKey_ = s; + return s; + } + } + /** + *
+     *加密key,base64
+     * 
+ * + * string base64_ts_key = 5; + */ + public com.google.protobuf.ByteString + getBase64TsKeyBytes() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64TsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TO_DEVICE_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object toDeviceId_; + /** + * string to_device_id = 6; + */ + public java.lang.String getToDeviceId() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + toDeviceId_ = s; + return s; + } + } + /** + * string to_device_id = 6; + */ + public com.google.protobuf.ByteString + getToDeviceIdBytes() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + toDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 7; + private long time_; + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteFriendId_); + } + if (!text_.isEmpty()) { + output.writeBytes(4, text_); + } + if (!getBase64TsKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, base64TsKey_); + } + if (!getToDeviceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, toDeviceId_); + } + if (time_ != 0L) { + output.writeInt64(7, time_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteFriendId_); + } + if (!text_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, text_); + } + if (!getBase64TsKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, base64TsKey_); + } + if (!getToDeviceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, toDeviceId_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, time_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.MsgSecretText)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.MsgSecretText other = (com.akaxin.proto.core.CoreProto.MsgSecretText) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && getText() + .equals(other.getText()); + result = result && getBase64TsKey() + .equals(other.getBase64TsKey()); + result = result && getToDeviceId() + .equals(other.getToDeviceId()); + result = result && (getTime() + == other.getTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + BASE64_TS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getBase64TsKey().hashCode(); + hash = (37 * hash) + TO_DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getToDeviceId().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.MsgSecretText parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretText parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretText parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretText parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretText parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretText parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretText parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretText parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretText parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretText parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretText parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretText parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.MsgSecretText prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *加密文本消息
+     * 
+ * + * Protobuf type {@code core.MsgSecretText} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.MsgSecretText) + com.akaxin.proto.core.CoreProto.MsgSecretTextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgSecretText_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgSecretText_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.MsgSecretText.class, com.akaxin.proto.core.CoreProto.MsgSecretText.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.MsgSecretText.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteFriendId_ = ""; + + text_ = com.google.protobuf.ByteString.EMPTY; + + base64TsKey_ = ""; + + toDeviceId_ = ""; + + time_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgSecretText_descriptor; + } + + public com.akaxin.proto.core.CoreProto.MsgSecretText getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.MsgSecretText.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.MsgSecretText build() { + com.akaxin.proto.core.CoreProto.MsgSecretText result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.MsgSecretText buildPartial() { + com.akaxin.proto.core.CoreProto.MsgSecretText result = new com.akaxin.proto.core.CoreProto.MsgSecretText(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteFriendId_ = siteFriendId_; + result.text_ = text_; + result.base64TsKey_ = base64TsKey_; + result.toDeviceId_ = toDeviceId_; + result.time_ = time_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.MsgSecretText) { + return mergeFrom((com.akaxin.proto.core.CoreProto.MsgSecretText)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.MsgSecretText other) { + if (other == com.akaxin.proto.core.CoreProto.MsgSecretText.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + if (other.getText() != com.google.protobuf.ByteString.EMPTY) { + setText(other.getText()); + } + if (!other.getBase64TsKey().isEmpty()) { + base64TsKey_ = other.base64TsKey_; + onChanged(); + } + if (!other.getToDeviceId().isEmpty()) { + toDeviceId_ = other.toDeviceId_; + onChanged(); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.MsgSecretText parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.MsgSecretText) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_friend_id = 3; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + * string site_friend_id = 3; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + * string site_friend_id = 3; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString text_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes text = 4; + */ + public com.google.protobuf.ByteString getText() { + return text_; + } + /** + * bytes text = 4; + */ + public Builder setText(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + * bytes text = 4; + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + + private java.lang.Object base64TsKey_ = ""; + /** + *
+       *加密key,base64
+       * 
+ * + * string base64_ts_key = 5; + */ + public java.lang.String getBase64TsKey() { + java.lang.Object ref = base64TsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64TsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *加密key,base64
+       * 
+ * + * string base64_ts_key = 5; + */ + public com.google.protobuf.ByteString + getBase64TsKeyBytes() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64TsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *加密key,base64
+       * 
+ * + * string base64_ts_key = 5; + */ + public Builder setBase64TsKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + base64TsKey_ = value; + onChanged(); + return this; + } + /** + *
+       *加密key,base64
+       * 
+ * + * string base64_ts_key = 5; + */ + public Builder clearBase64TsKey() { + + base64TsKey_ = getDefaultInstance().getBase64TsKey(); + onChanged(); + return this; + } + /** + *
+       *加密key,base64
+       * 
+ * + * string base64_ts_key = 5; + */ + public Builder setBase64TsKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + base64TsKey_ = value; + onChanged(); + return this; + } + + private java.lang.Object toDeviceId_ = ""; + /** + * string to_device_id = 6; + */ + public java.lang.String getToDeviceId() { + java.lang.Object ref = toDeviceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + toDeviceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string to_device_id = 6; + */ + public com.google.protobuf.ByteString + getToDeviceIdBytes() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + toDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string to_device_id = 6; + */ + public Builder setToDeviceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + toDeviceId_ = value; + onChanged(); + return this; + } + /** + * string to_device_id = 6; + */ + public Builder clearToDeviceId() { + + toDeviceId_ = getDefaultInstance().getToDeviceId(); + onChanged(); + return this; + } + /** + * string to_device_id = 6; + */ + public Builder setToDeviceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + toDeviceId_ = value; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.MsgSecretText) + } + + // @@protoc_insertion_point(class_scope:core.MsgSecretText) + private static final com.akaxin.proto.core.CoreProto.MsgSecretText DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.MsgSecretText(); + } + + public static com.akaxin.proto.core.CoreProto.MsgSecretText getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MsgSecretText parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MsgSecretText(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.MsgSecretText getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GroupTextOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.GroupText) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + * string site_group_id = 3; + */ + java.lang.String getSiteGroupId(); + /** + * string site_group_id = 3; + */ + com.google.protobuf.ByteString + getSiteGroupIdBytes(); + + /** + * bytes text = 4; + */ + com.google.protobuf.ByteString getText(); + + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 5; + */ + long getTime(); + + /** + *
+     *@who 群消息可以@他人
+     * 
+ * + * string at_site_user_id = 6; + */ + java.lang.String getAtSiteUserId(); + /** + *
+     *@who 群消息可以@他人
+     * 
+ * + * string at_site_user_id = 6; + */ + com.google.protobuf.ByteString + getAtSiteUserIdBytes(); + } + /** + *
+   *普通文本消息
+   * 
+ * + * Protobuf type {@code core.GroupText} + */ + public static final class GroupText extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.GroupText) + GroupTextOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupText.newBuilder() to construct. + private GroupText(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GroupText() { + msgId_ = ""; + siteUserId_ = ""; + siteGroupId_ = ""; + text_ = com.google.protobuf.ByteString.EMPTY; + time_ = 0L; + atSiteUserId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GroupText( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteGroupId_ = s; + break; + } + case 34: { + + text_ = input.readBytes(); + break; + } + case 40: { + + time_ = input.readInt64(); + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + atSiteUserId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupText_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupText_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupText.class, com.akaxin.proto.core.CoreProto.GroupText.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_GROUP_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteGroupId_; + /** + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } + } + /** + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEXT_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString text_; + /** + * bytes text = 4; + */ + public com.google.protobuf.ByteString getText() { + return text_; + } + + public static final int TIME_FIELD_NUMBER = 5; + private long time_; + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 5; + */ + public long getTime() { + return time_; + } + + public static final int AT_SITE_USER_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object atSiteUserId_; + /** + *
+     *@who 群消息可以@他人
+     * 
+ * + * string at_site_user_id = 6; + */ + public java.lang.String getAtSiteUserId() { + java.lang.Object ref = atSiteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + atSiteUserId_ = s; + return s; + } + } + /** + *
+     *@who 群消息可以@他人
+     * 
+ * + * string at_site_user_id = 6; + */ + public com.google.protobuf.ByteString + getAtSiteUserIdBytes() { + java.lang.Object ref = atSiteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + atSiteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteGroupId_); + } + if (!text_.isEmpty()) { + output.writeBytes(4, text_); + } + if (time_ != 0L) { + output.writeInt64(5, time_); + } + if (!getAtSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, atSiteUserId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteGroupId_); + } + if (!text_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, text_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, time_); + } + if (!getAtSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, atSiteUserId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.GroupText)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.GroupText other = (com.akaxin.proto.core.CoreProto.GroupText) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteGroupId() + .equals(other.getSiteGroupId()); + result = result && getText() + .equals(other.getText()); + result = result && (getTime() + == other.getTime()); + result = result && getAtSiteUserId() + .equals(other.getAtSiteUserId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteGroupId().hashCode(); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + AT_SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getAtSiteUserId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.GroupText parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupText parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupText parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupText parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupText parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupText parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupText parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupText parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupText parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupText parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupText parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupText parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.GroupText prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *普通文本消息
+     * 
+ * + * Protobuf type {@code core.GroupText} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.GroupText) + com.akaxin.proto.core.CoreProto.GroupTextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupText_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupText_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupText.class, com.akaxin.proto.core.CoreProto.GroupText.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.GroupText.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteGroupId_ = ""; + + text_ = com.google.protobuf.ByteString.EMPTY; + + time_ = 0L; + + atSiteUserId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupText_descriptor; + } + + public com.akaxin.proto.core.CoreProto.GroupText getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.GroupText.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.GroupText build() { + com.akaxin.proto.core.CoreProto.GroupText result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.GroupText buildPartial() { + com.akaxin.proto.core.CoreProto.GroupText result = new com.akaxin.proto.core.CoreProto.GroupText(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteGroupId_ = siteGroupId_; + result.text_ = text_; + result.time_ = time_; + result.atSiteUserId_ = atSiteUserId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.GroupText) { + return mergeFrom((com.akaxin.proto.core.CoreProto.GroupText)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.GroupText other) { + if (other == com.akaxin.proto.core.CoreProto.GroupText.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteGroupId().isEmpty()) { + siteGroupId_ = other.siteGroupId_; + onChanged(); + } + if (other.getText() != com.google.protobuf.ByteString.EMPTY) { + setText(other.getText()); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (!other.getAtSiteUserId().isEmpty()) { + atSiteUserId_ = other.atSiteUserId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.GroupText parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.GroupText) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteGroupId_ = ""; + /** + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_group_id = 3; + */ + public Builder setSiteGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteGroupId_ = value; + onChanged(); + return this; + } + /** + * string site_group_id = 3; + */ + public Builder clearSiteGroupId() { + + siteGroupId_ = getDefaultInstance().getSiteGroupId(); + onChanged(); + return this; + } + /** + * string site_group_id = 3; + */ + public Builder setSiteGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteGroupId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString text_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes text = 4; + */ + public com.google.protobuf.ByteString getText() { + return text_; + } + /** + * bytes text = 4; + */ + public Builder setText(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + * bytes text = 4; + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 5; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 5; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 5; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object atSiteUserId_ = ""; + /** + *
+       *@who 群消息可以@他人
+       * 
+ * + * string at_site_user_id = 6; + */ + public java.lang.String getAtSiteUserId() { + java.lang.Object ref = atSiteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + atSiteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *@who 群消息可以@他人
+       * 
+ * + * string at_site_user_id = 6; + */ + public com.google.protobuf.ByteString + getAtSiteUserIdBytes() { + java.lang.Object ref = atSiteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + atSiteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *@who 群消息可以@他人
+       * 
+ * + * string at_site_user_id = 6; + */ + public Builder setAtSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + atSiteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *@who 群消息可以@他人
+       * 
+ * + * string at_site_user_id = 6; + */ + public Builder clearAtSiteUserId() { + + atSiteUserId_ = getDefaultInstance().getAtSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *@who 群消息可以@他人
+       * 
+ * + * string at_site_user_id = 6; + */ + public Builder setAtSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + atSiteUserId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.GroupText) + } + + // @@protoc_insertion_point(class_scope:core.GroupText) + private static final com.akaxin.proto.core.CoreProto.GroupText DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.GroupText(); + } + + public static com.akaxin.proto.core.CoreProto.GroupText getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GroupText parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GroupText(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.GroupText getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GroupSecretTextOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.GroupSecretText) + com.google.protobuf.MessageOrBuilder { + + /** + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + * string site_group_id = 3; + */ + java.lang.String getSiteGroupId(); + /** + * string site_group_id = 3; + */ + com.google.protobuf.ByteString + getSiteGroupIdBytes(); + + /** + * bytes text = 4; + */ + com.google.protobuf.ByteString getText(); + + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + java.lang.String getBase64TsKey(); + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + com.google.protobuf.ByteString + getBase64TsKeyBytes(); + + /** + * string to_device_id = 6; + */ + java.lang.String getToDeviceId(); + /** + * string to_device_id = 6; + */ + com.google.protobuf.ByteString + getToDeviceIdBytes(); + + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + long getTime(); + } + /** + *
+   *加密文本消息
+   * 
+ * + * Protobuf type {@code core.GroupSecretText} + */ + public static final class GroupSecretText extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.GroupSecretText) + GroupSecretTextOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupSecretText.newBuilder() to construct. + private GroupSecretText(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GroupSecretText() { + msgId_ = ""; + siteUserId_ = ""; + siteGroupId_ = ""; + text_ = com.google.protobuf.ByteString.EMPTY; + base64TsKey_ = ""; + toDeviceId_ = ""; + time_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GroupSecretText( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteGroupId_ = s; + break; + } + case 34: { + + text_ = input.readBytes(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + base64TsKey_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + toDeviceId_ = s; + break; + } + case 56: { + + time_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretText_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretText_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupSecretText.class, com.akaxin.proto.core.CoreProto.GroupSecretText.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_GROUP_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteGroupId_; + /** + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } + } + /** + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEXT_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString text_; + /** + * bytes text = 4; + */ + public com.google.protobuf.ByteString getText() { + return text_; + } + + public static final int BASE64_TS_KEY_FIELD_NUMBER = 5; + private volatile java.lang.Object base64TsKey_; + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + public java.lang.String getBase64TsKey() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64TsKey_ = s; + return s; + } + } + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + public com.google.protobuf.ByteString + getBase64TsKeyBytes() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64TsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TO_DEVICE_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object toDeviceId_; + /** + * string to_device_id = 6; + */ + public java.lang.String getToDeviceId() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + toDeviceId_ = s; + return s; + } + } + /** + * string to_device_id = 6; + */ + public com.google.protobuf.ByteString + getToDeviceIdBytes() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + toDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 7; + private long time_; + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteGroupId_); + } + if (!text_.isEmpty()) { + output.writeBytes(4, text_); + } + if (!getBase64TsKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, base64TsKey_); + } + if (!getToDeviceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, toDeviceId_); + } + if (time_ != 0L) { + output.writeInt64(7, time_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteGroupId_); + } + if (!text_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, text_); + } + if (!getBase64TsKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, base64TsKey_); + } + if (!getToDeviceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, toDeviceId_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, time_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.GroupSecretText)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.GroupSecretText other = (com.akaxin.proto.core.CoreProto.GroupSecretText) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteGroupId() + .equals(other.getSiteGroupId()); + result = result && getText() + .equals(other.getText()); + result = result && getBase64TsKey() + .equals(other.getBase64TsKey()); + result = result && getToDeviceId() + .equals(other.getToDeviceId()); + result = result && (getTime() + == other.getTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteGroupId().hashCode(); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + BASE64_TS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getBase64TsKey().hashCode(); + hash = (37 * hash) + TO_DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getToDeviceId().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.GroupSecretText parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretText parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretText parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretText parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretText parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretText parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretText parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretText parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretText parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretText parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretText parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretText parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.GroupSecretText prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *加密文本消息
+     * 
+ * + * Protobuf type {@code core.GroupSecretText} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.GroupSecretText) + com.akaxin.proto.core.CoreProto.GroupSecretTextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretText_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretText_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupSecretText.class, com.akaxin.proto.core.CoreProto.GroupSecretText.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.GroupSecretText.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteGroupId_ = ""; + + text_ = com.google.protobuf.ByteString.EMPTY; + + base64TsKey_ = ""; + + toDeviceId_ = ""; + + time_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretText_descriptor; + } + + public com.akaxin.proto.core.CoreProto.GroupSecretText getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.GroupSecretText.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.GroupSecretText build() { + com.akaxin.proto.core.CoreProto.GroupSecretText result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.GroupSecretText buildPartial() { + com.akaxin.proto.core.CoreProto.GroupSecretText result = new com.akaxin.proto.core.CoreProto.GroupSecretText(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteGroupId_ = siteGroupId_; + result.text_ = text_; + result.base64TsKey_ = base64TsKey_; + result.toDeviceId_ = toDeviceId_; + result.time_ = time_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.GroupSecretText) { + return mergeFrom((com.akaxin.proto.core.CoreProto.GroupSecretText)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.GroupSecretText other) { + if (other == com.akaxin.proto.core.CoreProto.GroupSecretText.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteGroupId().isEmpty()) { + siteGroupId_ = other.siteGroupId_; + onChanged(); + } + if (other.getText() != com.google.protobuf.ByteString.EMPTY) { + setText(other.getText()); + } + if (!other.getBase64TsKey().isEmpty()) { + base64TsKey_ = other.base64TsKey_; + onChanged(); + } + if (!other.getToDeviceId().isEmpty()) { + toDeviceId_ = other.toDeviceId_; + onChanged(); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.GroupSecretText parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.GroupSecretText) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteGroupId_ = ""; + /** + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_group_id = 3; + */ + public Builder setSiteGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteGroupId_ = value; + onChanged(); + return this; + } + /** + * string site_group_id = 3; + */ + public Builder clearSiteGroupId() { + + siteGroupId_ = getDefaultInstance().getSiteGroupId(); + onChanged(); + return this; + } + /** + * string site_group_id = 3; + */ + public Builder setSiteGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteGroupId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString text_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes text = 4; + */ + public com.google.protobuf.ByteString getText() { + return text_; + } + /** + * bytes text = 4; + */ + public Builder setText(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + * bytes text = 4; + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + + private java.lang.Object base64TsKey_ = ""; + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public java.lang.String getBase64TsKey() { + java.lang.Object ref = base64TsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64TsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public com.google.protobuf.ByteString + getBase64TsKeyBytes() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64TsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public Builder setBase64TsKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + base64TsKey_ = value; + onChanged(); + return this; + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public Builder clearBase64TsKey() { + + base64TsKey_ = getDefaultInstance().getBase64TsKey(); + onChanged(); + return this; + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public Builder setBase64TsKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + base64TsKey_ = value; + onChanged(); + return this; + } + + private java.lang.Object toDeviceId_ = ""; + /** + * string to_device_id = 6; + */ + public java.lang.String getToDeviceId() { + java.lang.Object ref = toDeviceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + toDeviceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string to_device_id = 6; + */ + public com.google.protobuf.ByteString + getToDeviceIdBytes() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + toDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string to_device_id = 6; + */ + public Builder setToDeviceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + toDeviceId_ = value; + onChanged(); + return this; + } + /** + * string to_device_id = 6; + */ + public Builder clearToDeviceId() { + + toDeviceId_ = getDefaultInstance().getToDeviceId(); + onChanged(); + return this; + } + /** + * string to_device_id = 6; + */ + public Builder setToDeviceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + toDeviceId_ = value; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.GroupSecretText) + } + + // @@protoc_insertion_point(class_scope:core.GroupSecretText) + private static final com.akaxin.proto.core.CoreProto.GroupSecretText DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.GroupSecretText(); + } + + public static com.akaxin.proto.core.CoreProto.GroupSecretText getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GroupSecretText parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GroupSecretText(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.GroupSecretText getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MsgImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.MsgImage) + com.google.protobuf.MessageOrBuilder { + + /** + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + * string site_friend_id = 3; + */ + java.lang.String getSiteFriendId(); + /** + * string site_friend_id = 3; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + + /** + * string imageId = 4; + */ + java.lang.String getImageId(); + /** + * string imageId = 4; + */ + com.google.protobuf.ByteString + getImageIdBytes(); + + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + long getTime(); + } + /** + *
+   *普通图片消息
+   * 
+ * + * Protobuf type {@code core.MsgImage} + */ + public static final class MsgImage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.MsgImage) + MsgImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use MsgImage.newBuilder() to construct. + private MsgImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MsgImage() { + msgId_ = ""; + siteUserId_ = ""; + siteFriendId_ = ""; + imageId_ = ""; + time_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MsgImage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + imageId_ = s; + break; + } + case 56: { + + time_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgImage_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.MsgImage.class, com.akaxin.proto.core.CoreProto.MsgImage.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteFriendId_; + /** + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGEID_FIELD_NUMBER = 4; + private volatile java.lang.Object imageId_; + /** + * string imageId = 4; + */ + public java.lang.String getImageId() { + java.lang.Object ref = imageId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageId_ = s; + return s; + } + } + /** + * string imageId = 4; + */ + public com.google.protobuf.ByteString + getImageIdBytes() { + java.lang.Object ref = imageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 7; + private long time_; + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteFriendId_); + } + if (!getImageIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, imageId_); + } + if (time_ != 0L) { + output.writeInt64(7, time_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteFriendId_); + } + if (!getImageIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, imageId_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, time_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.MsgImage)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.MsgImage other = (com.akaxin.proto.core.CoreProto.MsgImage) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && getImageId() + .equals(other.getImageId()); + result = result && (getTime() + == other.getTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (37 * hash) + IMAGEID_FIELD_NUMBER; + hash = (53 * hash) + getImageId().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.MsgImage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgImage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgImage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgImage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgImage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgImage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.MsgImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *普通图片消息
+     * 
+ * + * Protobuf type {@code core.MsgImage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.MsgImage) + com.akaxin.proto.core.CoreProto.MsgImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgImage_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.MsgImage.class, com.akaxin.proto.core.CoreProto.MsgImage.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.MsgImage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteFriendId_ = ""; + + imageId_ = ""; + + time_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgImage_descriptor; + } + + public com.akaxin.proto.core.CoreProto.MsgImage getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.MsgImage.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.MsgImage build() { + com.akaxin.proto.core.CoreProto.MsgImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.MsgImage buildPartial() { + com.akaxin.proto.core.CoreProto.MsgImage result = new com.akaxin.proto.core.CoreProto.MsgImage(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteFriendId_ = siteFriendId_; + result.imageId_ = imageId_; + result.time_ = time_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.MsgImage) { + return mergeFrom((com.akaxin.proto.core.CoreProto.MsgImage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.MsgImage other) { + if (other == com.akaxin.proto.core.CoreProto.MsgImage.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + if (!other.getImageId().isEmpty()) { + imageId_ = other.imageId_; + onChanged(); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.MsgImage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.MsgImage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_friend_id = 3; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + * string site_friend_id = 3; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + * string site_friend_id = 3; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageId_ = ""; + /** + * string imageId = 4; + */ + public java.lang.String getImageId() { + java.lang.Object ref = imageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string imageId = 4; + */ + public com.google.protobuf.ByteString + getImageIdBytes() { + java.lang.Object ref = imageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string imageId = 4; + */ + public Builder setImageId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageId_ = value; + onChanged(); + return this; + } + /** + * string imageId = 4; + */ + public Builder clearImageId() { + + imageId_ = getDefaultInstance().getImageId(); + onChanged(); + return this; + } + /** + * string imageId = 4; + */ + public Builder setImageIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageId_ = value; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.MsgImage) + } + + // @@protoc_insertion_point(class_scope:core.MsgImage) + private static final com.akaxin.proto.core.CoreProto.MsgImage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.MsgImage(); + } + + public static com.akaxin.proto.core.CoreProto.MsgImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MsgImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MsgImage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.MsgImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MsgSecretImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.MsgSecretImage) + com.google.protobuf.MessageOrBuilder { + + /** + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + * string site_friend_id = 3; + */ + java.lang.String getSiteFriendId(); + /** + * string site_friend_id = 3; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + + /** + * string imageId = 4; + */ + java.lang.String getImageId(); + /** + * string imageId = 4; + */ + com.google.protobuf.ByteString + getImageIdBytes(); + + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + java.lang.String getBase64TsKey(); + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + com.google.protobuf.ByteString + getBase64TsKeyBytes(); + + /** + * string to_device_id = 6; + */ + java.lang.String getToDeviceId(); + /** + * string to_device_id = 6; + */ + com.google.protobuf.ByteString + getToDeviceIdBytes(); + + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + long getTime(); + } + /** + *
+   *加密图片消息
+   * 
+ * + * Protobuf type {@code core.MsgSecretImage} + */ + public static final class MsgSecretImage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.MsgSecretImage) + MsgSecretImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use MsgSecretImage.newBuilder() to construct. + private MsgSecretImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MsgSecretImage() { + msgId_ = ""; + siteUserId_ = ""; + siteFriendId_ = ""; + imageId_ = ""; + base64TsKey_ = ""; + toDeviceId_ = ""; + time_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MsgSecretImage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + imageId_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + base64TsKey_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + toDeviceId_ = s; + break; + } + case 56: { + + time_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgSecretImage_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgSecretImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.MsgSecretImage.class, com.akaxin.proto.core.CoreProto.MsgSecretImage.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteFriendId_; + /** + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGEID_FIELD_NUMBER = 4; + private volatile java.lang.Object imageId_; + /** + * string imageId = 4; + */ + public java.lang.String getImageId() { + java.lang.Object ref = imageId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageId_ = s; + return s; + } + } + /** + * string imageId = 4; + */ + public com.google.protobuf.ByteString + getImageIdBytes() { + java.lang.Object ref = imageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE64_TS_KEY_FIELD_NUMBER = 5; + private volatile java.lang.Object base64TsKey_; + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + public java.lang.String getBase64TsKey() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64TsKey_ = s; + return s; + } + } + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + public com.google.protobuf.ByteString + getBase64TsKeyBytes() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64TsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TO_DEVICE_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object toDeviceId_; + /** + * string to_device_id = 6; + */ + public java.lang.String getToDeviceId() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + toDeviceId_ = s; + return s; + } + } + /** + * string to_device_id = 6; + */ + public com.google.protobuf.ByteString + getToDeviceIdBytes() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + toDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 7; + private long time_; + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteFriendId_); + } + if (!getImageIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, imageId_); + } + if (!getBase64TsKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, base64TsKey_); + } + if (!getToDeviceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, toDeviceId_); + } + if (time_ != 0L) { + output.writeInt64(7, time_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteFriendId_); + } + if (!getImageIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, imageId_); + } + if (!getBase64TsKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, base64TsKey_); + } + if (!getToDeviceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, toDeviceId_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, time_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.MsgSecretImage)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.MsgSecretImage other = (com.akaxin.proto.core.CoreProto.MsgSecretImage) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && getImageId() + .equals(other.getImageId()); + result = result && getBase64TsKey() + .equals(other.getBase64TsKey()); + result = result && getToDeviceId() + .equals(other.getToDeviceId()); + result = result && (getTime() + == other.getTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (37 * hash) + IMAGEID_FIELD_NUMBER; + hash = (53 * hash) + getImageId().hashCode(); + hash = (37 * hash) + BASE64_TS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getBase64TsKey().hashCode(); + hash = (37 * hash) + TO_DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getToDeviceId().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.MsgSecretImage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretImage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretImage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretImage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretImage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretImage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.MsgSecretImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *加密图片消息
+     * 
+ * + * Protobuf type {@code core.MsgSecretImage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.MsgSecretImage) + com.akaxin.proto.core.CoreProto.MsgSecretImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgSecretImage_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgSecretImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.MsgSecretImage.class, com.akaxin.proto.core.CoreProto.MsgSecretImage.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.MsgSecretImage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteFriendId_ = ""; + + imageId_ = ""; + + base64TsKey_ = ""; + + toDeviceId_ = ""; + + time_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgSecretImage_descriptor; + } + + public com.akaxin.proto.core.CoreProto.MsgSecretImage getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.MsgSecretImage.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.MsgSecretImage build() { + com.akaxin.proto.core.CoreProto.MsgSecretImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.MsgSecretImage buildPartial() { + com.akaxin.proto.core.CoreProto.MsgSecretImage result = new com.akaxin.proto.core.CoreProto.MsgSecretImage(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteFriendId_ = siteFriendId_; + result.imageId_ = imageId_; + result.base64TsKey_ = base64TsKey_; + result.toDeviceId_ = toDeviceId_; + result.time_ = time_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.MsgSecretImage) { + return mergeFrom((com.akaxin.proto.core.CoreProto.MsgSecretImage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.MsgSecretImage other) { + if (other == com.akaxin.proto.core.CoreProto.MsgSecretImage.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + if (!other.getImageId().isEmpty()) { + imageId_ = other.imageId_; + onChanged(); + } + if (!other.getBase64TsKey().isEmpty()) { + base64TsKey_ = other.base64TsKey_; + onChanged(); + } + if (!other.getToDeviceId().isEmpty()) { + toDeviceId_ = other.toDeviceId_; + onChanged(); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.MsgSecretImage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.MsgSecretImage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_friend_id = 3; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + * string site_friend_id = 3; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + * string site_friend_id = 3; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageId_ = ""; + /** + * string imageId = 4; + */ + public java.lang.String getImageId() { + java.lang.Object ref = imageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string imageId = 4; + */ + public com.google.protobuf.ByteString + getImageIdBytes() { + java.lang.Object ref = imageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string imageId = 4; + */ + public Builder setImageId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageId_ = value; + onChanged(); + return this; + } + /** + * string imageId = 4; + */ + public Builder clearImageId() { + + imageId_ = getDefaultInstance().getImageId(); + onChanged(); + return this; + } + /** + * string imageId = 4; + */ + public Builder setImageIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageId_ = value; + onChanged(); + return this; + } + + private java.lang.Object base64TsKey_ = ""; + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public java.lang.String getBase64TsKey() { + java.lang.Object ref = base64TsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64TsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public com.google.protobuf.ByteString + getBase64TsKeyBytes() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64TsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public Builder setBase64TsKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + base64TsKey_ = value; + onChanged(); + return this; + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public Builder clearBase64TsKey() { + + base64TsKey_ = getDefaultInstance().getBase64TsKey(); + onChanged(); + return this; + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public Builder setBase64TsKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + base64TsKey_ = value; + onChanged(); + return this; + } + + private java.lang.Object toDeviceId_ = ""; + /** + * string to_device_id = 6; + */ + public java.lang.String getToDeviceId() { + java.lang.Object ref = toDeviceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + toDeviceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string to_device_id = 6; + */ + public com.google.protobuf.ByteString + getToDeviceIdBytes() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + toDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string to_device_id = 6; + */ + public Builder setToDeviceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + toDeviceId_ = value; + onChanged(); + return this; + } + /** + * string to_device_id = 6; + */ + public Builder clearToDeviceId() { + + toDeviceId_ = getDefaultInstance().getToDeviceId(); + onChanged(); + return this; + } + /** + * string to_device_id = 6; + */ + public Builder setToDeviceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + toDeviceId_ = value; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.MsgSecretImage) + } + + // @@protoc_insertion_point(class_scope:core.MsgSecretImage) + private static final com.akaxin.proto.core.CoreProto.MsgSecretImage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.MsgSecretImage(); + } + + public static com.akaxin.proto.core.CoreProto.MsgSecretImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MsgSecretImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MsgSecretImage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.MsgSecretImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GroupImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.GroupImage) + com.google.protobuf.MessageOrBuilder { + + /** + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + * string site_group_id = 3; + */ + java.lang.String getSiteGroupId(); + /** + * string site_group_id = 3; + */ + com.google.protobuf.ByteString + getSiteGroupIdBytes(); + + /** + * string imageId = 4; + */ + java.lang.String getImageId(); + /** + * string imageId = 4; + */ + com.google.protobuf.ByteString + getImageIdBytes(); + + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + long getTime(); + } + /** + *
+   *群普通图片消息
+   * 
+ * + * Protobuf type {@code core.GroupImage} + */ + public static final class GroupImage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.GroupImage) + GroupImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupImage.newBuilder() to construct. + private GroupImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GroupImage() { + msgId_ = ""; + siteUserId_ = ""; + siteGroupId_ = ""; + imageId_ = ""; + time_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GroupImage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteGroupId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + imageId_ = s; + break; + } + case 56: { + + time_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupImage_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupImage.class, com.akaxin.proto.core.CoreProto.GroupImage.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_GROUP_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteGroupId_; + /** + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } + } + /** + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGEID_FIELD_NUMBER = 4; + private volatile java.lang.Object imageId_; + /** + * string imageId = 4; + */ + public java.lang.String getImageId() { + java.lang.Object ref = imageId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageId_ = s; + return s; + } + } + /** + * string imageId = 4; + */ + public com.google.protobuf.ByteString + getImageIdBytes() { + java.lang.Object ref = imageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 7; + private long time_; + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteGroupId_); + } + if (!getImageIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, imageId_); + } + if (time_ != 0L) { + output.writeInt64(7, time_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteGroupId_); + } + if (!getImageIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, imageId_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, time_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.GroupImage)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.GroupImage other = (com.akaxin.proto.core.CoreProto.GroupImage) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteGroupId() + .equals(other.getSiteGroupId()); + result = result && getImageId() + .equals(other.getImageId()); + result = result && (getTime() + == other.getTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteGroupId().hashCode(); + hash = (37 * hash) + IMAGEID_FIELD_NUMBER; + hash = (53 * hash) + getImageId().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.GroupImage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupImage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupImage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupImage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupImage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupImage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.GroupImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *群普通图片消息
+     * 
+ * + * Protobuf type {@code core.GroupImage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.GroupImage) + com.akaxin.proto.core.CoreProto.GroupImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupImage_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupImage.class, com.akaxin.proto.core.CoreProto.GroupImage.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.GroupImage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteGroupId_ = ""; + + imageId_ = ""; + + time_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupImage_descriptor; + } + + public com.akaxin.proto.core.CoreProto.GroupImage getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.GroupImage.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.GroupImage build() { + com.akaxin.proto.core.CoreProto.GroupImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.GroupImage buildPartial() { + com.akaxin.proto.core.CoreProto.GroupImage result = new com.akaxin.proto.core.CoreProto.GroupImage(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteGroupId_ = siteGroupId_; + result.imageId_ = imageId_; + result.time_ = time_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.GroupImage) { + return mergeFrom((com.akaxin.proto.core.CoreProto.GroupImage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.GroupImage other) { + if (other == com.akaxin.proto.core.CoreProto.GroupImage.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteGroupId().isEmpty()) { + siteGroupId_ = other.siteGroupId_; + onChanged(); + } + if (!other.getImageId().isEmpty()) { + imageId_ = other.imageId_; + onChanged(); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.GroupImage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.GroupImage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteGroupId_ = ""; + /** + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_group_id = 3; + */ + public Builder setSiteGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteGroupId_ = value; + onChanged(); + return this; + } + /** + * string site_group_id = 3; + */ + public Builder clearSiteGroupId() { + + siteGroupId_ = getDefaultInstance().getSiteGroupId(); + onChanged(); + return this; + } + /** + * string site_group_id = 3; + */ + public Builder setSiteGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteGroupId_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageId_ = ""; + /** + * string imageId = 4; + */ + public java.lang.String getImageId() { + java.lang.Object ref = imageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string imageId = 4; + */ + public com.google.protobuf.ByteString + getImageIdBytes() { + java.lang.Object ref = imageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string imageId = 4; + */ + public Builder setImageId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageId_ = value; + onChanged(); + return this; + } + /** + * string imageId = 4; + */ + public Builder clearImageId() { + + imageId_ = getDefaultInstance().getImageId(); + onChanged(); + return this; + } + /** + * string imageId = 4; + */ + public Builder setImageIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageId_ = value; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.GroupImage) + } + + // @@protoc_insertion_point(class_scope:core.GroupImage) + private static final com.akaxin.proto.core.CoreProto.GroupImage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.GroupImage(); + } + + public static com.akaxin.proto.core.CoreProto.GroupImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GroupImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GroupImage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.GroupImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GroupSecretImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.GroupSecretImage) + com.google.protobuf.MessageOrBuilder { + + /** + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + * string site_group_id = 3; + */ + java.lang.String getSiteGroupId(); + /** + * string site_group_id = 3; + */ + com.google.protobuf.ByteString + getSiteGroupIdBytes(); + + /** + * string imageId = 4; + */ + java.lang.String getImageId(); + /** + * string imageId = 4; + */ + com.google.protobuf.ByteString + getImageIdBytes(); + + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + java.lang.String getBase64TsKey(); + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + com.google.protobuf.ByteString + getBase64TsKeyBytes(); + + /** + * string to_device_id = 6; + */ + java.lang.String getToDeviceId(); + /** + * string to_device_id = 6; + */ + com.google.protobuf.ByteString + getToDeviceIdBytes(); + + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + long getTime(); + } + /** + *
+   *群加密图片消息
+   * 
+ * + * Protobuf type {@code core.GroupSecretImage} + */ + public static final class GroupSecretImage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.GroupSecretImage) + GroupSecretImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupSecretImage.newBuilder() to construct. + private GroupSecretImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GroupSecretImage() { + msgId_ = ""; + siteUserId_ = ""; + siteGroupId_ = ""; + imageId_ = ""; + base64TsKey_ = ""; + toDeviceId_ = ""; + time_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GroupSecretImage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteGroupId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + imageId_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + base64TsKey_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + toDeviceId_ = s; + break; + } + case 56: { + + time_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretImage_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupSecretImage.class, com.akaxin.proto.core.CoreProto.GroupSecretImage.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_GROUP_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteGroupId_; + /** + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } + } + /** + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGEID_FIELD_NUMBER = 4; + private volatile java.lang.Object imageId_; + /** + * string imageId = 4; + */ + public java.lang.String getImageId() { + java.lang.Object ref = imageId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageId_ = s; + return s; + } + } + /** + * string imageId = 4; + */ + public com.google.protobuf.ByteString + getImageIdBytes() { + java.lang.Object ref = imageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE64_TS_KEY_FIELD_NUMBER = 5; + private volatile java.lang.Object base64TsKey_; + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + public java.lang.String getBase64TsKey() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64TsKey_ = s; + return s; + } + } + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + public com.google.protobuf.ByteString + getBase64TsKeyBytes() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64TsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TO_DEVICE_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object toDeviceId_; + /** + * string to_device_id = 6; + */ + public java.lang.String getToDeviceId() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + toDeviceId_ = s; + return s; + } + } + /** + * string to_device_id = 6; + */ + public com.google.protobuf.ByteString + getToDeviceIdBytes() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + toDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 7; + private long time_; + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteGroupId_); + } + if (!getImageIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, imageId_); + } + if (!getBase64TsKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, base64TsKey_); + } + if (!getToDeviceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, toDeviceId_); + } + if (time_ != 0L) { + output.writeInt64(7, time_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteGroupId_); + } + if (!getImageIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, imageId_); + } + if (!getBase64TsKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, base64TsKey_); + } + if (!getToDeviceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, toDeviceId_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, time_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.GroupSecretImage)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.GroupSecretImage other = (com.akaxin.proto.core.CoreProto.GroupSecretImage) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteGroupId() + .equals(other.getSiteGroupId()); + result = result && getImageId() + .equals(other.getImageId()); + result = result && getBase64TsKey() + .equals(other.getBase64TsKey()); + result = result && getToDeviceId() + .equals(other.getToDeviceId()); + result = result && (getTime() + == other.getTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteGroupId().hashCode(); + hash = (37 * hash) + IMAGEID_FIELD_NUMBER; + hash = (53 * hash) + getImageId().hashCode(); + hash = (37 * hash) + BASE64_TS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getBase64TsKey().hashCode(); + hash = (37 * hash) + TO_DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getToDeviceId().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.GroupSecretImage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretImage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretImage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretImage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretImage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretImage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.GroupSecretImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *群加密图片消息
+     * 
+ * + * Protobuf type {@code core.GroupSecretImage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.GroupSecretImage) + com.akaxin.proto.core.CoreProto.GroupSecretImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretImage_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupSecretImage.class, com.akaxin.proto.core.CoreProto.GroupSecretImage.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.GroupSecretImage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteGroupId_ = ""; + + imageId_ = ""; + + base64TsKey_ = ""; + + toDeviceId_ = ""; + + time_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretImage_descriptor; + } + + public com.akaxin.proto.core.CoreProto.GroupSecretImage getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.GroupSecretImage.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.GroupSecretImage build() { + com.akaxin.proto.core.CoreProto.GroupSecretImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.GroupSecretImage buildPartial() { + com.akaxin.proto.core.CoreProto.GroupSecretImage result = new com.akaxin.proto.core.CoreProto.GroupSecretImage(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteGroupId_ = siteGroupId_; + result.imageId_ = imageId_; + result.base64TsKey_ = base64TsKey_; + result.toDeviceId_ = toDeviceId_; + result.time_ = time_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.GroupSecretImage) { + return mergeFrom((com.akaxin.proto.core.CoreProto.GroupSecretImage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.GroupSecretImage other) { + if (other == com.akaxin.proto.core.CoreProto.GroupSecretImage.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteGroupId().isEmpty()) { + siteGroupId_ = other.siteGroupId_; + onChanged(); + } + if (!other.getImageId().isEmpty()) { + imageId_ = other.imageId_; + onChanged(); + } + if (!other.getBase64TsKey().isEmpty()) { + base64TsKey_ = other.base64TsKey_; + onChanged(); + } + if (!other.getToDeviceId().isEmpty()) { + toDeviceId_ = other.toDeviceId_; + onChanged(); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.GroupSecretImage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.GroupSecretImage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteGroupId_ = ""; + /** + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_group_id = 3; + */ + public Builder setSiteGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteGroupId_ = value; + onChanged(); + return this; + } + /** + * string site_group_id = 3; + */ + public Builder clearSiteGroupId() { + + siteGroupId_ = getDefaultInstance().getSiteGroupId(); + onChanged(); + return this; + } + /** + * string site_group_id = 3; + */ + public Builder setSiteGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteGroupId_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageId_ = ""; + /** + * string imageId = 4; + */ + public java.lang.String getImageId() { + java.lang.Object ref = imageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string imageId = 4; + */ + public com.google.protobuf.ByteString + getImageIdBytes() { + java.lang.Object ref = imageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string imageId = 4; + */ + public Builder setImageId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageId_ = value; + onChanged(); + return this; + } + /** + * string imageId = 4; + */ + public Builder clearImageId() { + + imageId_ = getDefaultInstance().getImageId(); + onChanged(); + return this; + } + /** + * string imageId = 4; + */ + public Builder setImageIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageId_ = value; + onChanged(); + return this; + } + + private java.lang.Object base64TsKey_ = ""; + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public java.lang.String getBase64TsKey() { + java.lang.Object ref = base64TsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64TsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public com.google.protobuf.ByteString + getBase64TsKeyBytes() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64TsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public Builder setBase64TsKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + base64TsKey_ = value; + onChanged(); + return this; + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public Builder clearBase64TsKey() { + + base64TsKey_ = getDefaultInstance().getBase64TsKey(); + onChanged(); + return this; + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public Builder setBase64TsKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + base64TsKey_ = value; + onChanged(); + return this; + } + + private java.lang.Object toDeviceId_ = ""; + /** + * string to_device_id = 6; + */ + public java.lang.String getToDeviceId() { + java.lang.Object ref = toDeviceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + toDeviceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string to_device_id = 6; + */ + public com.google.protobuf.ByteString + getToDeviceIdBytes() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + toDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string to_device_id = 6; + */ + public Builder setToDeviceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + toDeviceId_ = value; + onChanged(); + return this; + } + /** + * string to_device_id = 6; + */ + public Builder clearToDeviceId() { + + toDeviceId_ = getDefaultInstance().getToDeviceId(); + onChanged(); + return this; + } + /** + * string to_device_id = 6; + */ + public Builder setToDeviceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + toDeviceId_ = value; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.GroupSecretImage) + } + + // @@protoc_insertion_point(class_scope:core.GroupSecretImage) + private static final com.akaxin.proto.core.CoreProto.GroupSecretImage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.GroupSecretImage(); + } + + public static com.akaxin.proto.core.CoreProto.GroupSecretImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GroupSecretImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GroupSecretImage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.GroupSecretImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MsgVoiceOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.MsgVoice) + com.google.protobuf.MessageOrBuilder { + + /** + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + * string site_friend_id = 3; + */ + java.lang.String getSiteFriendId(); + /** + * string site_friend_id = 3; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + + /** + *
+     *语音地址ID
+     * 
+ * + * string voiceId = 4; + */ + java.lang.String getVoiceId(); + /** + *
+     *语音地址ID
+     * 
+ * + * string voiceId = 4; + */ + com.google.protobuf.ByteString + getVoiceIdBytes(); + + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + long getTime(); + } + /** + *
+   *普通语音消息
+   * 
+ * + * Protobuf type {@code core.MsgVoice} + */ + public static final class MsgVoice extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.MsgVoice) + MsgVoiceOrBuilder { + private static final long serialVersionUID = 0L; + // Use MsgVoice.newBuilder() to construct. + private MsgVoice(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MsgVoice() { + msgId_ = ""; + siteUserId_ = ""; + siteFriendId_ = ""; + voiceId_ = ""; + time_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MsgVoice( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + voiceId_ = s; + break; + } + case 56: { + + time_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgVoice_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgVoice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.MsgVoice.class, com.akaxin.proto.core.CoreProto.MsgVoice.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteFriendId_; + /** + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VOICEID_FIELD_NUMBER = 4; + private volatile java.lang.Object voiceId_; + /** + *
+     *语音地址ID
+     * 
+ * + * string voiceId = 4; + */ + public java.lang.String getVoiceId() { + java.lang.Object ref = voiceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + voiceId_ = s; + return s; + } + } + /** + *
+     *语音地址ID
+     * 
+ * + * string voiceId = 4; + */ + public com.google.protobuf.ByteString + getVoiceIdBytes() { + java.lang.Object ref = voiceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + voiceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 7; + private long time_; + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteFriendId_); + } + if (!getVoiceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, voiceId_); + } + if (time_ != 0L) { + output.writeInt64(7, time_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteFriendId_); + } + if (!getVoiceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, voiceId_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, time_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.MsgVoice)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.MsgVoice other = (com.akaxin.proto.core.CoreProto.MsgVoice) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && getVoiceId() + .equals(other.getVoiceId()); + result = result && (getTime() + == other.getTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (37 * hash) + VOICEID_FIELD_NUMBER; + hash = (53 * hash) + getVoiceId().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.MsgVoice parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgVoice parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgVoice parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgVoice parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgVoice parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgVoice parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgVoice parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgVoice parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgVoice parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgVoice parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgVoice parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgVoice parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.MsgVoice prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *普通语音消息
+     * 
+ * + * Protobuf type {@code core.MsgVoice} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.MsgVoice) + com.akaxin.proto.core.CoreProto.MsgVoiceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgVoice_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgVoice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.MsgVoice.class, com.akaxin.proto.core.CoreProto.MsgVoice.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.MsgVoice.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteFriendId_ = ""; + + voiceId_ = ""; + + time_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgVoice_descriptor; + } + + public com.akaxin.proto.core.CoreProto.MsgVoice getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.MsgVoice.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.MsgVoice build() { + com.akaxin.proto.core.CoreProto.MsgVoice result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.MsgVoice buildPartial() { + com.akaxin.proto.core.CoreProto.MsgVoice result = new com.akaxin.proto.core.CoreProto.MsgVoice(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteFriendId_ = siteFriendId_; + result.voiceId_ = voiceId_; + result.time_ = time_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.MsgVoice) { + return mergeFrom((com.akaxin.proto.core.CoreProto.MsgVoice)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.MsgVoice other) { + if (other == com.akaxin.proto.core.CoreProto.MsgVoice.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + if (!other.getVoiceId().isEmpty()) { + voiceId_ = other.voiceId_; + onChanged(); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.MsgVoice parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.MsgVoice) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_friend_id = 3; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + * string site_friend_id = 3; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + * string site_friend_id = 3; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + + private java.lang.Object voiceId_ = ""; + /** + *
+       *语音地址ID
+       * 
+ * + * string voiceId = 4; + */ + public java.lang.String getVoiceId() { + java.lang.Object ref = voiceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + voiceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *语音地址ID
+       * 
+ * + * string voiceId = 4; + */ + public com.google.protobuf.ByteString + getVoiceIdBytes() { + java.lang.Object ref = voiceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + voiceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *语音地址ID
+       * 
+ * + * string voiceId = 4; + */ + public Builder setVoiceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + voiceId_ = value; + onChanged(); + return this; + } + /** + *
+       *语音地址ID
+       * 
+ * + * string voiceId = 4; + */ + public Builder clearVoiceId() { + + voiceId_ = getDefaultInstance().getVoiceId(); + onChanged(); + return this; + } + /** + *
+       *语音地址ID
+       * 
+ * + * string voiceId = 4; + */ + public Builder setVoiceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + voiceId_ = value; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.MsgVoice) + } + + // @@protoc_insertion_point(class_scope:core.MsgVoice) + private static final com.akaxin.proto.core.CoreProto.MsgVoice DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.MsgVoice(); + } + + public static com.akaxin.proto.core.CoreProto.MsgVoice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MsgVoice parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MsgVoice(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.MsgVoice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MsgSecretVoiceOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.MsgSecretVoice) + com.google.protobuf.MessageOrBuilder { + + /** + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + * string site_friend_id = 3; + */ + java.lang.String getSiteFriendId(); + /** + * string site_friend_id = 3; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + + /** + * string voiceId = 4; + */ + java.lang.String getVoiceId(); + /** + * string voiceId = 4; + */ + com.google.protobuf.ByteString + getVoiceIdBytes(); + + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + java.lang.String getBase64TsKey(); + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + com.google.protobuf.ByteString + getBase64TsKeyBytes(); + + /** + * string to_device_id = 6; + */ + java.lang.String getToDeviceId(); + /** + * string to_device_id = 6; + */ + com.google.protobuf.ByteString + getToDeviceIdBytes(); + + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + long getTime(); + } + /** + *
+   *加密语音消息
+   * 
+ * + * Protobuf type {@code core.MsgSecretVoice} + */ + public static final class MsgSecretVoice extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.MsgSecretVoice) + MsgSecretVoiceOrBuilder { + private static final long serialVersionUID = 0L; + // Use MsgSecretVoice.newBuilder() to construct. + private MsgSecretVoice(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MsgSecretVoice() { + msgId_ = ""; + siteUserId_ = ""; + siteFriendId_ = ""; + voiceId_ = ""; + base64TsKey_ = ""; + toDeviceId_ = ""; + time_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MsgSecretVoice( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + voiceId_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + base64TsKey_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + toDeviceId_ = s; + break; + } + case 56: { + + time_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgSecretVoice_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgSecretVoice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.MsgSecretVoice.class, com.akaxin.proto.core.CoreProto.MsgSecretVoice.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteFriendId_; + /** + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VOICEID_FIELD_NUMBER = 4; + private volatile java.lang.Object voiceId_; + /** + * string voiceId = 4; + */ + public java.lang.String getVoiceId() { + java.lang.Object ref = voiceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + voiceId_ = s; + return s; + } + } + /** + * string voiceId = 4; + */ + public com.google.protobuf.ByteString + getVoiceIdBytes() { + java.lang.Object ref = voiceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + voiceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE64_TS_KEY_FIELD_NUMBER = 5; + private volatile java.lang.Object base64TsKey_; + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + public java.lang.String getBase64TsKey() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64TsKey_ = s; + return s; + } + } + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + public com.google.protobuf.ByteString + getBase64TsKeyBytes() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64TsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TO_DEVICE_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object toDeviceId_; + /** + * string to_device_id = 6; + */ + public java.lang.String getToDeviceId() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + toDeviceId_ = s; + return s; + } + } + /** + * string to_device_id = 6; + */ + public com.google.protobuf.ByteString + getToDeviceIdBytes() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + toDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 7; + private long time_; + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteFriendId_); + } + if (!getVoiceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, voiceId_); + } + if (!getBase64TsKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, base64TsKey_); + } + if (!getToDeviceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, toDeviceId_); + } + if (time_ != 0L) { + output.writeInt64(7, time_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteFriendId_); + } + if (!getVoiceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, voiceId_); + } + if (!getBase64TsKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, base64TsKey_); + } + if (!getToDeviceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, toDeviceId_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, time_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.MsgSecretVoice)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.MsgSecretVoice other = (com.akaxin.proto.core.CoreProto.MsgSecretVoice) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && getVoiceId() + .equals(other.getVoiceId()); + result = result && getBase64TsKey() + .equals(other.getBase64TsKey()); + result = result && getToDeviceId() + .equals(other.getToDeviceId()); + result = result && (getTime() + == other.getTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (37 * hash) + VOICEID_FIELD_NUMBER; + hash = (53 * hash) + getVoiceId().hashCode(); + hash = (37 * hash) + BASE64_TS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getBase64TsKey().hashCode(); + hash = (37 * hash) + TO_DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getToDeviceId().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.MsgSecretVoice parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretVoice parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretVoice parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretVoice parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretVoice parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretVoice parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretVoice parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretVoice parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretVoice parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretVoice parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretVoice parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.MsgSecretVoice parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.MsgSecretVoice prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *加密语音消息
+     * 
+ * + * Protobuf type {@code core.MsgSecretVoice} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.MsgSecretVoice) + com.akaxin.proto.core.CoreProto.MsgSecretVoiceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgSecretVoice_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgSecretVoice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.MsgSecretVoice.class, com.akaxin.proto.core.CoreProto.MsgSecretVoice.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.MsgSecretVoice.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteFriendId_ = ""; + + voiceId_ = ""; + + base64TsKey_ = ""; + + toDeviceId_ = ""; + + time_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_MsgSecretVoice_descriptor; + } + + public com.akaxin.proto.core.CoreProto.MsgSecretVoice getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.MsgSecretVoice.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.MsgSecretVoice build() { + com.akaxin.proto.core.CoreProto.MsgSecretVoice result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.MsgSecretVoice buildPartial() { + com.akaxin.proto.core.CoreProto.MsgSecretVoice result = new com.akaxin.proto.core.CoreProto.MsgSecretVoice(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteFriendId_ = siteFriendId_; + result.voiceId_ = voiceId_; + result.base64TsKey_ = base64TsKey_; + result.toDeviceId_ = toDeviceId_; + result.time_ = time_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.MsgSecretVoice) { + return mergeFrom((com.akaxin.proto.core.CoreProto.MsgSecretVoice)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.MsgSecretVoice other) { + if (other == com.akaxin.proto.core.CoreProto.MsgSecretVoice.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + if (!other.getVoiceId().isEmpty()) { + voiceId_ = other.voiceId_; + onChanged(); + } + if (!other.getBase64TsKey().isEmpty()) { + base64TsKey_ = other.base64TsKey_; + onChanged(); + } + if (!other.getToDeviceId().isEmpty()) { + toDeviceId_ = other.toDeviceId_; + onChanged(); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.MsgSecretVoice parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.MsgSecretVoice) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_friend_id = 3; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + * string site_friend_id = 3; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + * string site_friend_id = 3; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + + private java.lang.Object voiceId_ = ""; + /** + * string voiceId = 4; + */ + public java.lang.String getVoiceId() { + java.lang.Object ref = voiceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + voiceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string voiceId = 4; + */ + public com.google.protobuf.ByteString + getVoiceIdBytes() { + java.lang.Object ref = voiceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + voiceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string voiceId = 4; + */ + public Builder setVoiceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + voiceId_ = value; + onChanged(); + return this; + } + /** + * string voiceId = 4; + */ + public Builder clearVoiceId() { + + voiceId_ = getDefaultInstance().getVoiceId(); + onChanged(); + return this; + } + /** + * string voiceId = 4; + */ + public Builder setVoiceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + voiceId_ = value; + onChanged(); + return this; + } + + private java.lang.Object base64TsKey_ = ""; + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public java.lang.String getBase64TsKey() { + java.lang.Object ref = base64TsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64TsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public com.google.protobuf.ByteString + getBase64TsKeyBytes() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64TsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public Builder setBase64TsKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + base64TsKey_ = value; + onChanged(); + return this; + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public Builder clearBase64TsKey() { + + base64TsKey_ = getDefaultInstance().getBase64TsKey(); + onChanged(); + return this; + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public Builder setBase64TsKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + base64TsKey_ = value; + onChanged(); + return this; + } + + private java.lang.Object toDeviceId_ = ""; + /** + * string to_device_id = 6; + */ + public java.lang.String getToDeviceId() { + java.lang.Object ref = toDeviceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + toDeviceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string to_device_id = 6; + */ + public com.google.protobuf.ByteString + getToDeviceIdBytes() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + toDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string to_device_id = 6; + */ + public Builder setToDeviceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + toDeviceId_ = value; + onChanged(); + return this; + } + /** + * string to_device_id = 6; + */ + public Builder clearToDeviceId() { + + toDeviceId_ = getDefaultInstance().getToDeviceId(); + onChanged(); + return this; + } + /** + * string to_device_id = 6; + */ + public Builder setToDeviceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + toDeviceId_ = value; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.MsgSecretVoice) + } + + // @@protoc_insertion_point(class_scope:core.MsgSecretVoice) + private static final com.akaxin.proto.core.CoreProto.MsgSecretVoice DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.MsgSecretVoice(); + } + + public static com.akaxin.proto.core.CoreProto.MsgSecretVoice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MsgSecretVoice parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MsgSecretVoice(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.MsgSecretVoice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GroupVoiceOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.GroupVoice) + com.google.protobuf.MessageOrBuilder { + + /** + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + * string site_group_id = 3; + */ + java.lang.String getSiteGroupId(); + /** + * string site_group_id = 3; + */ + com.google.protobuf.ByteString + getSiteGroupIdBytes(); + + /** + *
+     *语音地址ID
+     * 
+ * + * string voiceId = 4; + */ + java.lang.String getVoiceId(); + /** + *
+     *语音地址ID
+     * 
+ * + * string voiceId = 4; + */ + com.google.protobuf.ByteString + getVoiceIdBytes(); + + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + long getTime(); + } + /** + *
+   *群语音消息
+   * 
+ * + * Protobuf type {@code core.GroupVoice} + */ + public static final class GroupVoice extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.GroupVoice) + GroupVoiceOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupVoice.newBuilder() to construct. + private GroupVoice(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GroupVoice() { + msgId_ = ""; + siteUserId_ = ""; + siteGroupId_ = ""; + voiceId_ = ""; + time_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GroupVoice( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteGroupId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + voiceId_ = s; + break; + } + case 56: { + + time_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupVoice_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupVoice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupVoice.class, com.akaxin.proto.core.CoreProto.GroupVoice.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_GROUP_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteGroupId_; + /** + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } + } + /** + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VOICEID_FIELD_NUMBER = 4; + private volatile java.lang.Object voiceId_; + /** + *
+     *语音地址ID
+     * 
+ * + * string voiceId = 4; + */ + public java.lang.String getVoiceId() { + java.lang.Object ref = voiceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + voiceId_ = s; + return s; + } + } + /** + *
+     *语音地址ID
+     * 
+ * + * string voiceId = 4; + */ + public com.google.protobuf.ByteString + getVoiceIdBytes() { + java.lang.Object ref = voiceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + voiceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 7; + private long time_; + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteGroupId_); + } + if (!getVoiceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, voiceId_); + } + if (time_ != 0L) { + output.writeInt64(7, time_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteGroupId_); + } + if (!getVoiceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, voiceId_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, time_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.GroupVoice)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.GroupVoice other = (com.akaxin.proto.core.CoreProto.GroupVoice) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteGroupId() + .equals(other.getSiteGroupId()); + result = result && getVoiceId() + .equals(other.getVoiceId()); + result = result && (getTime() + == other.getTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteGroupId().hashCode(); + hash = (37 * hash) + VOICEID_FIELD_NUMBER; + hash = (53 * hash) + getVoiceId().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.GroupVoice parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupVoice parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupVoice parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupVoice parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupVoice parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupVoice parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupVoice parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupVoice parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupVoice parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupVoice parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupVoice parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupVoice parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.GroupVoice prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *群语音消息
+     * 
+ * + * Protobuf type {@code core.GroupVoice} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.GroupVoice) + com.akaxin.proto.core.CoreProto.GroupVoiceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupVoice_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupVoice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupVoice.class, com.akaxin.proto.core.CoreProto.GroupVoice.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.GroupVoice.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteGroupId_ = ""; + + voiceId_ = ""; + + time_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupVoice_descriptor; + } + + public com.akaxin.proto.core.CoreProto.GroupVoice getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.GroupVoice.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.GroupVoice build() { + com.akaxin.proto.core.CoreProto.GroupVoice result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.GroupVoice buildPartial() { + com.akaxin.proto.core.CoreProto.GroupVoice result = new com.akaxin.proto.core.CoreProto.GroupVoice(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteGroupId_ = siteGroupId_; + result.voiceId_ = voiceId_; + result.time_ = time_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.GroupVoice) { + return mergeFrom((com.akaxin.proto.core.CoreProto.GroupVoice)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.GroupVoice other) { + if (other == com.akaxin.proto.core.CoreProto.GroupVoice.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteGroupId().isEmpty()) { + siteGroupId_ = other.siteGroupId_; + onChanged(); + } + if (!other.getVoiceId().isEmpty()) { + voiceId_ = other.voiceId_; + onChanged(); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.GroupVoice parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.GroupVoice) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteGroupId_ = ""; + /** + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_group_id = 3; + */ + public Builder setSiteGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteGroupId_ = value; + onChanged(); + return this; + } + /** + * string site_group_id = 3; + */ + public Builder clearSiteGroupId() { + + siteGroupId_ = getDefaultInstance().getSiteGroupId(); + onChanged(); + return this; + } + /** + * string site_group_id = 3; + */ + public Builder setSiteGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteGroupId_ = value; + onChanged(); + return this; + } + + private java.lang.Object voiceId_ = ""; + /** + *
+       *语音地址ID
+       * 
+ * + * string voiceId = 4; + */ + public java.lang.String getVoiceId() { + java.lang.Object ref = voiceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + voiceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *语音地址ID
+       * 
+ * + * string voiceId = 4; + */ + public com.google.protobuf.ByteString + getVoiceIdBytes() { + java.lang.Object ref = voiceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + voiceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *语音地址ID
+       * 
+ * + * string voiceId = 4; + */ + public Builder setVoiceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + voiceId_ = value; + onChanged(); + return this; + } + /** + *
+       *语音地址ID
+       * 
+ * + * string voiceId = 4; + */ + public Builder clearVoiceId() { + + voiceId_ = getDefaultInstance().getVoiceId(); + onChanged(); + return this; + } + /** + *
+       *语音地址ID
+       * 
+ * + * string voiceId = 4; + */ + public Builder setVoiceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + voiceId_ = value; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.GroupVoice) + } + + // @@protoc_insertion_point(class_scope:core.GroupVoice) + private static final com.akaxin.proto.core.CoreProto.GroupVoice DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.GroupVoice(); + } + + public static com.akaxin.proto.core.CoreProto.GroupVoice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GroupVoice parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GroupVoice(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.GroupVoice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GroupSecretVoiceOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.GroupSecretVoice) + com.google.protobuf.MessageOrBuilder { + + /** + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + * string site_group_id = 3; + */ + java.lang.String getSiteGroupId(); + /** + * string site_group_id = 3; + */ + com.google.protobuf.ByteString + getSiteGroupIdBytes(); + + /** + * string voiceId = 4; + */ + java.lang.String getVoiceId(); + /** + * string voiceId = 4; + */ + com.google.protobuf.ByteString + getVoiceIdBytes(); + + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + java.lang.String getBase64TsKey(); + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + com.google.protobuf.ByteString + getBase64TsKeyBytes(); + + /** + *
+     *接受者的设备ID
+     * 
+ * + * string to_device_id = 6; + */ + java.lang.String getToDeviceId(); + /** + *
+     *接受者的设备ID
+     * 
+ * + * string to_device_id = 6; + */ + com.google.protobuf.ByteString + getToDeviceIdBytes(); + + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + long getTime(); + } + /** + *
+   *群语音加密消息
+   * 
+ * + * Protobuf type {@code core.GroupSecretVoice} + */ + public static final class GroupSecretVoice extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.GroupSecretVoice) + GroupSecretVoiceOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupSecretVoice.newBuilder() to construct. + private GroupSecretVoice(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GroupSecretVoice() { + msgId_ = ""; + siteUserId_ = ""; + siteGroupId_ = ""; + voiceId_ = ""; + base64TsKey_ = ""; + toDeviceId_ = ""; + time_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GroupSecretVoice( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteGroupId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + voiceId_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + base64TsKey_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + toDeviceId_ = s; + break; + } + case 56: { + + time_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretVoice_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretVoice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupSecretVoice.class, com.akaxin.proto.core.CoreProto.GroupSecretVoice.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_GROUP_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteGroupId_; + /** + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } + } + /** + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VOICEID_FIELD_NUMBER = 4; + private volatile java.lang.Object voiceId_; + /** + * string voiceId = 4; + */ + public java.lang.String getVoiceId() { + java.lang.Object ref = voiceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + voiceId_ = s; + return s; + } + } + /** + * string voiceId = 4; + */ + public com.google.protobuf.ByteString + getVoiceIdBytes() { + java.lang.Object ref = voiceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + voiceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE64_TS_KEY_FIELD_NUMBER = 5; + private volatile java.lang.Object base64TsKey_; + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + public java.lang.String getBase64TsKey() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64TsKey_ = s; + return s; + } + } + /** + *
+     *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+     * 
+ * + * string base64_ts_key = 5; + */ + public com.google.protobuf.ByteString + getBase64TsKeyBytes() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64TsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TO_DEVICE_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object toDeviceId_; + /** + *
+     *接受者的设备ID
+     * 
+ * + * string to_device_id = 6; + */ + public java.lang.String getToDeviceId() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + toDeviceId_ = s; + return s; + } + } + /** + *
+     *接受者的设备ID
+     * 
+ * + * string to_device_id = 6; + */ + public com.google.protobuf.ByteString + getToDeviceIdBytes() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + toDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 7; + private long time_; + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteGroupId_); + } + if (!getVoiceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, voiceId_); + } + if (!getBase64TsKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, base64TsKey_); + } + if (!getToDeviceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, toDeviceId_); + } + if (time_ != 0L) { + output.writeInt64(7, time_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteGroupId_); + } + if (!getVoiceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, voiceId_); + } + if (!getBase64TsKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, base64TsKey_); + } + if (!getToDeviceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, toDeviceId_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, time_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.GroupSecretVoice)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.GroupSecretVoice other = (com.akaxin.proto.core.CoreProto.GroupSecretVoice) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteGroupId() + .equals(other.getSiteGroupId()); + result = result && getVoiceId() + .equals(other.getVoiceId()); + result = result && getBase64TsKey() + .equals(other.getBase64TsKey()); + result = result && getToDeviceId() + .equals(other.getToDeviceId()); + result = result && (getTime() + == other.getTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteGroupId().hashCode(); + hash = (37 * hash) + VOICEID_FIELD_NUMBER; + hash = (53 * hash) + getVoiceId().hashCode(); + hash = (37 * hash) + BASE64_TS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getBase64TsKey().hashCode(); + hash = (37 * hash) + TO_DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getToDeviceId().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.GroupSecretVoice parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretVoice parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretVoice parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretVoice parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretVoice parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretVoice parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretVoice parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretVoice parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretVoice parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretVoice parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretVoice parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretVoice parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.GroupSecretVoice prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *群语音加密消息
+     * 
+ * + * Protobuf type {@code core.GroupSecretVoice} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.GroupSecretVoice) + com.akaxin.proto.core.CoreProto.GroupSecretVoiceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretVoice_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretVoice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupSecretVoice.class, com.akaxin.proto.core.CoreProto.GroupSecretVoice.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.GroupSecretVoice.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteGroupId_ = ""; + + voiceId_ = ""; + + base64TsKey_ = ""; + + toDeviceId_ = ""; + + time_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretVoice_descriptor; + } + + public com.akaxin.proto.core.CoreProto.GroupSecretVoice getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.GroupSecretVoice.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.GroupSecretVoice build() { + com.akaxin.proto.core.CoreProto.GroupSecretVoice result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.GroupSecretVoice buildPartial() { + com.akaxin.proto.core.CoreProto.GroupSecretVoice result = new com.akaxin.proto.core.CoreProto.GroupSecretVoice(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteGroupId_ = siteGroupId_; + result.voiceId_ = voiceId_; + result.base64TsKey_ = base64TsKey_; + result.toDeviceId_ = toDeviceId_; + result.time_ = time_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.GroupSecretVoice) { + return mergeFrom((com.akaxin.proto.core.CoreProto.GroupSecretVoice)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.GroupSecretVoice other) { + if (other == com.akaxin.proto.core.CoreProto.GroupSecretVoice.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteGroupId().isEmpty()) { + siteGroupId_ = other.siteGroupId_; + onChanged(); + } + if (!other.getVoiceId().isEmpty()) { + voiceId_ = other.voiceId_; + onChanged(); + } + if (!other.getBase64TsKey().isEmpty()) { + base64TsKey_ = other.base64TsKey_; + onChanged(); + } + if (!other.getToDeviceId().isEmpty()) { + toDeviceId_ = other.toDeviceId_; + onChanged(); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.GroupSecretVoice parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.GroupSecretVoice) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteGroupId_ = ""; + /** + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_group_id = 3; + */ + public Builder setSiteGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteGroupId_ = value; + onChanged(); + return this; + } + /** + * string site_group_id = 3; + */ + public Builder clearSiteGroupId() { + + siteGroupId_ = getDefaultInstance().getSiteGroupId(); + onChanged(); + return this; + } + /** + * string site_group_id = 3; + */ + public Builder setSiteGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteGroupId_ = value; + onChanged(); + return this; + } + + private java.lang.Object voiceId_ = ""; + /** + * string voiceId = 4; + */ + public java.lang.String getVoiceId() { + java.lang.Object ref = voiceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + voiceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string voiceId = 4; + */ + public com.google.protobuf.ByteString + getVoiceIdBytes() { + java.lang.Object ref = voiceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + voiceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string voiceId = 4; + */ + public Builder setVoiceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + voiceId_ = value; + onChanged(); + return this; + } + /** + * string voiceId = 4; + */ + public Builder clearVoiceId() { + + voiceId_ = getDefaultInstance().getVoiceId(); + onChanged(); + return this; + } + /** + * string voiceId = 4; + */ + public Builder setVoiceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + voiceId_ = value; + onChanged(); + return this; + } + + private java.lang.Object base64TsKey_ = ""; + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public java.lang.String getBase64TsKey() { + java.lang.Object ref = base64TsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64TsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public com.google.protobuf.ByteString + getBase64TsKeyBytes() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64TsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public Builder setBase64TsKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + base64TsKey_ = value; + onChanged(); + return this; + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public Builder clearBase64TsKey() { + + base64TsKey_ = getDefaultInstance().getBase64TsKey(); + onChanged(); + return this; + } + /** + *
+       *加密key,值为aes密钥(原始bytes base64encode后的字符串)
+       * 
+ * + * string base64_ts_key = 5; + */ + public Builder setBase64TsKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + base64TsKey_ = value; + onChanged(); + return this; + } + + private java.lang.Object toDeviceId_ = ""; + /** + *
+       *接受者的设备ID
+       * 
+ * + * string to_device_id = 6; + */ + public java.lang.String getToDeviceId() { + java.lang.Object ref = toDeviceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + toDeviceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *接受者的设备ID
+       * 
+ * + * string to_device_id = 6; + */ + public com.google.protobuf.ByteString + getToDeviceIdBytes() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + toDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *接受者的设备ID
+       * 
+ * + * string to_device_id = 6; + */ + public Builder setToDeviceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + toDeviceId_ = value; + onChanged(); + return this; + } + /** + *
+       *接受者的设备ID
+       * 
+ * + * string to_device_id = 6; + */ + public Builder clearToDeviceId() { + + toDeviceId_ = getDefaultInstance().getToDeviceId(); + onChanged(); + return this; + } + /** + *
+       *接受者的设备ID
+       * 
+ * + * string to_device_id = 6; + */ + public Builder setToDeviceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + toDeviceId_ = value; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 7; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.GroupSecretVoice) + } + + // @@protoc_insertion_point(class_scope:core.GroupSecretVoice) + private static final com.akaxin.proto.core.CoreProto.GroupSecretVoice DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.GroupSecretVoice(); + } + + public static com.akaxin.proto.core.CoreProto.GroupSecretVoice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GroupSecretVoice parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GroupSecretVoice(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.GroupSecretVoice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface U2MapOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.U2Map) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *to
+     * 
+ * + * string site_friend_id = 3; + */ + java.lang.String getSiteFriendId(); + /** + *
+     *to
+     * 
+ * + * string site_friend_id = 3; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + + /** + *
+     *经度
+     * 
+ * + * string lng = 4; + */ + java.lang.String getLng(); + /** + *
+     *经度
+     * 
+ * + * string lng = 4; + */ + com.google.protobuf.ByteString + getLngBytes(); + + /** + *
+     *纬度
+     * 
+ * + * string lat = 5; + */ + java.lang.String getLat(); + /** + *
+     *纬度
+     * 
+ * + * string lat = 5; + */ + com.google.protobuf.ByteString + getLatBytes(); + + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 6; + */ + long getTime(); + } + /** + *
+   *普通地理位置消息
+   * 
+ * + * Protobuf type {@code core.U2Map} + */ + public static final class U2Map extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.U2Map) + U2MapOrBuilder { + private static final long serialVersionUID = 0L; + // Use U2Map.newBuilder() to construct. + private U2Map(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private U2Map() { + msgId_ = ""; + siteUserId_ = ""; + siteFriendId_ = ""; + lng_ = ""; + lat_ = ""; + time_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private U2Map( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + lng_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + lat_ = s; + break; + } + case 48: { + + time_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2Map_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2Map_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.U2Map.class, com.akaxin.proto.core.CoreProto.U2Map.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteFriendId_; + /** + *
+     *to
+     * 
+ * + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + *
+     *to
+     * 
+ * + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LNG_FIELD_NUMBER = 4; + private volatile java.lang.Object lng_; + /** + *
+     *经度
+     * 
+ * + * string lng = 4; + */ + public java.lang.String getLng() { + java.lang.Object ref = lng_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lng_ = s; + return s; + } + } + /** + *
+     *经度
+     * 
+ * + * string lng = 4; + */ + public com.google.protobuf.ByteString + getLngBytes() { + java.lang.Object ref = lng_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + lng_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAT_FIELD_NUMBER = 5; + private volatile java.lang.Object lat_; + /** + *
+     *纬度
+     * 
+ * + * string lat = 5; + */ + public java.lang.String getLat() { + java.lang.Object ref = lat_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lat_ = s; + return s; + } + } + /** + *
+     *纬度
+     * 
+ * + * string lat = 5; + */ + public com.google.protobuf.ByteString + getLatBytes() { + java.lang.Object ref = lat_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + lat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 6; + private long time_; + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 6; + */ + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteFriendId_); + } + if (!getLngBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, lng_); + } + if (!getLatBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, lat_); + } + if (time_ != 0L) { + output.writeInt64(6, time_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteFriendId_); + } + if (!getLngBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, lng_); + } + if (!getLatBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, lat_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, time_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.U2Map)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.U2Map other = (com.akaxin.proto.core.CoreProto.U2Map) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && getLng() + .equals(other.getLng()); + result = result && getLat() + .equals(other.getLat()); + result = result && (getTime() + == other.getTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (37 * hash) + LNG_FIELD_NUMBER; + hash = (53 * hash) + getLng().hashCode(); + hash = (37 * hash) + LAT_FIELD_NUMBER; + hash = (53 * hash) + getLat().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.U2Map parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.U2Map parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2Map parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.U2Map parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2Map parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.U2Map parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2Map parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.U2Map parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2Map parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.U2Map parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2Map parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.U2Map parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.U2Map prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *普通地理位置消息
+     * 
+ * + * Protobuf type {@code core.U2Map} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.U2Map) + com.akaxin.proto.core.CoreProto.U2MapOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2Map_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2Map_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.U2Map.class, com.akaxin.proto.core.CoreProto.U2Map.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.U2Map.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteFriendId_ = ""; + + lng_ = ""; + + lat_ = ""; + + time_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2Map_descriptor; + } + + public com.akaxin.proto.core.CoreProto.U2Map getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.U2Map.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.U2Map build() { + com.akaxin.proto.core.CoreProto.U2Map result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.U2Map buildPartial() { + com.akaxin.proto.core.CoreProto.U2Map result = new com.akaxin.proto.core.CoreProto.U2Map(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteFriendId_ = siteFriendId_; + result.lng_ = lng_; + result.lat_ = lat_; + result.time_ = time_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.U2Map) { + return mergeFrom((com.akaxin.proto.core.CoreProto.U2Map)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.U2Map other) { + if (other == com.akaxin.proto.core.CoreProto.U2Map.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + if (!other.getLng().isEmpty()) { + lng_ = other.lng_; + onChanged(); + } + if (!other.getLat().isEmpty()) { + lat_ = other.lat_; + onChanged(); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.U2Map parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.U2Map) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + + private java.lang.Object lng_ = ""; + /** + *
+       *经度
+       * 
+ * + * string lng = 4; + */ + public java.lang.String getLng() { + java.lang.Object ref = lng_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lng_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *经度
+       * 
+ * + * string lng = 4; + */ + public com.google.protobuf.ByteString + getLngBytes() { + java.lang.Object ref = lng_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + lng_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *经度
+       * 
+ * + * string lng = 4; + */ + public Builder setLng( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + lng_ = value; + onChanged(); + return this; + } + /** + *
+       *经度
+       * 
+ * + * string lng = 4; + */ + public Builder clearLng() { + + lng_ = getDefaultInstance().getLng(); + onChanged(); + return this; + } + /** + *
+       *经度
+       * 
+ * + * string lng = 4; + */ + public Builder setLngBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + lng_ = value; + onChanged(); + return this; + } + + private java.lang.Object lat_ = ""; + /** + *
+       *纬度
+       * 
+ * + * string lat = 5; + */ + public java.lang.String getLat() { + java.lang.Object ref = lat_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lat_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *纬度
+       * 
+ * + * string lat = 5; + */ + public com.google.protobuf.ByteString + getLatBytes() { + java.lang.Object ref = lat_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + lat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *纬度
+       * 
+ * + * string lat = 5; + */ + public Builder setLat( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + lat_ = value; + onChanged(); + return this; + } + /** + *
+       *纬度
+       * 
+ * + * string lat = 5; + */ + public Builder clearLat() { + + lat_ = getDefaultInstance().getLat(); + onChanged(); + return this; + } + /** + *
+       *纬度
+       * 
+ * + * string lat = 5; + */ + public Builder setLatBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + lat_ = value; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 6; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 6; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 6; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.U2Map) + } + + // @@protoc_insertion_point(class_scope:core.U2Map) + private static final com.akaxin.proto.core.CoreProto.U2Map DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.U2Map(); + } + + public static com.akaxin.proto.core.CoreProto.U2Map getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public U2Map parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new U2Map(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.U2Map getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface U2SecretMapOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.U2SecretMap) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *to
+     * 
+ * + * string site_friend_id = 3; + */ + java.lang.String getSiteFriendId(); + /** + *
+     *to
+     * 
+ * + * string site_friend_id = 3; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + + /** + *
+     *加密Base64经度
+     * 
+ * + * string base64_lng = 4; + */ + java.lang.String getBase64Lng(); + /** + *
+     *加密Base64经度
+     * 
+ * + * string base64_lng = 4; + */ + com.google.protobuf.ByteString + getBase64LngBytes(); + + /** + *
+     *加密Base64纬度
+     * 
+ * + * string base64_lat = 5; + */ + java.lang.String getBase64Lat(); + /** + *
+     *加密Base64纬度
+     * 
+ * + * string base64_lat = 5; + */ + com.google.protobuf.ByteString + getBase64LatBytes(); + + /** + *
+     *Base64的加密key,用于AES加密使用
+     * 
+ * + * string base64_ts_key = 6; + */ + java.lang.String getBase64TsKey(); + /** + *
+     *Base64的加密key,用于AES加密使用
+     * 
+ * + * string base64_ts_key = 6; + */ + com.google.protobuf.ByteString + getBase64TsKeyBytes(); + + /** + *
+     *接受者的设备ID
+     * 
+ * + * string to_device_id = 7; + */ + java.lang.String getToDeviceId(); + /** + *
+     *接受者的设备ID
+     * 
+ * + * string to_device_id = 7; + */ + com.google.protobuf.ByteString + getToDeviceIdBytes(); + + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 8; + */ + long getTime(); + } + /** + *
+   *加密地理位置消息
+   * 
+ * + * Protobuf type {@code core.U2SecretMap} + */ + public static final class U2SecretMap extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.U2SecretMap) + U2SecretMapOrBuilder { + private static final long serialVersionUID = 0L; + // Use U2SecretMap.newBuilder() to construct. + private U2SecretMap(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private U2SecretMap() { + msgId_ = ""; + siteUserId_ = ""; + siteFriendId_ = ""; + base64Lng_ = ""; + base64Lat_ = ""; + base64TsKey_ = ""; + toDeviceId_ = ""; + time_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private U2SecretMap( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + base64Lng_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + base64Lat_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + base64TsKey_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + toDeviceId_ = s; + break; + } + case 64: { + + time_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2SecretMap_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2SecretMap_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.U2SecretMap.class, com.akaxin.proto.core.CoreProto.U2SecretMap.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteFriendId_; + /** + *
+     *to
+     * 
+ * + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + *
+     *to
+     * 
+ * + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE64_LNG_FIELD_NUMBER = 4; + private volatile java.lang.Object base64Lng_; + /** + *
+     *加密Base64经度
+     * 
+ * + * string base64_lng = 4; + */ + public java.lang.String getBase64Lng() { + java.lang.Object ref = base64Lng_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64Lng_ = s; + return s; + } + } + /** + *
+     *加密Base64经度
+     * 
+ * + * string base64_lng = 4; + */ + public com.google.protobuf.ByteString + getBase64LngBytes() { + java.lang.Object ref = base64Lng_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64Lng_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE64_LAT_FIELD_NUMBER = 5; + private volatile java.lang.Object base64Lat_; + /** + *
+     *加密Base64纬度
+     * 
+ * + * string base64_lat = 5; + */ + public java.lang.String getBase64Lat() { + java.lang.Object ref = base64Lat_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64Lat_ = s; + return s; + } + } + /** + *
+     *加密Base64纬度
+     * 
+ * + * string base64_lat = 5; + */ + public com.google.protobuf.ByteString + getBase64LatBytes() { + java.lang.Object ref = base64Lat_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64Lat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE64_TS_KEY_FIELD_NUMBER = 6; + private volatile java.lang.Object base64TsKey_; + /** + *
+     *Base64的加密key,用于AES加密使用
+     * 
+ * + * string base64_ts_key = 6; + */ + public java.lang.String getBase64TsKey() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64TsKey_ = s; + return s; + } + } + /** + *
+     *Base64的加密key,用于AES加密使用
+     * 
+ * + * string base64_ts_key = 6; + */ + public com.google.protobuf.ByteString + getBase64TsKeyBytes() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64TsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TO_DEVICE_ID_FIELD_NUMBER = 7; + private volatile java.lang.Object toDeviceId_; + /** + *
+     *接受者的设备ID
+     * 
+ * + * string to_device_id = 7; + */ + public java.lang.String getToDeviceId() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + toDeviceId_ = s; + return s; + } + } + /** + *
+     *接受者的设备ID
+     * 
+ * + * string to_device_id = 7; + */ + public com.google.protobuf.ByteString + getToDeviceIdBytes() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + toDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 8; + private long time_; + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 8; + */ + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteFriendId_); + } + if (!getBase64LngBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, base64Lng_); + } + if (!getBase64LatBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, base64Lat_); + } + if (!getBase64TsKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, base64TsKey_); + } + if (!getToDeviceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, toDeviceId_); + } + if (time_ != 0L) { + output.writeInt64(8, time_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteFriendId_); + } + if (!getBase64LngBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, base64Lng_); + } + if (!getBase64LatBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, base64Lat_); + } + if (!getBase64TsKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, base64TsKey_); + } + if (!getToDeviceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, toDeviceId_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(8, time_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.U2SecretMap)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.U2SecretMap other = (com.akaxin.proto.core.CoreProto.U2SecretMap) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && getBase64Lng() + .equals(other.getBase64Lng()); + result = result && getBase64Lat() + .equals(other.getBase64Lat()); + result = result && getBase64TsKey() + .equals(other.getBase64TsKey()); + result = result && getToDeviceId() + .equals(other.getToDeviceId()); + result = result && (getTime() + == other.getTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (37 * hash) + BASE64_LNG_FIELD_NUMBER; + hash = (53 * hash) + getBase64Lng().hashCode(); + hash = (37 * hash) + BASE64_LAT_FIELD_NUMBER; + hash = (53 * hash) + getBase64Lat().hashCode(); + hash = (37 * hash) + BASE64_TS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getBase64TsKey().hashCode(); + hash = (37 * hash) + TO_DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getToDeviceId().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.U2SecretMap parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.U2SecretMap parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2SecretMap parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.U2SecretMap parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2SecretMap parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.U2SecretMap parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2SecretMap parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.U2SecretMap parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2SecretMap parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.U2SecretMap parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2SecretMap parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.U2SecretMap parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.U2SecretMap prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *加密地理位置消息
+     * 
+ * + * Protobuf type {@code core.U2SecretMap} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.U2SecretMap) + com.akaxin.proto.core.CoreProto.U2SecretMapOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2SecretMap_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2SecretMap_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.U2SecretMap.class, com.akaxin.proto.core.CoreProto.U2SecretMap.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.U2SecretMap.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteFriendId_ = ""; + + base64Lng_ = ""; + + base64Lat_ = ""; + + base64TsKey_ = ""; + + toDeviceId_ = ""; + + time_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2SecretMap_descriptor; + } + + public com.akaxin.proto.core.CoreProto.U2SecretMap getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.U2SecretMap.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.U2SecretMap build() { + com.akaxin.proto.core.CoreProto.U2SecretMap result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.U2SecretMap buildPartial() { + com.akaxin.proto.core.CoreProto.U2SecretMap result = new com.akaxin.proto.core.CoreProto.U2SecretMap(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteFriendId_ = siteFriendId_; + result.base64Lng_ = base64Lng_; + result.base64Lat_ = base64Lat_; + result.base64TsKey_ = base64TsKey_; + result.toDeviceId_ = toDeviceId_; + result.time_ = time_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.U2SecretMap) { + return mergeFrom((com.akaxin.proto.core.CoreProto.U2SecretMap)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.U2SecretMap other) { + if (other == com.akaxin.proto.core.CoreProto.U2SecretMap.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + if (!other.getBase64Lng().isEmpty()) { + base64Lng_ = other.base64Lng_; + onChanged(); + } + if (!other.getBase64Lat().isEmpty()) { + base64Lat_ = other.base64Lat_; + onChanged(); + } + if (!other.getBase64TsKey().isEmpty()) { + base64TsKey_ = other.base64TsKey_; + onChanged(); + } + if (!other.getToDeviceId().isEmpty()) { + toDeviceId_ = other.toDeviceId_; + onChanged(); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.U2SecretMap parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.U2SecretMap) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + + private java.lang.Object base64Lng_ = ""; + /** + *
+       *加密Base64经度
+       * 
+ * + * string base64_lng = 4; + */ + public java.lang.String getBase64Lng() { + java.lang.Object ref = base64Lng_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64Lng_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *加密Base64经度
+       * 
+ * + * string base64_lng = 4; + */ + public com.google.protobuf.ByteString + getBase64LngBytes() { + java.lang.Object ref = base64Lng_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64Lng_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *加密Base64经度
+       * 
+ * + * string base64_lng = 4; + */ + public Builder setBase64Lng( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + base64Lng_ = value; + onChanged(); + return this; + } + /** + *
+       *加密Base64经度
+       * 
+ * + * string base64_lng = 4; + */ + public Builder clearBase64Lng() { + + base64Lng_ = getDefaultInstance().getBase64Lng(); + onChanged(); + return this; + } + /** + *
+       *加密Base64经度
+       * 
+ * + * string base64_lng = 4; + */ + public Builder setBase64LngBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + base64Lng_ = value; + onChanged(); + return this; + } + + private java.lang.Object base64Lat_ = ""; + /** + *
+       *加密Base64纬度
+       * 
+ * + * string base64_lat = 5; + */ + public java.lang.String getBase64Lat() { + java.lang.Object ref = base64Lat_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64Lat_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *加密Base64纬度
+       * 
+ * + * string base64_lat = 5; + */ + public com.google.protobuf.ByteString + getBase64LatBytes() { + java.lang.Object ref = base64Lat_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64Lat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *加密Base64纬度
+       * 
+ * + * string base64_lat = 5; + */ + public Builder setBase64Lat( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + base64Lat_ = value; + onChanged(); + return this; + } + /** + *
+       *加密Base64纬度
+       * 
+ * + * string base64_lat = 5; + */ + public Builder clearBase64Lat() { + + base64Lat_ = getDefaultInstance().getBase64Lat(); + onChanged(); + return this; + } + /** + *
+       *加密Base64纬度
+       * 
+ * + * string base64_lat = 5; + */ + public Builder setBase64LatBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + base64Lat_ = value; + onChanged(); + return this; + } + + private java.lang.Object base64TsKey_ = ""; + /** + *
+       *Base64的加密key,用于AES加密使用
+       * 
+ * + * string base64_ts_key = 6; + */ + public java.lang.String getBase64TsKey() { + java.lang.Object ref = base64TsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64TsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *Base64的加密key,用于AES加密使用
+       * 
+ * + * string base64_ts_key = 6; + */ + public com.google.protobuf.ByteString + getBase64TsKeyBytes() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64TsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *Base64的加密key,用于AES加密使用
+       * 
+ * + * string base64_ts_key = 6; + */ + public Builder setBase64TsKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + base64TsKey_ = value; + onChanged(); + return this; + } + /** + *
+       *Base64的加密key,用于AES加密使用
+       * 
+ * + * string base64_ts_key = 6; + */ + public Builder clearBase64TsKey() { + + base64TsKey_ = getDefaultInstance().getBase64TsKey(); + onChanged(); + return this; + } + /** + *
+       *Base64的加密key,用于AES加密使用
+       * 
+ * + * string base64_ts_key = 6; + */ + public Builder setBase64TsKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + base64TsKey_ = value; + onChanged(); + return this; + } + + private java.lang.Object toDeviceId_ = ""; + /** + *
+       *接受者的设备ID
+       * 
+ * + * string to_device_id = 7; + */ + public java.lang.String getToDeviceId() { + java.lang.Object ref = toDeviceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + toDeviceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *接受者的设备ID
+       * 
+ * + * string to_device_id = 7; + */ + public com.google.protobuf.ByteString + getToDeviceIdBytes() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + toDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *接受者的设备ID
+       * 
+ * + * string to_device_id = 7; + */ + public Builder setToDeviceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + toDeviceId_ = value; + onChanged(); + return this; + } + /** + *
+       *接受者的设备ID
+       * 
+ * + * string to_device_id = 7; + */ + public Builder clearToDeviceId() { + + toDeviceId_ = getDefaultInstance().getToDeviceId(); + onChanged(); + return this; + } + /** + *
+       *接受者的设备ID
+       * 
+ * + * string to_device_id = 7; + */ + public Builder setToDeviceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + toDeviceId_ = value; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 8; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 8; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 8; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.U2SecretMap) + } + + // @@protoc_insertion_point(class_scope:core.U2SecretMap) + private static final com.akaxin.proto.core.CoreProto.U2SecretMap DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.U2SecretMap(); + } + + public static com.akaxin.proto.core.CoreProto.U2SecretMap getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public U2SecretMap parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new U2SecretMap(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.U2SecretMap getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GroupMapOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.GroupMap) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *to(群id)
+     * 
+ * + * string site_group_id = 3; + */ + java.lang.String getSiteGroupId(); + /** + *
+     *to(群id)
+     * 
+ * + * string site_group_id = 3; + */ + com.google.protobuf.ByteString + getSiteGroupIdBytes(); + + /** + *
+     *经度
+     * 
+ * + * string lng = 4; + */ + java.lang.String getLng(); + /** + *
+     *经度
+     * 
+ * + * string lng = 4; + */ + com.google.protobuf.ByteString + getLngBytes(); + + /** + *
+     *纬度
+     * 
+ * + * string lat = 5; + */ + java.lang.String getLat(); + /** + *
+     *纬度
+     * 
+ * + * string lat = 5; + */ + com.google.protobuf.ByteString + getLatBytes(); + + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 6; + */ + long getTime(); + } + /** + *
+   *普通群地理位置消息
+   * 
+ * + * Protobuf type {@code core.GroupMap} + */ + public static final class GroupMap extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.GroupMap) + GroupMapOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupMap.newBuilder() to construct. + private GroupMap(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GroupMap() { + msgId_ = ""; + siteUserId_ = ""; + siteGroupId_ = ""; + lng_ = ""; + lat_ = ""; + time_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GroupMap( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteGroupId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + lng_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + lat_ = s; + break; + } + case 48: { + + time_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupMap_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupMap_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupMap.class, com.akaxin.proto.core.CoreProto.GroupMap.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_GROUP_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteGroupId_; + /** + *
+     *to(群id)
+     * 
+ * + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } + } + /** + *
+     *to(群id)
+     * 
+ * + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LNG_FIELD_NUMBER = 4; + private volatile java.lang.Object lng_; + /** + *
+     *经度
+     * 
+ * + * string lng = 4; + */ + public java.lang.String getLng() { + java.lang.Object ref = lng_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lng_ = s; + return s; + } + } + /** + *
+     *经度
+     * 
+ * + * string lng = 4; + */ + public com.google.protobuf.ByteString + getLngBytes() { + java.lang.Object ref = lng_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + lng_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAT_FIELD_NUMBER = 5; + private volatile java.lang.Object lat_; + /** + *
+     *纬度
+     * 
+ * + * string lat = 5; + */ + public java.lang.String getLat() { + java.lang.Object ref = lat_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lat_ = s; + return s; + } + } + /** + *
+     *纬度
+     * 
+ * + * string lat = 5; + */ + public com.google.protobuf.ByteString + getLatBytes() { + java.lang.Object ref = lat_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + lat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 6; + private long time_; + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 6; + */ + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteGroupId_); + } + if (!getLngBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, lng_); + } + if (!getLatBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, lat_); + } + if (time_ != 0L) { + output.writeInt64(6, time_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteGroupId_); + } + if (!getLngBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, lng_); + } + if (!getLatBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, lat_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, time_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.GroupMap)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.GroupMap other = (com.akaxin.proto.core.CoreProto.GroupMap) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteGroupId() + .equals(other.getSiteGroupId()); + result = result && getLng() + .equals(other.getLng()); + result = result && getLat() + .equals(other.getLat()); + result = result && (getTime() + == other.getTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteGroupId().hashCode(); + hash = (37 * hash) + LNG_FIELD_NUMBER; + hash = (53 * hash) + getLng().hashCode(); + hash = (37 * hash) + LAT_FIELD_NUMBER; + hash = (53 * hash) + getLat().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.GroupMap parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupMap parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupMap parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupMap parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupMap parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupMap parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupMap parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupMap parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupMap parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupMap parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupMap parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupMap parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.GroupMap prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *普通群地理位置消息
+     * 
+ * + * Protobuf type {@code core.GroupMap} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.GroupMap) + com.akaxin.proto.core.CoreProto.GroupMapOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupMap_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupMap_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupMap.class, com.akaxin.proto.core.CoreProto.GroupMap.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.GroupMap.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteGroupId_ = ""; + + lng_ = ""; + + lat_ = ""; + + time_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupMap_descriptor; + } + + public com.akaxin.proto.core.CoreProto.GroupMap getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.GroupMap.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.GroupMap build() { + com.akaxin.proto.core.CoreProto.GroupMap result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.GroupMap buildPartial() { + com.akaxin.proto.core.CoreProto.GroupMap result = new com.akaxin.proto.core.CoreProto.GroupMap(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteGroupId_ = siteGroupId_; + result.lng_ = lng_; + result.lat_ = lat_; + result.time_ = time_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.GroupMap) { + return mergeFrom((com.akaxin.proto.core.CoreProto.GroupMap)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.GroupMap other) { + if (other == com.akaxin.proto.core.CoreProto.GroupMap.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteGroupId().isEmpty()) { + siteGroupId_ = other.siteGroupId_; + onChanged(); + } + if (!other.getLng().isEmpty()) { + lng_ = other.lng_; + onChanged(); + } + if (!other.getLat().isEmpty()) { + lat_ = other.lat_; + onChanged(); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.GroupMap parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.GroupMap) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteGroupId_ = ""; + /** + *
+       *to(群id)
+       * 
+ * + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *to(群id)
+       * 
+ * + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *to(群id)
+       * 
+ * + * string site_group_id = 3; + */ + public Builder setSiteGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteGroupId_ = value; + onChanged(); + return this; + } + /** + *
+       *to(群id)
+       * 
+ * + * string site_group_id = 3; + */ + public Builder clearSiteGroupId() { + + siteGroupId_ = getDefaultInstance().getSiteGroupId(); + onChanged(); + return this; + } + /** + *
+       *to(群id)
+       * 
+ * + * string site_group_id = 3; + */ + public Builder setSiteGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteGroupId_ = value; + onChanged(); + return this; + } + + private java.lang.Object lng_ = ""; + /** + *
+       *经度
+       * 
+ * + * string lng = 4; + */ + public java.lang.String getLng() { + java.lang.Object ref = lng_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lng_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *经度
+       * 
+ * + * string lng = 4; + */ + public com.google.protobuf.ByteString + getLngBytes() { + java.lang.Object ref = lng_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + lng_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *经度
+       * 
+ * + * string lng = 4; + */ + public Builder setLng( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + lng_ = value; + onChanged(); + return this; + } + /** + *
+       *经度
+       * 
+ * + * string lng = 4; + */ + public Builder clearLng() { + + lng_ = getDefaultInstance().getLng(); + onChanged(); + return this; + } + /** + *
+       *经度
+       * 
+ * + * string lng = 4; + */ + public Builder setLngBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + lng_ = value; + onChanged(); + return this; + } + + private java.lang.Object lat_ = ""; + /** + *
+       *纬度
+       * 
+ * + * string lat = 5; + */ + public java.lang.String getLat() { + java.lang.Object ref = lat_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lat_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *纬度
+       * 
+ * + * string lat = 5; + */ + public com.google.protobuf.ByteString + getLatBytes() { + java.lang.Object ref = lat_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + lat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *纬度
+       * 
+ * + * string lat = 5; + */ + public Builder setLat( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + lat_ = value; + onChanged(); + return this; + } + /** + *
+       *纬度
+       * 
+ * + * string lat = 5; + */ + public Builder clearLat() { + + lat_ = getDefaultInstance().getLat(); + onChanged(); + return this; + } + /** + *
+       *纬度
+       * 
+ * + * string lat = 5; + */ + public Builder setLatBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + lat_ = value; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 6; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 6; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 6; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.GroupMap) + } + + // @@protoc_insertion_point(class_scope:core.GroupMap) + private static final com.akaxin.proto.core.CoreProto.GroupMap DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.GroupMap(); + } + + public static com.akaxin.proto.core.CoreProto.GroupMap getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GroupMap parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GroupMap(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.GroupMap getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GroupSecretMapOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.GroupSecretMap) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *to(群ID)
+     * 
+ * + * string site_group_id = 3; + */ + java.lang.String getSiteGroupId(); + /** + *
+     *to(群ID)
+     * 
+ * + * string site_group_id = 3; + */ + com.google.protobuf.ByteString + getSiteGroupIdBytes(); + + /** + *
+     *加密经度
+     * 
+ * + * string base64_lng = 4; + */ + java.lang.String getBase64Lng(); + /** + *
+     *加密经度
+     * 
+ * + * string base64_lng = 4; + */ + com.google.protobuf.ByteString + getBase64LngBytes(); + + /** + *
+     *加密纬度
+     * 
+ * + * string base64_lat = 5; + */ + java.lang.String getBase64Lat(); + /** + *
+     *加密纬度
+     * 
+ * + * string base64_lat = 5; + */ + com.google.protobuf.ByteString + getBase64LatBytes(); + + /** + *
+     *base64的加密key,用于AES加密使用
+     * 
+ * + * string base64_ts_key = 6; + */ + java.lang.String getBase64TsKey(); + /** + *
+     *base64的加密key,用于AES加密使用
+     * 
+ * + * string base64_ts_key = 6; + */ + com.google.protobuf.ByteString + getBase64TsKeyBytes(); + + /** + *
+     *接受者的设备ID
+     * 
+ * + * string to_device_id = 7; + */ + java.lang.String getToDeviceId(); + /** + *
+     *接受者的设备ID
+     * 
+ * + * string to_device_id = 7; + */ + com.google.protobuf.ByteString + getToDeviceIdBytes(); + + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 8; + */ + long getTime(); + } + /** + *
+   *加密群地理位置消息
+   * 
+ * + * Protobuf type {@code core.GroupSecretMap} + */ + public static final class GroupSecretMap extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.GroupSecretMap) + GroupSecretMapOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupSecretMap.newBuilder() to construct. + private GroupSecretMap(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GroupSecretMap() { + msgId_ = ""; + siteUserId_ = ""; + siteGroupId_ = ""; + base64Lng_ = ""; + base64Lat_ = ""; + base64TsKey_ = ""; + toDeviceId_ = ""; + time_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GroupSecretMap( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteGroupId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + base64Lng_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + base64Lat_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + base64TsKey_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + toDeviceId_ = s; + break; + } + case 64: { + + time_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretMap_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretMap_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupSecretMap.class, com.akaxin.proto.core.CoreProto.GroupSecretMap.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + *
+     *消息id
+     * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_GROUP_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteGroupId_; + /** + *
+     *to(群ID)
+     * 
+ * + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } + } + /** + *
+     *to(群ID)
+     * 
+ * + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE64_LNG_FIELD_NUMBER = 4; + private volatile java.lang.Object base64Lng_; + /** + *
+     *加密经度
+     * 
+ * + * string base64_lng = 4; + */ + public java.lang.String getBase64Lng() { + java.lang.Object ref = base64Lng_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64Lng_ = s; + return s; + } + } + /** + *
+     *加密经度
+     * 
+ * + * string base64_lng = 4; + */ + public com.google.protobuf.ByteString + getBase64LngBytes() { + java.lang.Object ref = base64Lng_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64Lng_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE64_LAT_FIELD_NUMBER = 5; + private volatile java.lang.Object base64Lat_; + /** + *
+     *加密纬度
+     * 
+ * + * string base64_lat = 5; + */ + public java.lang.String getBase64Lat() { + java.lang.Object ref = base64Lat_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64Lat_ = s; + return s; + } + } + /** + *
+     *加密纬度
+     * 
+ * + * string base64_lat = 5; + */ + public com.google.protobuf.ByteString + getBase64LatBytes() { + java.lang.Object ref = base64Lat_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64Lat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE64_TS_KEY_FIELD_NUMBER = 6; + private volatile java.lang.Object base64TsKey_; + /** + *
+     *base64的加密key,用于AES加密使用
+     * 
+ * + * string base64_ts_key = 6; + */ + public java.lang.String getBase64TsKey() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64TsKey_ = s; + return s; + } + } + /** + *
+     *base64的加密key,用于AES加密使用
+     * 
+ * + * string base64_ts_key = 6; + */ + public com.google.protobuf.ByteString + getBase64TsKeyBytes() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64TsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TO_DEVICE_ID_FIELD_NUMBER = 7; + private volatile java.lang.Object toDeviceId_; + /** + *
+     *接受者的设备ID
+     * 
+ * + * string to_device_id = 7; + */ + public java.lang.String getToDeviceId() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + toDeviceId_ = s; + return s; + } + } + /** + *
+     *接受者的设备ID
+     * 
+ * + * string to_device_id = 7; + */ + public com.google.protobuf.ByteString + getToDeviceIdBytes() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + toDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 8; + private long time_; + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 8; + */ + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteGroupId_); + } + if (!getBase64LngBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, base64Lng_); + } + if (!getBase64LatBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, base64Lat_); + } + if (!getBase64TsKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, base64TsKey_); + } + if (!getToDeviceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, toDeviceId_); + } + if (time_ != 0L) { + output.writeInt64(8, time_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteGroupId_); + } + if (!getBase64LngBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, base64Lng_); + } + if (!getBase64LatBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, base64Lat_); + } + if (!getBase64TsKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, base64TsKey_); + } + if (!getToDeviceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, toDeviceId_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(8, time_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.GroupSecretMap)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.GroupSecretMap other = (com.akaxin.proto.core.CoreProto.GroupSecretMap) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteGroupId() + .equals(other.getSiteGroupId()); + result = result && getBase64Lng() + .equals(other.getBase64Lng()); + result = result && getBase64Lat() + .equals(other.getBase64Lat()); + result = result && getBase64TsKey() + .equals(other.getBase64TsKey()); + result = result && getToDeviceId() + .equals(other.getToDeviceId()); + result = result && (getTime() + == other.getTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteGroupId().hashCode(); + hash = (37 * hash) + BASE64_LNG_FIELD_NUMBER; + hash = (53 * hash) + getBase64Lng().hashCode(); + hash = (37 * hash) + BASE64_LAT_FIELD_NUMBER; + hash = (53 * hash) + getBase64Lat().hashCode(); + hash = (37 * hash) + BASE64_TS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getBase64TsKey().hashCode(); + hash = (37 * hash) + TO_DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getToDeviceId().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.GroupSecretMap parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretMap parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretMap parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretMap parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretMap parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretMap parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretMap parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretMap parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretMap parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretMap parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretMap parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupSecretMap parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.GroupSecretMap prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *加密群地理位置消息
+     * 
+ * + * Protobuf type {@code core.GroupSecretMap} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.GroupSecretMap) + com.akaxin.proto.core.CoreProto.GroupSecretMapOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretMap_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretMap_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupSecretMap.class, com.akaxin.proto.core.CoreProto.GroupSecretMap.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.GroupSecretMap.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteGroupId_ = ""; + + base64Lng_ = ""; + + base64Lat_ = ""; + + base64TsKey_ = ""; + + toDeviceId_ = ""; + + time_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupSecretMap_descriptor; + } + + public com.akaxin.proto.core.CoreProto.GroupSecretMap getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.GroupSecretMap.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.GroupSecretMap build() { + com.akaxin.proto.core.CoreProto.GroupSecretMap result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.GroupSecretMap buildPartial() { + com.akaxin.proto.core.CoreProto.GroupSecretMap result = new com.akaxin.proto.core.CoreProto.GroupSecretMap(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteGroupId_ = siteGroupId_; + result.base64Lng_ = base64Lng_; + result.base64Lat_ = base64Lat_; + result.base64TsKey_ = base64TsKey_; + result.toDeviceId_ = toDeviceId_; + result.time_ = time_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.GroupSecretMap) { + return mergeFrom((com.akaxin.proto.core.CoreProto.GroupSecretMap)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.GroupSecretMap other) { + if (other == com.akaxin.proto.core.CoreProto.GroupSecretMap.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteGroupId().isEmpty()) { + siteGroupId_ = other.siteGroupId_; + onChanged(); + } + if (!other.getBase64Lng().isEmpty()) { + base64Lng_ = other.base64Lng_; + onChanged(); + } + if (!other.getBase64Lat().isEmpty()) { + base64Lat_ = other.base64Lat_; + onChanged(); + } + if (!other.getBase64TsKey().isEmpty()) { + base64TsKey_ = other.base64TsKey_; + onChanged(); + } + if (!other.getToDeviceId().isEmpty()) { + toDeviceId_ = other.toDeviceId_; + onChanged(); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.GroupSecretMap parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.GroupSecretMap) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + *
+       *消息id
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteGroupId_ = ""; + /** + *
+       *to(群ID)
+       * 
+ * + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *to(群ID)
+       * 
+ * + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *to(群ID)
+       * 
+ * + * string site_group_id = 3; + */ + public Builder setSiteGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteGroupId_ = value; + onChanged(); + return this; + } + /** + *
+       *to(群ID)
+       * 
+ * + * string site_group_id = 3; + */ + public Builder clearSiteGroupId() { + + siteGroupId_ = getDefaultInstance().getSiteGroupId(); + onChanged(); + return this; + } + /** + *
+       *to(群ID)
+       * 
+ * + * string site_group_id = 3; + */ + public Builder setSiteGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteGroupId_ = value; + onChanged(); + return this; + } + + private java.lang.Object base64Lng_ = ""; + /** + *
+       *加密经度
+       * 
+ * + * string base64_lng = 4; + */ + public java.lang.String getBase64Lng() { + java.lang.Object ref = base64Lng_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64Lng_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *加密经度
+       * 
+ * + * string base64_lng = 4; + */ + public com.google.protobuf.ByteString + getBase64LngBytes() { + java.lang.Object ref = base64Lng_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64Lng_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *加密经度
+       * 
+ * + * string base64_lng = 4; + */ + public Builder setBase64Lng( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + base64Lng_ = value; + onChanged(); + return this; + } + /** + *
+       *加密经度
+       * 
+ * + * string base64_lng = 4; + */ + public Builder clearBase64Lng() { + + base64Lng_ = getDefaultInstance().getBase64Lng(); + onChanged(); + return this; + } + /** + *
+       *加密经度
+       * 
+ * + * string base64_lng = 4; + */ + public Builder setBase64LngBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + base64Lng_ = value; + onChanged(); + return this; + } + + private java.lang.Object base64Lat_ = ""; + /** + *
+       *加密纬度
+       * 
+ * + * string base64_lat = 5; + */ + public java.lang.String getBase64Lat() { + java.lang.Object ref = base64Lat_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64Lat_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *加密纬度
+       * 
+ * + * string base64_lat = 5; + */ + public com.google.protobuf.ByteString + getBase64LatBytes() { + java.lang.Object ref = base64Lat_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64Lat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *加密纬度
+       * 
+ * + * string base64_lat = 5; + */ + public Builder setBase64Lat( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + base64Lat_ = value; + onChanged(); + return this; + } + /** + *
+       *加密纬度
+       * 
+ * + * string base64_lat = 5; + */ + public Builder clearBase64Lat() { + + base64Lat_ = getDefaultInstance().getBase64Lat(); + onChanged(); + return this; + } + /** + *
+       *加密纬度
+       * 
+ * + * string base64_lat = 5; + */ + public Builder setBase64LatBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + base64Lat_ = value; + onChanged(); + return this; + } + + private java.lang.Object base64TsKey_ = ""; + /** + *
+       *base64的加密key,用于AES加密使用
+       * 
+ * + * string base64_ts_key = 6; + */ + public java.lang.String getBase64TsKey() { + java.lang.Object ref = base64TsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64TsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *base64的加密key,用于AES加密使用
+       * 
+ * + * string base64_ts_key = 6; + */ + public com.google.protobuf.ByteString + getBase64TsKeyBytes() { + java.lang.Object ref = base64TsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64TsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *base64的加密key,用于AES加密使用
+       * 
+ * + * string base64_ts_key = 6; + */ + public Builder setBase64TsKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + base64TsKey_ = value; + onChanged(); + return this; + } + /** + *
+       *base64的加密key,用于AES加密使用
+       * 
+ * + * string base64_ts_key = 6; + */ + public Builder clearBase64TsKey() { + + base64TsKey_ = getDefaultInstance().getBase64TsKey(); + onChanged(); + return this; + } + /** + *
+       *base64的加密key,用于AES加密使用
+       * 
+ * + * string base64_ts_key = 6; + */ + public Builder setBase64TsKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + base64TsKey_ = value; + onChanged(); + return this; + } + + private java.lang.Object toDeviceId_ = ""; + /** + *
+       *接受者的设备ID
+       * 
+ * + * string to_device_id = 7; + */ + public java.lang.String getToDeviceId() { + java.lang.Object ref = toDeviceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + toDeviceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *接受者的设备ID
+       * 
+ * + * string to_device_id = 7; + */ + public com.google.protobuf.ByteString + getToDeviceIdBytes() { + java.lang.Object ref = toDeviceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + toDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *接受者的设备ID
+       * 
+ * + * string to_device_id = 7; + */ + public Builder setToDeviceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + toDeviceId_ = value; + onChanged(); + return this; + } + /** + *
+       *接受者的设备ID
+       * 
+ * + * string to_device_id = 7; + */ + public Builder clearToDeviceId() { + + toDeviceId_ = getDefaultInstance().getToDeviceId(); + onChanged(); + return this; + } + /** + *
+       *接受者的设备ID
+       * 
+ * + * string to_device_id = 7; + */ + public Builder setToDeviceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + toDeviceId_ = value; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 8; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 8; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 8; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.GroupSecretMap) + } + + // @@protoc_insertion_point(class_scope:core.GroupSecretMap) + private static final com.akaxin.proto.core.CoreProto.GroupSecretMap DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.GroupSecretMap(); + } + + public static com.akaxin.proto.core.CoreProto.GroupSecretMap getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GroupSecretMap parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GroupSecretMap(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.GroupSecretMap getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface U2MsgNoticeOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.U2MsgNotice) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *通知可能的发送方
+     * 
+ * + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + *
+     *通知可能的发送方
+     * 
+ * + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *消息的接收方
+     * 
+ * + * string site_friend_id = 2; + */ + java.lang.String getSiteFriendId(); + /** + *
+     *消息的接收方
+     * 
+ * + * string site_friend_id = 2; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + + /** + *
+     *消息通知内容
+     * 
+ * + * bytes text = 3; + */ + com.google.protobuf.ByteString getText(); + + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 4; + */ + long getTime(); + + /** + *
+     *通知消息id
+     * 
+ * + * string msg_id = 5; + */ + java.lang.String getMsgId(); + /** + *
+     *通知消息id
+     * 
+ * + * string msg_id = 5; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + } + /** + *
+   *消息通知:二人消息文本通知消息
+   * 
+ * + * Protobuf type {@code core.U2MsgNotice} + */ + public static final class U2MsgNotice extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.U2MsgNotice) + U2MsgNoticeOrBuilder { + private static final long serialVersionUID = 0L; + // Use U2MsgNotice.newBuilder() to construct. + private U2MsgNotice(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private U2MsgNotice() { + siteUserId_ = ""; + siteFriendId_ = ""; + text_ = com.google.protobuf.ByteString.EMPTY; + time_ = 0L; + msgId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private U2MsgNotice( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + case 26: { + + text_ = input.readBytes(); + break; + } + case 32: { + + time_ = input.readInt64(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2MsgNotice_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2MsgNotice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.U2MsgNotice.class, com.akaxin.proto.core.CoreProto.U2MsgNotice.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + *
+     *通知可能的发送方
+     * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *通知可能的发送方
+     * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteFriendId_; + /** + *
+     *消息的接收方
+     * 
+ * + * string site_friend_id = 2; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + *
+     *消息的接收方
+     * 
+ * + * string site_friend_id = 2; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEXT_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString text_; + /** + *
+     *消息通知内容
+     * 
+ * + * bytes text = 3; + */ + public com.google.protobuf.ByteString getText() { + return text_; + } + + public static final int TIME_FIELD_NUMBER = 4; + private long time_; + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 4; + */ + public long getTime() { + return time_; + } + + public static final int MSG_ID_FIELD_NUMBER = 5; + private volatile java.lang.Object msgId_; + /** + *
+     *通知消息id
+     * 
+ * + * string msg_id = 5; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + *
+     *通知消息id
+     * 
+ * + * string msg_id = 5; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteFriendId_); + } + if (!text_.isEmpty()) { + output.writeBytes(3, text_); + } + if (time_ != 0L) { + output.writeInt64(4, time_); + } + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, msgId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteFriendId_); + } + if (!text_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, text_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, time_); + } + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, msgId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.U2MsgNotice)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.U2MsgNotice other = (com.akaxin.proto.core.CoreProto.U2MsgNotice) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && getText() + .equals(other.getText()); + result = result && (getTime() + == other.getTime()); + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.U2MsgNotice parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.U2MsgNotice parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2MsgNotice parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.U2MsgNotice parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2MsgNotice parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.U2MsgNotice parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2MsgNotice parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.U2MsgNotice parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2MsgNotice parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.U2MsgNotice parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2MsgNotice parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.U2MsgNotice parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.U2MsgNotice prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *消息通知:二人消息文本通知消息
+     * 
+ * + * Protobuf type {@code core.U2MsgNotice} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.U2MsgNotice) + com.akaxin.proto.core.CoreProto.U2MsgNoticeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2MsgNotice_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2MsgNotice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.U2MsgNotice.class, com.akaxin.proto.core.CoreProto.U2MsgNotice.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.U2MsgNotice.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + siteFriendId_ = ""; + + text_ = com.google.protobuf.ByteString.EMPTY; + + time_ = 0L; + + msgId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2MsgNotice_descriptor; + } + + public com.akaxin.proto.core.CoreProto.U2MsgNotice getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.U2MsgNotice.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.U2MsgNotice build() { + com.akaxin.proto.core.CoreProto.U2MsgNotice result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.U2MsgNotice buildPartial() { + com.akaxin.proto.core.CoreProto.U2MsgNotice result = new com.akaxin.proto.core.CoreProto.U2MsgNotice(this); + result.siteUserId_ = siteUserId_; + result.siteFriendId_ = siteFriendId_; + result.text_ = text_; + result.time_ = time_; + result.msgId_ = msgId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.U2MsgNotice) { + return mergeFrom((com.akaxin.proto.core.CoreProto.U2MsgNotice)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.U2MsgNotice other) { + if (other == com.akaxin.proto.core.CoreProto.U2MsgNotice.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + if (other.getText() != com.google.protobuf.ByteString.EMPTY) { + setText(other.getText()); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.U2MsgNotice parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.U2MsgNotice) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *通知可能的发送方
+       * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *通知可能的发送方
+       * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *通知可能的发送方
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *通知可能的发送方
+       * 
+ * + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *通知可能的发送方
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + *
+       *消息的接收方
+       * 
+ * + * string site_friend_id = 2; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *消息的接收方
+       * 
+ * + * string site_friend_id = 2; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *消息的接收方
+       * 
+ * + * string site_friend_id = 2; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + *
+       *消息的接收方
+       * 
+ * + * string site_friend_id = 2; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + *
+       *消息的接收方
+       * 
+ * + * string site_friend_id = 2; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString text_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       *消息通知内容
+       * 
+ * + * bytes text = 3; + */ + public com.google.protobuf.ByteString getText() { + return text_; + } + /** + *
+       *消息通知内容
+       * 
+ * + * bytes text = 3; + */ + public Builder setText(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + *
+       *消息通知内容
+       * 
+ * + * bytes text = 3; + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 4; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 4; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 4; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object msgId_ = ""; + /** + *
+       *通知消息id
+       * 
+ * + * string msg_id = 5; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *通知消息id
+       * 
+ * + * string msg_id = 5; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *通知消息id
+       * 
+ * + * string msg_id = 5; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + *
+       *通知消息id
+       * 
+ * + * string msg_id = 5; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + *
+       *通知消息id
+       * 
+ * + * string msg_id = 5; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.U2MsgNotice) + } + + // @@protoc_insertion_point(class_scope:core.U2MsgNotice) + private static final com.akaxin.proto.core.CoreProto.U2MsgNotice DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.U2MsgNotice(); + } + + public static com.akaxin.proto.core.CoreProto.U2MsgNotice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public U2MsgNotice parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new U2MsgNotice(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.U2MsgNotice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GroupMsgNoticeOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.GroupMsgNotice) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *通知发送者
+     * 
+ * + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + *
+     *通知发送者
+     * 
+ * + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *群组ID
+     * 
+ * + * string site_group_id = 2; + */ + java.lang.String getSiteGroupId(); + /** + *
+     *群组ID
+     * 
+ * + * string site_group_id = 2; + */ + com.google.protobuf.ByteString + getSiteGroupIdBytes(); + + /** + *
+     *通知消息
+     * 
+ * + * bytes text = 3; + */ + com.google.protobuf.ByteString getText(); + + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 4; + */ + long getTime(); + + /** + *
+     *通知消息id
+     * 
+ * + * string msg_id = 5; + */ + java.lang.String getMsgId(); + /** + *
+     *通知消息id
+     * 
+ * + * string msg_id = 5; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + } + /** + *
+   *消息通知:群组消息文本通知消息
+   * 
+ * + * Protobuf type {@code core.GroupMsgNotice} + */ + public static final class GroupMsgNotice extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.GroupMsgNotice) + GroupMsgNoticeOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupMsgNotice.newBuilder() to construct. + private GroupMsgNotice(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GroupMsgNotice() { + siteUserId_ = ""; + siteGroupId_ = ""; + text_ = com.google.protobuf.ByteString.EMPTY; + time_ = 0L; + msgId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GroupMsgNotice( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteGroupId_ = s; + break; + } + case 26: { + + text_ = input.readBytes(); + break; + } + case 32: { + + time_ = input.readInt64(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupMsgNotice_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupMsgNotice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupMsgNotice.class, com.akaxin.proto.core.CoreProto.GroupMsgNotice.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + *
+     *通知发送者
+     * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *通知发送者
+     * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_GROUP_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteGroupId_; + /** + *
+     *群组ID
+     * 
+ * + * string site_group_id = 2; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } + } + /** + *
+     *群组ID
+     * 
+ * + * string site_group_id = 2; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEXT_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString text_; + /** + *
+     *通知消息
+     * 
+ * + * bytes text = 3; + */ + public com.google.protobuf.ByteString getText() { + return text_; + } + + public static final int TIME_FIELD_NUMBER = 4; + private long time_; + /** + *
+     *消息时间,单位ms
+     * 
+ * + * int64 time = 4; + */ + public long getTime() { + return time_; + } + + public static final int MSG_ID_FIELD_NUMBER = 5; + private volatile java.lang.Object msgId_; + /** + *
+     *通知消息id
+     * 
+ * + * string msg_id = 5; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + *
+     *通知消息id
+     * 
+ * + * string msg_id = 5; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteGroupId_); + } + if (!text_.isEmpty()) { + output.writeBytes(3, text_); + } + if (time_ != 0L) { + output.writeInt64(4, time_); + } + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, msgId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteGroupId_); + } + if (!text_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, text_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, time_); + } + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, msgId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.GroupMsgNotice)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.GroupMsgNotice other = (com.akaxin.proto.core.CoreProto.GroupMsgNotice) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteGroupId() + .equals(other.getSiteGroupId()); + result = result && getText() + .equals(other.getText()); + result = result && (getTime() + == other.getTime()); + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteGroupId().hashCode(); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.GroupMsgNotice parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupMsgNotice parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupMsgNotice parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupMsgNotice parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupMsgNotice parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupMsgNotice parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupMsgNotice parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupMsgNotice parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupMsgNotice parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupMsgNotice parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupMsgNotice parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupMsgNotice parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.GroupMsgNotice prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *消息通知:群组消息文本通知消息
+     * 
+ * + * Protobuf type {@code core.GroupMsgNotice} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.GroupMsgNotice) + com.akaxin.proto.core.CoreProto.GroupMsgNoticeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupMsgNotice_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupMsgNotice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupMsgNotice.class, com.akaxin.proto.core.CoreProto.GroupMsgNotice.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.GroupMsgNotice.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + siteGroupId_ = ""; + + text_ = com.google.protobuf.ByteString.EMPTY; + + time_ = 0L; + + msgId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupMsgNotice_descriptor; + } + + public com.akaxin.proto.core.CoreProto.GroupMsgNotice getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.GroupMsgNotice.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.GroupMsgNotice build() { + com.akaxin.proto.core.CoreProto.GroupMsgNotice result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.GroupMsgNotice buildPartial() { + com.akaxin.proto.core.CoreProto.GroupMsgNotice result = new com.akaxin.proto.core.CoreProto.GroupMsgNotice(this); + result.siteUserId_ = siteUserId_; + result.siteGroupId_ = siteGroupId_; + result.text_ = text_; + result.time_ = time_; + result.msgId_ = msgId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.GroupMsgNotice) { + return mergeFrom((com.akaxin.proto.core.CoreProto.GroupMsgNotice)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.GroupMsgNotice other) { + if (other == com.akaxin.proto.core.CoreProto.GroupMsgNotice.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteGroupId().isEmpty()) { + siteGroupId_ = other.siteGroupId_; + onChanged(); + } + if (other.getText() != com.google.protobuf.ByteString.EMPTY) { + setText(other.getText()); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.GroupMsgNotice parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.GroupMsgNotice) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *通知发送者
+       * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *通知发送者
+       * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *通知发送者
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *通知发送者
+       * 
+ * + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *通知发送者
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteGroupId_ = ""; + /** + *
+       *群组ID
+       * 
+ * + * string site_group_id = 2; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string site_group_id = 2; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string site_group_id = 2; + */ + public Builder setSiteGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteGroupId_ = value; + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string site_group_id = 2; + */ + public Builder clearSiteGroupId() { + + siteGroupId_ = getDefaultInstance().getSiteGroupId(); + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string site_group_id = 2; + */ + public Builder setSiteGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteGroupId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString text_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       *通知消息
+       * 
+ * + * bytes text = 3; + */ + public com.google.protobuf.ByteString getText() { + return text_; + } + /** + *
+       *通知消息
+       * 
+ * + * bytes text = 3; + */ + public Builder setText(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + *
+       *通知消息
+       * 
+ * + * bytes text = 3; + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 4; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 4; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms
+       * 
+ * + * int64 time = 4; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object msgId_ = ""; + /** + *
+       *通知消息id
+       * 
+ * + * string msg_id = 5; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *通知消息id
+       * 
+ * + * string msg_id = 5; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *通知消息id
+       * 
+ * + * string msg_id = 5; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + *
+       *通知消息id
+       * 
+ * + * string msg_id = 5; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + *
+       *通知消息id
+       * 
+ * + * string msg_id = 5; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.GroupMsgNotice) + } + + // @@protoc_insertion_point(class_scope:core.GroupMsgNotice) + private static final com.akaxin.proto.core.CoreProto.GroupMsgNotice DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.GroupMsgNotice(); + } + + public static com.akaxin.proto.core.CoreProto.GroupMsgNotice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GroupMsgNotice parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GroupMsgNotice(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.GroupMsgNotice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface U2RecallOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.U2Recall) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *撤回消息的ID
+     * 
+ * + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + *
+     *撤回消息的ID
+     * 
+ * + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + * string site_friend_id = 3; + */ + java.lang.String getSiteFriendId(); + /** + * string site_friend_id = 3; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + + /** + *
+     *撤回的消息ID
+     * 
+ * + * string recall_msg_id = 4; + */ + java.lang.String getRecallMsgId(); + /** + *
+     *撤回的消息ID
+     * 
+ * + * string recall_msg_id = 4; + */ + com.google.protobuf.ByteString + getRecallMsgIdBytes(); + + /** + *
+     *消息时间,单位ms,(撤回消息客户端需要判断是否超过2minutes)
+     * 
+ * + * int64 time = 5; + */ + long getTime(); + } + /** + *
+   *撤回的消息,不用入库
+   * 
+ * + * Protobuf type {@code core.U2Recall} + */ + public static final class U2Recall extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.U2Recall) + U2RecallOrBuilder { + private static final long serialVersionUID = 0L; + // Use U2Recall.newBuilder() to construct. + private U2Recall(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private U2Recall() { + msgId_ = ""; + siteUserId_ = ""; + siteFriendId_ = ""; + recallMsgId_ = ""; + time_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private U2Recall( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + recallMsgId_ = s; + break; + } + case 40: { + + time_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2Recall_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2Recall_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.U2Recall.class, com.akaxin.proto.core.CoreProto.U2Recall.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + *
+     *撤回消息的ID
+     * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + *
+     *撤回消息的ID
+     * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteFriendId_; + /** + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECALL_MSG_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object recallMsgId_; + /** + *
+     *撤回的消息ID
+     * 
+ * + * string recall_msg_id = 4; + */ + public java.lang.String getRecallMsgId() { + java.lang.Object ref = recallMsgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + recallMsgId_ = s; + return s; + } + } + /** + *
+     *撤回的消息ID
+     * 
+ * + * string recall_msg_id = 4; + */ + public com.google.protobuf.ByteString + getRecallMsgIdBytes() { + java.lang.Object ref = recallMsgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + recallMsgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 5; + private long time_; + /** + *
+     *消息时间,单位ms,(撤回消息客户端需要判断是否超过2minutes)
+     * 
+ * + * int64 time = 5; + */ + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteFriendId_); + } + if (!getRecallMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, recallMsgId_); + } + if (time_ != 0L) { + output.writeInt64(5, time_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteFriendId_); + } + if (!getRecallMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, recallMsgId_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, time_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.U2Recall)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.U2Recall other = (com.akaxin.proto.core.CoreProto.U2Recall) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && getRecallMsgId() + .equals(other.getRecallMsgId()); + result = result && (getTime() + == other.getTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (37 * hash) + RECALL_MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getRecallMsgId().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.U2Recall parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.U2Recall parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2Recall parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.U2Recall parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2Recall parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.U2Recall parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2Recall parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.U2Recall parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2Recall parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.U2Recall parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2Recall parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.U2Recall parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.U2Recall prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *撤回的消息,不用入库
+     * 
+ * + * Protobuf type {@code core.U2Recall} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.U2Recall) + com.akaxin.proto.core.CoreProto.U2RecallOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2Recall_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2Recall_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.U2Recall.class, com.akaxin.proto.core.CoreProto.U2Recall.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.U2Recall.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteFriendId_ = ""; + + recallMsgId_ = ""; + + time_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2Recall_descriptor; + } + + public com.akaxin.proto.core.CoreProto.U2Recall getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.U2Recall.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.U2Recall build() { + com.akaxin.proto.core.CoreProto.U2Recall result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.U2Recall buildPartial() { + com.akaxin.proto.core.CoreProto.U2Recall result = new com.akaxin.proto.core.CoreProto.U2Recall(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteFriendId_ = siteFriendId_; + result.recallMsgId_ = recallMsgId_; + result.time_ = time_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.U2Recall) { + return mergeFrom((com.akaxin.proto.core.CoreProto.U2Recall)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.U2Recall other) { + if (other == com.akaxin.proto.core.CoreProto.U2Recall.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + if (!other.getRecallMsgId().isEmpty()) { + recallMsgId_ = other.recallMsgId_; + onChanged(); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.U2Recall parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.U2Recall) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + *
+       *撤回消息的ID
+       * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *撤回消息的ID
+       * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *撤回消息的ID
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + *
+       *撤回消息的ID
+       * 
+ * + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + *
+       *撤回消息的ID
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_friend_id = 3; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + * string site_friend_id = 3; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + * string site_friend_id = 3; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + + private java.lang.Object recallMsgId_ = ""; + /** + *
+       *撤回的消息ID
+       * 
+ * + * string recall_msg_id = 4; + */ + public java.lang.String getRecallMsgId() { + java.lang.Object ref = recallMsgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + recallMsgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *撤回的消息ID
+       * 
+ * + * string recall_msg_id = 4; + */ + public com.google.protobuf.ByteString + getRecallMsgIdBytes() { + java.lang.Object ref = recallMsgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + recallMsgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *撤回的消息ID
+       * 
+ * + * string recall_msg_id = 4; + */ + public Builder setRecallMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + recallMsgId_ = value; + onChanged(); + return this; + } + /** + *
+       *撤回的消息ID
+       * 
+ * + * string recall_msg_id = 4; + */ + public Builder clearRecallMsgId() { + + recallMsgId_ = getDefaultInstance().getRecallMsgId(); + onChanged(); + return this; + } + /** + *
+       *撤回的消息ID
+       * 
+ * + * string recall_msg_id = 4; + */ + public Builder setRecallMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + recallMsgId_ = value; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms,(撤回消息客户端需要判断是否超过2minutes)
+       * 
+ * + * int64 time = 5; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms,(撤回消息客户端需要判断是否超过2minutes)
+       * 
+ * + * int64 time = 5; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms,(撤回消息客户端需要判断是否超过2minutes)
+       * 
+ * + * int64 time = 5; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.U2Recall) + } + + // @@protoc_insertion_point(class_scope:core.U2Recall) + private static final com.akaxin.proto.core.CoreProto.U2Recall DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.U2Recall(); + } + + public static com.akaxin.proto.core.CoreProto.U2Recall getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public U2Recall parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new U2Recall(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.U2Recall getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GroupRecallOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.GroupRecall) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *撤回消息的ID
+     * 
+ * + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + *
+     *撤回消息的ID
+     * 
+ * + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + * string site_group_id = 3; + */ + java.lang.String getSiteGroupId(); + /** + * string site_group_id = 3; + */ + com.google.protobuf.ByteString + getSiteGroupIdBytes(); + + /** + *
+     *撤回的消息ID
+     * 
+ * + * string recall_msg_id = 4; + */ + java.lang.String getRecallMsgId(); + /** + *
+     *撤回的消息ID
+     * 
+ * + * string recall_msg_id = 4; + */ + com.google.protobuf.ByteString + getRecallMsgIdBytes(); + + /** + *
+     *消息时间,单位ms,(撤回消息客户端需要判断是否超过2minutes)
+     * 
+ * + * int64 time = 5; + */ + long getTime(); + } + /** + *
+   *撤回的消息,不用入库
+   * 
+ * + * Protobuf type {@code core.GroupRecall} + */ + public static final class GroupRecall extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.GroupRecall) + GroupRecallOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupRecall.newBuilder() to construct. + private GroupRecall(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GroupRecall() { + msgId_ = ""; + siteUserId_ = ""; + siteGroupId_ = ""; + recallMsgId_ = ""; + time_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GroupRecall( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteGroupId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + recallMsgId_ = s; + break; + } + case 40: { + + time_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupRecall_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupRecall_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupRecall.class, com.akaxin.proto.core.CoreProto.GroupRecall.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + *
+     *撤回消息的ID
+     * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + *
+     *撤回消息的ID
+     * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_GROUP_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteGroupId_; + /** + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } + } + /** + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECALL_MSG_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object recallMsgId_; + /** + *
+     *撤回的消息ID
+     * 
+ * + * string recall_msg_id = 4; + */ + public java.lang.String getRecallMsgId() { + java.lang.Object ref = recallMsgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + recallMsgId_ = s; + return s; + } + } + /** + *
+     *撤回的消息ID
+     * 
+ * + * string recall_msg_id = 4; + */ + public com.google.protobuf.ByteString + getRecallMsgIdBytes() { + java.lang.Object ref = recallMsgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + recallMsgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 5; + private long time_; + /** + *
+     *消息时间,单位ms,(撤回消息客户端需要判断是否超过2minutes)
+     * 
+ * + * int64 time = 5; + */ + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteGroupId_); + } + if (!getRecallMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, recallMsgId_); + } + if (time_ != 0L) { + output.writeInt64(5, time_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteGroupId_); + } + if (!getRecallMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, recallMsgId_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, time_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.GroupRecall)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.GroupRecall other = (com.akaxin.proto.core.CoreProto.GroupRecall) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteGroupId() + .equals(other.getSiteGroupId()); + result = result && getRecallMsgId() + .equals(other.getRecallMsgId()); + result = result && (getTime() + == other.getTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteGroupId().hashCode(); + hash = (37 * hash) + RECALL_MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getRecallMsgId().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.GroupRecall parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupRecall parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupRecall parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupRecall parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupRecall parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupRecall parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupRecall parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupRecall parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupRecall parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupRecall parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupRecall parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupRecall parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.GroupRecall prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *撤回的消息,不用入库
+     * 
+ * + * Protobuf type {@code core.GroupRecall} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.GroupRecall) + com.akaxin.proto.core.CoreProto.GroupRecallOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupRecall_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupRecall_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupRecall.class, com.akaxin.proto.core.CoreProto.GroupRecall.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.GroupRecall.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteGroupId_ = ""; + + recallMsgId_ = ""; + + time_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupRecall_descriptor; + } + + public com.akaxin.proto.core.CoreProto.GroupRecall getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.GroupRecall.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.GroupRecall build() { + com.akaxin.proto.core.CoreProto.GroupRecall result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.GroupRecall buildPartial() { + com.akaxin.proto.core.CoreProto.GroupRecall result = new com.akaxin.proto.core.CoreProto.GroupRecall(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteGroupId_ = siteGroupId_; + result.recallMsgId_ = recallMsgId_; + result.time_ = time_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.GroupRecall) { + return mergeFrom((com.akaxin.proto.core.CoreProto.GroupRecall)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.GroupRecall other) { + if (other == com.akaxin.proto.core.CoreProto.GroupRecall.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteGroupId().isEmpty()) { + siteGroupId_ = other.siteGroupId_; + onChanged(); + } + if (!other.getRecallMsgId().isEmpty()) { + recallMsgId_ = other.recallMsgId_; + onChanged(); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.GroupRecall parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.GroupRecall) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + *
+       *撤回消息的ID
+       * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *撤回消息的ID
+       * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *撤回消息的ID
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + *
+       *撤回消息的ID
+       * 
+ * + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + *
+       *撤回消息的ID
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteGroupId_ = ""; + /** + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_group_id = 3; + */ + public Builder setSiteGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteGroupId_ = value; + onChanged(); + return this; + } + /** + * string site_group_id = 3; + */ + public Builder clearSiteGroupId() { + + siteGroupId_ = getDefaultInstance().getSiteGroupId(); + onChanged(); + return this; + } + /** + * string site_group_id = 3; + */ + public Builder setSiteGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteGroupId_ = value; + onChanged(); + return this; + } + + private java.lang.Object recallMsgId_ = ""; + /** + *
+       *撤回的消息ID
+       * 
+ * + * string recall_msg_id = 4; + */ + public java.lang.String getRecallMsgId() { + java.lang.Object ref = recallMsgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + recallMsgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *撤回的消息ID
+       * 
+ * + * string recall_msg_id = 4; + */ + public com.google.protobuf.ByteString + getRecallMsgIdBytes() { + java.lang.Object ref = recallMsgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + recallMsgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *撤回的消息ID
+       * 
+ * + * string recall_msg_id = 4; + */ + public Builder setRecallMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + recallMsgId_ = value; + onChanged(); + return this; + } + /** + *
+       *撤回的消息ID
+       * 
+ * + * string recall_msg_id = 4; + */ + public Builder clearRecallMsgId() { + + recallMsgId_ = getDefaultInstance().getRecallMsgId(); + onChanged(); + return this; + } + /** + *
+       *撤回的消息ID
+       * 
+ * + * string recall_msg_id = 4; + */ + public Builder setRecallMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + recallMsgId_ = value; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间,单位ms,(撤回消息客户端需要判断是否超过2minutes)
+       * 
+ * + * int64 time = 5; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间,单位ms,(撤回消息客户端需要判断是否超过2minutes)
+       * 
+ * + * int64 time = 5; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间,单位ms,(撤回消息客户端需要判断是否超过2minutes)
+       * 
+ * + * int64 time = 5; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.GroupRecall) + } + + // @@protoc_insertion_point(class_scope:core.GroupRecall) + private static final com.akaxin.proto.core.CoreProto.GroupRecall DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.GroupRecall(); + } + + public static com.akaxin.proto.core.CoreProto.GroupRecall getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GroupRecall parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GroupRecall(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.GroupRecall getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface U2WebOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.U2Web) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *消息ID
+     * 
+ * + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + *
+     *消息ID
+     * 
+ * + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *to
+     * 
+ * + * string site_friend_id = 3; + */ + java.lang.String getSiteFriendId(); + /** + *
+     *to
+     * 
+ * + * string site_friend_id = 3; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + + /** + *
+     *统一使用web消息需要的代码内容
+     * 
+ * + * string web_code = 4; + */ + java.lang.String getWebCode(); + /** + *
+     *统一使用web消息需要的代码内容
+     * 
+ * + * string web_code = 4; + */ + com.google.protobuf.ByteString + getWebCodeBytes(); + + /** + *
+     *web消息的宽度
+     * 
+ * + * int32 width = 5; + */ + int getWidth(); + + /** + *
+     *web消息的高度
+     * 
+ * + * int32 height = 6; + */ + int getHeight(); + + /** + *
+     *消息时间
+     * 
+ * + * int64 time = 7; + */ + long getTime(); + + /** + *
+     *跳转链接;如果为空则不跳转。
+     * 
+ * + * string href_url = 8; + */ + java.lang.String getHrefUrl(); + /** + *
+     *跳转链接;如果为空则不跳转。
+     * 
+ * + * string href_url = 8; + */ + com.google.protobuf.ByteString + getHrefUrlBytes(); + } + /** + *
+   *二人:内嵌web类型消息
+   * 
+ * + * Protobuf type {@code core.U2Web} + */ + public static final class U2Web extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.U2Web) + U2WebOrBuilder { + private static final long serialVersionUID = 0L; + // Use U2Web.newBuilder() to construct. + private U2Web(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private U2Web() { + msgId_ = ""; + siteUserId_ = ""; + siteFriendId_ = ""; + webCode_ = ""; + width_ = 0; + height_ = 0; + time_ = 0L; + hrefUrl_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private U2Web( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + webCode_ = s; + break; + } + case 40: { + + width_ = input.readInt32(); + break; + } + case 48: { + + height_ = input.readInt32(); + break; + } + case 56: { + + time_ = input.readInt64(); + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + hrefUrl_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2Web_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2Web_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.U2Web.class, com.akaxin.proto.core.CoreProto.U2Web.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + *
+     *消息ID
+     * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + *
+     *消息ID
+     * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteFriendId_; + /** + *
+     *to
+     * 
+ * + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + *
+     *to
+     * 
+ * + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WEB_CODE_FIELD_NUMBER = 4; + private volatile java.lang.Object webCode_; + /** + *
+     *统一使用web消息需要的代码内容
+     * 
+ * + * string web_code = 4; + */ + public java.lang.String getWebCode() { + java.lang.Object ref = webCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webCode_ = s; + return s; + } + } + /** + *
+     *统一使用web消息需要的代码内容
+     * 
+ * + * string web_code = 4; + */ + public com.google.protobuf.ByteString + getWebCodeBytes() { + java.lang.Object ref = webCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + webCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WIDTH_FIELD_NUMBER = 5; + private int width_; + /** + *
+     *web消息的宽度
+     * 
+ * + * int32 width = 5; + */ + public int getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 6; + private int height_; + /** + *
+     *web消息的高度
+     * 
+ * + * int32 height = 6; + */ + public int getHeight() { + return height_; + } + + public static final int TIME_FIELD_NUMBER = 7; + private long time_; + /** + *
+     *消息时间
+     * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + + public static final int HREF_URL_FIELD_NUMBER = 8; + private volatile java.lang.Object hrefUrl_; + /** + *
+     *跳转链接;如果为空则不跳转。
+     * 
+ * + * string href_url = 8; + */ + public java.lang.String getHrefUrl() { + java.lang.Object ref = hrefUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hrefUrl_ = s; + return s; + } + } + /** + *
+     *跳转链接;如果为空则不跳转。
+     * 
+ * + * string href_url = 8; + */ + public com.google.protobuf.ByteString + getHrefUrlBytes() { + java.lang.Object ref = hrefUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hrefUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteFriendId_); + } + if (!getWebCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, webCode_); + } + if (width_ != 0) { + output.writeInt32(5, width_); + } + if (height_ != 0) { + output.writeInt32(6, height_); + } + if (time_ != 0L) { + output.writeInt64(7, time_); + } + if (!getHrefUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, hrefUrl_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteFriendId_); + } + if (!getWebCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, webCode_); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, width_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, height_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, time_); + } + if (!getHrefUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, hrefUrl_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.U2Web)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.U2Web other = (com.akaxin.proto.core.CoreProto.U2Web) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && getWebCode() + .equals(other.getWebCode()); + result = result && (getWidth() + == other.getWidth()); + result = result && (getHeight() + == other.getHeight()); + result = result && (getTime() + == other.getTime()); + result = result && getHrefUrl() + .equals(other.getHrefUrl()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (37 * hash) + WEB_CODE_FIELD_NUMBER; + hash = (53 * hash) + getWebCode().hashCode(); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + HREF_URL_FIELD_NUMBER; + hash = (53 * hash) + getHrefUrl().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.U2Web parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.U2Web parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2Web parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.U2Web parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2Web parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.U2Web parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2Web parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.U2Web parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2Web parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.U2Web parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2Web parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.U2Web parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.U2Web prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *二人:内嵌web类型消息
+     * 
+ * + * Protobuf type {@code core.U2Web} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.U2Web) + com.akaxin.proto.core.CoreProto.U2WebOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2Web_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2Web_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.U2Web.class, com.akaxin.proto.core.CoreProto.U2Web.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.U2Web.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteFriendId_ = ""; + + webCode_ = ""; + + width_ = 0; + + height_ = 0; + + time_ = 0L; + + hrefUrl_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2Web_descriptor; + } + + public com.akaxin.proto.core.CoreProto.U2Web getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.U2Web.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.U2Web build() { + com.akaxin.proto.core.CoreProto.U2Web result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.U2Web buildPartial() { + com.akaxin.proto.core.CoreProto.U2Web result = new com.akaxin.proto.core.CoreProto.U2Web(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteFriendId_ = siteFriendId_; + result.webCode_ = webCode_; + result.width_ = width_; + result.height_ = height_; + result.time_ = time_; + result.hrefUrl_ = hrefUrl_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.U2Web) { + return mergeFrom((com.akaxin.proto.core.CoreProto.U2Web)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.U2Web other) { + if (other == com.akaxin.proto.core.CoreProto.U2Web.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + if (!other.getWebCode().isEmpty()) { + webCode_ = other.webCode_; + onChanged(); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (!other.getHrefUrl().isEmpty()) { + hrefUrl_ = other.hrefUrl_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.U2Web parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.U2Web) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + + private java.lang.Object webCode_ = ""; + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public java.lang.String getWebCode() { + java.lang.Object ref = webCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public com.google.protobuf.ByteString + getWebCodeBytes() { + java.lang.Object ref = webCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + webCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public Builder setWebCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + webCode_ = value; + onChanged(); + return this; + } + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public Builder clearWebCode() { + + webCode_ = getDefaultInstance().getWebCode(); + onChanged(); + return this; + } + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public Builder setWebCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + webCode_ = value; + onChanged(); + return this; + } + + private int width_ ; + /** + *
+       *web消息的宽度
+       * 
+ * + * int32 width = 5; + */ + public int getWidth() { + return width_; + } + /** + *
+       *web消息的宽度
+       * 
+ * + * int32 width = 5; + */ + public Builder setWidth(int value) { + + width_ = value; + onChanged(); + return this; + } + /** + *
+       *web消息的宽度
+       * 
+ * + * int32 width = 5; + */ + public Builder clearWidth() { + + width_ = 0; + onChanged(); + return this; + } + + private int height_ ; + /** + *
+       *web消息的高度
+       * 
+ * + * int32 height = 6; + */ + public int getHeight() { + return height_; + } + /** + *
+       *web消息的高度
+       * 
+ * + * int32 height = 6; + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+       *web消息的高度
+       * 
+ * + * int32 height = 6; + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间
+       * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间
+       * 
+ * + * int64 time = 7; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间
+       * 
+ * + * int64 time = 7; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object hrefUrl_ = ""; + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 8; + */ + public java.lang.String getHrefUrl() { + java.lang.Object ref = hrefUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hrefUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 8; + */ + public com.google.protobuf.ByteString + getHrefUrlBytes() { + java.lang.Object ref = hrefUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hrefUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 8; + */ + public Builder setHrefUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + hrefUrl_ = value; + onChanged(); + return this; + } + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 8; + */ + public Builder clearHrefUrl() { + + hrefUrl_ = getDefaultInstance().getHrefUrl(); + onChanged(); + return this; + } + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 8; + */ + public Builder setHrefUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + hrefUrl_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.U2Web) + } + + // @@protoc_insertion_point(class_scope:core.U2Web) + private static final com.akaxin.proto.core.CoreProto.U2Web DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.U2Web(); + } + + public static com.akaxin.proto.core.CoreProto.U2Web getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public U2Web parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new U2Web(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.U2Web getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GroupWebOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.GroupWeb) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *消息ID
+     * 
+ * + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + *
+     *消息ID
+     * 
+ * + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *群ID(to)
+     * 
+ * + * string site_group_id = 3; + */ + java.lang.String getSiteGroupId(); + /** + *
+     *群ID(to)
+     * 
+ * + * string site_group_id = 3; + */ + com.google.protobuf.ByteString + getSiteGroupIdBytes(); + + /** + *
+     *统一使用web消息需要的代码内容
+     * 
+ * + * string web_code = 4; + */ + java.lang.String getWebCode(); + /** + *
+     *统一使用web消息需要的代码内容
+     * 
+ * + * string web_code = 4; + */ + com.google.protobuf.ByteString + getWebCodeBytes(); + + /** + *
+     *web消息的宽度
+     * 
+ * + * int32 width = 5; + */ + int getWidth(); + + /** + *
+     *web消息的高度
+     * 
+ * + * int32 height = 6; + */ + int getHeight(); + + /** + *
+     *消息时间
+     * 
+ * + * int64 time = 7; + */ + long getTime(); + + /** + *
+     *跳转链接;如果为空则不跳转。
+     * 
+ * + * string href_url = 8; + */ + java.lang.String getHrefUrl(); + /** + *
+     *跳转链接;如果为空则不跳转。
+     * 
+ * + * string href_url = 8; + */ + com.google.protobuf.ByteString + getHrefUrlBytes(); + } + /** + *
+   *群组:内嵌web类型消息
+   * 
+ * + * Protobuf type {@code core.GroupWeb} + */ + public static final class GroupWeb extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.GroupWeb) + GroupWebOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupWeb.newBuilder() to construct. + private GroupWeb(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GroupWeb() { + msgId_ = ""; + siteUserId_ = ""; + siteGroupId_ = ""; + webCode_ = ""; + width_ = 0; + height_ = 0; + time_ = 0L; + hrefUrl_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GroupWeb( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteGroupId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + webCode_ = s; + break; + } + case 40: { + + width_ = input.readInt32(); + break; + } + case 48: { + + height_ = input.readInt32(); + break; + } + case 56: { + + time_ = input.readInt64(); + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + hrefUrl_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupWeb_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupWeb_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupWeb.class, com.akaxin.proto.core.CoreProto.GroupWeb.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + *
+     *消息ID
+     * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + *
+     *消息ID
+     * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_GROUP_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteGroupId_; + /** + *
+     *群ID(to)
+     * 
+ * + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } + } + /** + *
+     *群ID(to)
+     * 
+ * + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WEB_CODE_FIELD_NUMBER = 4; + private volatile java.lang.Object webCode_; + /** + *
+     *统一使用web消息需要的代码内容
+     * 
+ * + * string web_code = 4; + */ + public java.lang.String getWebCode() { + java.lang.Object ref = webCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webCode_ = s; + return s; + } + } + /** + *
+     *统一使用web消息需要的代码内容
+     * 
+ * + * string web_code = 4; + */ + public com.google.protobuf.ByteString + getWebCodeBytes() { + java.lang.Object ref = webCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + webCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WIDTH_FIELD_NUMBER = 5; + private int width_; + /** + *
+     *web消息的宽度
+     * 
+ * + * int32 width = 5; + */ + public int getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 6; + private int height_; + /** + *
+     *web消息的高度
+     * 
+ * + * int32 height = 6; + */ + public int getHeight() { + return height_; + } + + public static final int TIME_FIELD_NUMBER = 7; + private long time_; + /** + *
+     *消息时间
+     * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + + public static final int HREF_URL_FIELD_NUMBER = 8; + private volatile java.lang.Object hrefUrl_; + /** + *
+     *跳转链接;如果为空则不跳转。
+     * 
+ * + * string href_url = 8; + */ + public java.lang.String getHrefUrl() { + java.lang.Object ref = hrefUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hrefUrl_ = s; + return s; + } + } + /** + *
+     *跳转链接;如果为空则不跳转。
+     * 
+ * + * string href_url = 8; + */ + public com.google.protobuf.ByteString + getHrefUrlBytes() { + java.lang.Object ref = hrefUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hrefUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteGroupId_); + } + if (!getWebCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, webCode_); + } + if (width_ != 0) { + output.writeInt32(5, width_); + } + if (height_ != 0) { + output.writeInt32(6, height_); + } + if (time_ != 0L) { + output.writeInt64(7, time_); + } + if (!getHrefUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, hrefUrl_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteGroupId_); + } + if (!getWebCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, webCode_); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, width_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, height_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, time_); + } + if (!getHrefUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, hrefUrl_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.GroupWeb)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.GroupWeb other = (com.akaxin.proto.core.CoreProto.GroupWeb) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteGroupId() + .equals(other.getSiteGroupId()); + result = result && getWebCode() + .equals(other.getWebCode()); + result = result && (getWidth() + == other.getWidth()); + result = result && (getHeight() + == other.getHeight()); + result = result && (getTime() + == other.getTime()); + result = result && getHrefUrl() + .equals(other.getHrefUrl()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteGroupId().hashCode(); + hash = (37 * hash) + WEB_CODE_FIELD_NUMBER; + hash = (53 * hash) + getWebCode().hashCode(); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + HREF_URL_FIELD_NUMBER; + hash = (53 * hash) + getHrefUrl().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.GroupWeb parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupWeb parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupWeb parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupWeb parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupWeb parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupWeb parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupWeb parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupWeb parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupWeb parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupWeb parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupWeb parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupWeb parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.GroupWeb prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *群组:内嵌web类型消息
+     * 
+ * + * Protobuf type {@code core.GroupWeb} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.GroupWeb) + com.akaxin.proto.core.CoreProto.GroupWebOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupWeb_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupWeb_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupWeb.class, com.akaxin.proto.core.CoreProto.GroupWeb.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.GroupWeb.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteGroupId_ = ""; + + webCode_ = ""; + + width_ = 0; + + height_ = 0; + + time_ = 0L; + + hrefUrl_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupWeb_descriptor; + } + + public com.akaxin.proto.core.CoreProto.GroupWeb getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.GroupWeb.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.GroupWeb build() { + com.akaxin.proto.core.CoreProto.GroupWeb result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.GroupWeb buildPartial() { + com.akaxin.proto.core.CoreProto.GroupWeb result = new com.akaxin.proto.core.CoreProto.GroupWeb(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteGroupId_ = siteGroupId_; + result.webCode_ = webCode_; + result.width_ = width_; + result.height_ = height_; + result.time_ = time_; + result.hrefUrl_ = hrefUrl_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.GroupWeb) { + return mergeFrom((com.akaxin.proto.core.CoreProto.GroupWeb)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.GroupWeb other) { + if (other == com.akaxin.proto.core.CoreProto.GroupWeb.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteGroupId().isEmpty()) { + siteGroupId_ = other.siteGroupId_; + onChanged(); + } + if (!other.getWebCode().isEmpty()) { + webCode_ = other.webCode_; + onChanged(); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (!other.getHrefUrl().isEmpty()) { + hrefUrl_ = other.hrefUrl_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.GroupWeb parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.GroupWeb) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteGroupId_ = ""; + /** + *
+       *群ID(to)
+       * 
+ * + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *群ID(to)
+       * 
+ * + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *群ID(to)
+       * 
+ * + * string site_group_id = 3; + */ + public Builder setSiteGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteGroupId_ = value; + onChanged(); + return this; + } + /** + *
+       *群ID(to)
+       * 
+ * + * string site_group_id = 3; + */ + public Builder clearSiteGroupId() { + + siteGroupId_ = getDefaultInstance().getSiteGroupId(); + onChanged(); + return this; + } + /** + *
+       *群ID(to)
+       * 
+ * + * string site_group_id = 3; + */ + public Builder setSiteGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteGroupId_ = value; + onChanged(); + return this; + } + + private java.lang.Object webCode_ = ""; + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public java.lang.String getWebCode() { + java.lang.Object ref = webCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public com.google.protobuf.ByteString + getWebCodeBytes() { + java.lang.Object ref = webCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + webCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public Builder setWebCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + webCode_ = value; + onChanged(); + return this; + } + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public Builder clearWebCode() { + + webCode_ = getDefaultInstance().getWebCode(); + onChanged(); + return this; + } + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public Builder setWebCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + webCode_ = value; + onChanged(); + return this; + } + + private int width_ ; + /** + *
+       *web消息的宽度
+       * 
+ * + * int32 width = 5; + */ + public int getWidth() { + return width_; + } + /** + *
+       *web消息的宽度
+       * 
+ * + * int32 width = 5; + */ + public Builder setWidth(int value) { + + width_ = value; + onChanged(); + return this; + } + /** + *
+       *web消息的宽度
+       * 
+ * + * int32 width = 5; + */ + public Builder clearWidth() { + + width_ = 0; + onChanged(); + return this; + } + + private int height_ ; + /** + *
+       *web消息的高度
+       * 
+ * + * int32 height = 6; + */ + public int getHeight() { + return height_; + } + /** + *
+       *web消息的高度
+       * 
+ * + * int32 height = 6; + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+       *web消息的高度
+       * 
+ * + * int32 height = 6; + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间
+       * 
+ * + * int64 time = 7; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间
+       * 
+ * + * int64 time = 7; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间
+       * 
+ * + * int64 time = 7; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object hrefUrl_ = ""; + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 8; + */ + public java.lang.String getHrefUrl() { + java.lang.Object ref = hrefUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hrefUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 8; + */ + public com.google.protobuf.ByteString + getHrefUrlBytes() { + java.lang.Object ref = hrefUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hrefUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 8; + */ + public Builder setHrefUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + hrefUrl_ = value; + onChanged(); + return this; + } + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 8; + */ + public Builder clearHrefUrl() { + + hrefUrl_ = getDefaultInstance().getHrefUrl(); + onChanged(); + return this; + } + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 8; + */ + public Builder setHrefUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + hrefUrl_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.GroupWeb) + } + + // @@protoc_insertion_point(class_scope:core.GroupWeb) + private static final com.akaxin.proto.core.CoreProto.GroupWeb DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.GroupWeb(); + } + + public static com.akaxin.proto.core.CoreProto.GroupWeb getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GroupWeb parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GroupWeb(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.GroupWeb getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface U2WebNoticeOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.U2WebNotice) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *消息ID
+     * 
+ * + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + *
+     *消息ID
+     * 
+ * + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *to
+     * 
+ * + * string site_friend_id = 3; + */ + java.lang.String getSiteFriendId(); + /** + *
+     *to
+     * 
+ * + * string site_friend_id = 3; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + + /** + *
+     *统一使用web消息需要的代码内容
+     * 
+ * + * string web_code = 4; + */ + java.lang.String getWebCode(); + /** + *
+     *统一使用web消息需要的代码内容
+     * 
+ * + * string web_code = 4; + */ + com.google.protobuf.ByteString + getWebCodeBytes(); + + /** + *
+     *消息时间
+     * 
+ * + * int64 time = 5; + */ + long getTime(); + + /** + *
+     *跳转链接;如果为空则不跳转。
+     * 
+ * + * string href_url = 6; + */ + java.lang.String getHrefUrl(); + /** + *
+     *跳转链接;如果为空则不跳转。
+     * 
+ * + * string href_url = 6; + */ + com.google.protobuf.ByteString + getHrefUrlBytes(); + + /** + *
+     *web notice消息的高度
+     * 
+ * + * int32 height = 7; + */ + int getHeight(); + } + /** + *
+   *二人WEB通知:内嵌web通知消息
+   * 
+ * + * Protobuf type {@code core.U2WebNotice} + */ + public static final class U2WebNotice extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.U2WebNotice) + U2WebNoticeOrBuilder { + private static final long serialVersionUID = 0L; + // Use U2WebNotice.newBuilder() to construct. + private U2WebNotice(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private U2WebNotice() { + msgId_ = ""; + siteUserId_ = ""; + siteFriendId_ = ""; + webCode_ = ""; + time_ = 0L; + hrefUrl_ = ""; + height_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private U2WebNotice( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + webCode_ = s; + break; + } + case 40: { + + time_ = input.readInt64(); + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + hrefUrl_ = s; + break; + } + case 56: { + + height_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2WebNotice_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2WebNotice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.U2WebNotice.class, com.akaxin.proto.core.CoreProto.U2WebNotice.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + *
+     *消息ID
+     * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + *
+     *消息ID
+     * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteFriendId_; + /** + *
+     *to
+     * 
+ * + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + *
+     *to
+     * 
+ * + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WEB_CODE_FIELD_NUMBER = 4; + private volatile java.lang.Object webCode_; + /** + *
+     *统一使用web消息需要的代码内容
+     * 
+ * + * string web_code = 4; + */ + public java.lang.String getWebCode() { + java.lang.Object ref = webCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webCode_ = s; + return s; + } + } + /** + *
+     *统一使用web消息需要的代码内容
+     * 
+ * + * string web_code = 4; + */ + public com.google.protobuf.ByteString + getWebCodeBytes() { + java.lang.Object ref = webCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + webCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 5; + private long time_; + /** + *
+     *消息时间
+     * 
+ * + * int64 time = 5; + */ + public long getTime() { + return time_; + } + + public static final int HREF_URL_FIELD_NUMBER = 6; + private volatile java.lang.Object hrefUrl_; + /** + *
+     *跳转链接;如果为空则不跳转。
+     * 
+ * + * string href_url = 6; + */ + public java.lang.String getHrefUrl() { + java.lang.Object ref = hrefUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hrefUrl_ = s; + return s; + } + } + /** + *
+     *跳转链接;如果为空则不跳转。
+     * 
+ * + * string href_url = 6; + */ + public com.google.protobuf.ByteString + getHrefUrlBytes() { + java.lang.Object ref = hrefUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hrefUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEIGHT_FIELD_NUMBER = 7; + private int height_; + /** + *
+     *web notice消息的高度
+     * 
+ * + * int32 height = 7; + */ + public int getHeight() { + return height_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteFriendId_); + } + if (!getWebCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, webCode_); + } + if (time_ != 0L) { + output.writeInt64(5, time_); + } + if (!getHrefUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, hrefUrl_); + } + if (height_ != 0) { + output.writeInt32(7, height_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteFriendId_); + } + if (!getWebCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, webCode_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, time_); + } + if (!getHrefUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, hrefUrl_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, height_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.U2WebNotice)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.U2WebNotice other = (com.akaxin.proto.core.CoreProto.U2WebNotice) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && getWebCode() + .equals(other.getWebCode()); + result = result && (getTime() + == other.getTime()); + result = result && getHrefUrl() + .equals(other.getHrefUrl()); + result = result && (getHeight() + == other.getHeight()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (37 * hash) + WEB_CODE_FIELD_NUMBER; + hash = (53 * hash) + getWebCode().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + HREF_URL_FIELD_NUMBER; + hash = (53 * hash) + getHrefUrl().hashCode(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.U2WebNotice parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.U2WebNotice parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2WebNotice parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.U2WebNotice parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2WebNotice parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.U2WebNotice parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2WebNotice parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.U2WebNotice parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2WebNotice parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.U2WebNotice parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.U2WebNotice parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.U2WebNotice parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.U2WebNotice prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *二人WEB通知:内嵌web通知消息
+     * 
+ * + * Protobuf type {@code core.U2WebNotice} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.U2WebNotice) + com.akaxin.proto.core.CoreProto.U2WebNoticeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2WebNotice_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2WebNotice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.U2WebNotice.class, com.akaxin.proto.core.CoreProto.U2WebNotice.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.U2WebNotice.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteFriendId_ = ""; + + webCode_ = ""; + + time_ = 0L; + + hrefUrl_ = ""; + + height_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_U2WebNotice_descriptor; + } + + public com.akaxin.proto.core.CoreProto.U2WebNotice getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.U2WebNotice.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.U2WebNotice build() { + com.akaxin.proto.core.CoreProto.U2WebNotice result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.U2WebNotice buildPartial() { + com.akaxin.proto.core.CoreProto.U2WebNotice result = new com.akaxin.proto.core.CoreProto.U2WebNotice(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteFriendId_ = siteFriendId_; + result.webCode_ = webCode_; + result.time_ = time_; + result.hrefUrl_ = hrefUrl_; + result.height_ = height_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.U2WebNotice) { + return mergeFrom((com.akaxin.proto.core.CoreProto.U2WebNotice)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.U2WebNotice other) { + if (other == com.akaxin.proto.core.CoreProto.U2WebNotice.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + if (!other.getWebCode().isEmpty()) { + webCode_ = other.webCode_; + onChanged(); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (!other.getHrefUrl().isEmpty()) { + hrefUrl_ = other.hrefUrl_; + onChanged(); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.U2WebNotice parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.U2WebNotice) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + *
+       *to
+       * 
+ * + * string site_friend_id = 3; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + + private java.lang.Object webCode_ = ""; + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public java.lang.String getWebCode() { + java.lang.Object ref = webCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public com.google.protobuf.ByteString + getWebCodeBytes() { + java.lang.Object ref = webCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + webCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public Builder setWebCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + webCode_ = value; + onChanged(); + return this; + } + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public Builder clearWebCode() { + + webCode_ = getDefaultInstance().getWebCode(); + onChanged(); + return this; + } + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public Builder setWebCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + webCode_ = value; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间
+       * 
+ * + * int64 time = 5; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间
+       * 
+ * + * int64 time = 5; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间
+       * 
+ * + * int64 time = 5; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object hrefUrl_ = ""; + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 6; + */ + public java.lang.String getHrefUrl() { + java.lang.Object ref = hrefUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hrefUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 6; + */ + public com.google.protobuf.ByteString + getHrefUrlBytes() { + java.lang.Object ref = hrefUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hrefUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 6; + */ + public Builder setHrefUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + hrefUrl_ = value; + onChanged(); + return this; + } + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 6; + */ + public Builder clearHrefUrl() { + + hrefUrl_ = getDefaultInstance().getHrefUrl(); + onChanged(); + return this; + } + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 6; + */ + public Builder setHrefUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + hrefUrl_ = value; + onChanged(); + return this; + } + + private int height_ ; + /** + *
+       *web notice消息的高度
+       * 
+ * + * int32 height = 7; + */ + public int getHeight() { + return height_; + } + /** + *
+       *web notice消息的高度
+       * 
+ * + * int32 height = 7; + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+       *web notice消息的高度
+       * 
+ * + * int32 height = 7; + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.U2WebNotice) + } + + // @@protoc_insertion_point(class_scope:core.U2WebNotice) + private static final com.akaxin.proto.core.CoreProto.U2WebNotice DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.U2WebNotice(); + } + + public static com.akaxin.proto.core.CoreProto.U2WebNotice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public U2WebNotice parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new U2WebNotice(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.U2WebNotice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GroupWebNoticeOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.GroupWebNotice) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *消息ID
+     * 
+ * + * string msg_id = 1; + */ + java.lang.String getMsgId(); + /** + *
+     *消息ID
+     * 
+ * + * string msg_id = 1; + */ + com.google.protobuf.ByteString + getMsgIdBytes(); + + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *群ID(to)
+     * 
+ * + * string site_group_id = 3; + */ + java.lang.String getSiteGroupId(); + /** + *
+     *群ID(to)
+     * 
+ * + * string site_group_id = 3; + */ + com.google.protobuf.ByteString + getSiteGroupIdBytes(); + + /** + *
+     *统一使用web消息需要的代码内容
+     * 
+ * + * string web_code = 4; + */ + java.lang.String getWebCode(); + /** + *
+     *统一使用web消息需要的代码内容
+     * 
+ * + * string web_code = 4; + */ + com.google.protobuf.ByteString + getWebCodeBytes(); + + /** + *
+     *消息时间
+     * 
+ * + * int64 time = 5; + */ + long getTime(); + + /** + *
+     *跳转链接;如果为空则不跳转。
+     * 
+ * + * string href_url = 6; + */ + java.lang.String getHrefUrl(); + /** + *
+     *跳转链接;如果为空则不跳转。
+     * 
+ * + * string href_url = 6; + */ + com.google.protobuf.ByteString + getHrefUrlBytes(); + + /** + *
+     *web notice消息的高度
+     * 
+ * + * int32 height = 7; + */ + int getHeight(); + } + /** + *
+   *群组WEB通知:内嵌web通知消息
+   * 
+ * + * Protobuf type {@code core.GroupWebNotice} + */ + public static final class GroupWebNotice extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.GroupWebNotice) + GroupWebNoticeOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupWebNotice.newBuilder() to construct. + private GroupWebNotice(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GroupWebNotice() { + msgId_ = ""; + siteUserId_ = ""; + siteGroupId_ = ""; + webCode_ = ""; + time_ = 0L; + hrefUrl_ = ""; + height_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GroupWebNotice( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msgId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteGroupId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + webCode_ = s; + break; + } + case 40: { + + time_ = input.readInt64(); + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + hrefUrl_ = s; + break; + } + case 56: { + + height_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupWebNotice_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupWebNotice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupWebNotice.class, com.akaxin.proto.core.CoreProto.GroupWebNotice.Builder.class); + } + + public static final int MSG_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object msgId_; + /** + *
+     *消息ID
+     * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } + } + /** + *
+     *消息ID
+     * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *from
+     * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_GROUP_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteGroupId_; + /** + *
+     *群ID(to)
+     * 
+ * + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } + } + /** + *
+     *群ID(to)
+     * 
+ * + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WEB_CODE_FIELD_NUMBER = 4; + private volatile java.lang.Object webCode_; + /** + *
+     *统一使用web消息需要的代码内容
+     * 
+ * + * string web_code = 4; + */ + public java.lang.String getWebCode() { + java.lang.Object ref = webCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webCode_ = s; + return s; + } + } + /** + *
+     *统一使用web消息需要的代码内容
+     * 
+ * + * string web_code = 4; + */ + public com.google.protobuf.ByteString + getWebCodeBytes() { + java.lang.Object ref = webCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + webCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 5; + private long time_; + /** + *
+     *消息时间
+     * 
+ * + * int64 time = 5; + */ + public long getTime() { + return time_; + } + + public static final int HREF_URL_FIELD_NUMBER = 6; + private volatile java.lang.Object hrefUrl_; + /** + *
+     *跳转链接;如果为空则不跳转。
+     * 
+ * + * string href_url = 6; + */ + public java.lang.String getHrefUrl() { + java.lang.Object ref = hrefUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hrefUrl_ = s; + return s; + } + } + /** + *
+     *跳转链接;如果为空则不跳转。
+     * 
+ * + * string href_url = 6; + */ + public com.google.protobuf.ByteString + getHrefUrlBytes() { + java.lang.Object ref = hrefUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hrefUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEIGHT_FIELD_NUMBER = 7; + private int height_; + /** + *
+     *web notice消息的高度
+     * 
+ * + * int32 height = 7; + */ + public int getHeight() { + return height_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMsgIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteGroupId_); + } + if (!getWebCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, webCode_); + } + if (time_ != 0L) { + output.writeInt64(5, time_); + } + if (!getHrefUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, hrefUrl_); + } + if (height_ != 0) { + output.writeInt32(7, height_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMsgIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, msgId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteGroupId_); + } + if (!getWebCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, webCode_); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, time_); + } + if (!getHrefUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, hrefUrl_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, height_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.CoreProto.GroupWebNotice)) { + return super.equals(obj); + } + com.akaxin.proto.core.CoreProto.GroupWebNotice other = (com.akaxin.proto.core.CoreProto.GroupWebNotice) obj; + + boolean result = true; + result = result && getMsgId() + .equals(other.getMsgId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteGroupId() + .equals(other.getSiteGroupId()); + result = result && getWebCode() + .equals(other.getWebCode()); + result = result && (getTime() + == other.getTime()); + result = result && getHrefUrl() + .equals(other.getHrefUrl()); + result = result && (getHeight() + == other.getHeight()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMsgId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteGroupId().hashCode(); + hash = (37 * hash) + WEB_CODE_FIELD_NUMBER; + hash = (53 * hash) + getWebCode().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + HREF_URL_FIELD_NUMBER; + hash = (53 * hash) + getHrefUrl().hashCode(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.CoreProto.GroupWebNotice parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupWebNotice parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupWebNotice parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupWebNotice parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupWebNotice parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.CoreProto.GroupWebNotice parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupWebNotice parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupWebNotice parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupWebNotice parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupWebNotice parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.CoreProto.GroupWebNotice parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.CoreProto.GroupWebNotice parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.CoreProto.GroupWebNotice prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *群组WEB通知:内嵌web通知消息
+     * 
+ * + * Protobuf type {@code core.GroupWebNotice} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.GroupWebNotice) + com.akaxin.proto.core.CoreProto.GroupWebNoticeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupWebNotice_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupWebNotice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.CoreProto.GroupWebNotice.class, com.akaxin.proto.core.CoreProto.GroupWebNotice.Builder.class); + } + + // Construct using com.akaxin.proto.core.CoreProto.GroupWebNotice.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + msgId_ = ""; + + siteUserId_ = ""; + + siteGroupId_ = ""; + + webCode_ = ""; + + time_ = 0L; + + hrefUrl_ = ""; + + height_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.CoreProto.internal_static_core_GroupWebNotice_descriptor; + } + + public com.akaxin.proto.core.CoreProto.GroupWebNotice getDefaultInstanceForType() { + return com.akaxin.proto.core.CoreProto.GroupWebNotice.getDefaultInstance(); + } + + public com.akaxin.proto.core.CoreProto.GroupWebNotice build() { + com.akaxin.proto.core.CoreProto.GroupWebNotice result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.CoreProto.GroupWebNotice buildPartial() { + com.akaxin.proto.core.CoreProto.GroupWebNotice result = new com.akaxin.proto.core.CoreProto.GroupWebNotice(this); + result.msgId_ = msgId_; + result.siteUserId_ = siteUserId_; + result.siteGroupId_ = siteGroupId_; + result.webCode_ = webCode_; + result.time_ = time_; + result.hrefUrl_ = hrefUrl_; + result.height_ = height_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.CoreProto.GroupWebNotice) { + return mergeFrom((com.akaxin.proto.core.CoreProto.GroupWebNotice)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.CoreProto.GroupWebNotice other) { + if (other == com.akaxin.proto.core.CoreProto.GroupWebNotice.getDefaultInstance()) return this; + if (!other.getMsgId().isEmpty()) { + msgId_ = other.msgId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteGroupId().isEmpty()) { + siteGroupId_ = other.siteGroupId_; + onChanged(); + } + if (!other.getWebCode().isEmpty()) { + webCode_ = other.webCode_; + onChanged(); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (!other.getHrefUrl().isEmpty()) { + hrefUrl_ = other.hrefUrl_; + onChanged(); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.CoreProto.GroupWebNotice parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.CoreProto.GroupWebNotice) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object msgId_ = ""; + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public java.lang.String getMsgId() { + java.lang.Object ref = msgId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public com.google.protobuf.ByteString + getMsgIdBytes() { + java.lang.Object ref = msgId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + msgId_ = value; + onChanged(); + return this; + } + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public Builder clearMsgId() { + + msgId_ = getDefaultInstance().getMsgId(); + onChanged(); + return this; + } + /** + *
+       *消息ID
+       * 
+ * + * string msg_id = 1; + */ + public Builder setMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msgId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *from
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteGroupId_ = ""; + /** + *
+       *群ID(to)
+       * 
+ * + * string site_group_id = 3; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *群ID(to)
+       * 
+ * + * string site_group_id = 3; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *群ID(to)
+       * 
+ * + * string site_group_id = 3; + */ + public Builder setSiteGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteGroupId_ = value; + onChanged(); + return this; + } + /** + *
+       *群ID(to)
+       * 
+ * + * string site_group_id = 3; + */ + public Builder clearSiteGroupId() { + + siteGroupId_ = getDefaultInstance().getSiteGroupId(); + onChanged(); + return this; + } + /** + *
+       *群ID(to)
+       * 
+ * + * string site_group_id = 3; + */ + public Builder setSiteGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteGroupId_ = value; + onChanged(); + return this; + } + + private java.lang.Object webCode_ = ""; + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public java.lang.String getWebCode() { + java.lang.Object ref = webCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public com.google.protobuf.ByteString + getWebCodeBytes() { + java.lang.Object ref = webCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + webCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public Builder setWebCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + webCode_ = value; + onChanged(); + return this; + } + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public Builder clearWebCode() { + + webCode_ = getDefaultInstance().getWebCode(); + onChanged(); + return this; + } + /** + *
+       *统一使用web消息需要的代码内容
+       * 
+ * + * string web_code = 4; + */ + public Builder setWebCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + webCode_ = value; + onChanged(); + return this; + } + + private long time_ ; + /** + *
+       *消息时间
+       * 
+ * + * int64 time = 5; + */ + public long getTime() { + return time_; + } + /** + *
+       *消息时间
+       * 
+ * + * int64 time = 5; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       *消息时间
+       * 
+ * + * int64 time = 5; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object hrefUrl_ = ""; + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 6; + */ + public java.lang.String getHrefUrl() { + java.lang.Object ref = hrefUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hrefUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 6; + */ + public com.google.protobuf.ByteString + getHrefUrlBytes() { + java.lang.Object ref = hrefUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hrefUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 6; + */ + public Builder setHrefUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + hrefUrl_ = value; + onChanged(); + return this; + } + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 6; + */ + public Builder clearHrefUrl() { + + hrefUrl_ = getDefaultInstance().getHrefUrl(); + onChanged(); + return this; + } + /** + *
+       *跳转链接;如果为空则不跳转。
+       * 
+ * + * string href_url = 6; + */ + public Builder setHrefUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + hrefUrl_ = value; + onChanged(); + return this; + } + + private int height_ ; + /** + *
+       *web notice消息的高度
+       * 
+ * + * int32 height = 7; + */ + public int getHeight() { + return height_; + } + /** + *
+       *web notice消息的高度
+       * 
+ * + * int32 height = 7; + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+       *web notice消息的高度
+       * 
+ * + * int32 height = 7; + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.GroupWebNotice) + } + + // @@protoc_insertion_point(class_scope:core.GroupWebNotice) + private static final com.akaxin.proto.core.CoreProto.GroupWebNotice DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.CoreProto.GroupWebNotice(); + } + + public static com.akaxin.proto.core.CoreProto.GroupWebNotice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GroupWebNotice parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GroupWebNotice(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.CoreProto.GroupWebNotice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_ErrorInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_ErrorInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_NoneResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_NoneResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_TransportPackageData_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_TransportPackageData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_TransportPackageData_HeaderEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_TransportPackageData_HeaderEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_MsgStatus_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_MsgStatus_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_MsgText_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_MsgText_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_MsgSecretText_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_MsgSecretText_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_GroupText_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_GroupText_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_GroupSecretText_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_GroupSecretText_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_MsgImage_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_MsgImage_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_MsgSecretImage_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_MsgSecretImage_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_GroupImage_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_GroupImage_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_GroupSecretImage_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_GroupSecretImage_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_MsgVoice_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_MsgVoice_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_MsgSecretVoice_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_MsgSecretVoice_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_GroupVoice_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_GroupVoice_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_GroupSecretVoice_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_GroupSecretVoice_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_U2Map_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_U2Map_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_U2SecretMap_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_U2SecretMap_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_GroupMap_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_GroupMap_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_GroupSecretMap_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_GroupSecretMap_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_U2MsgNotice_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_U2MsgNotice_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_GroupMsgNotice_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_GroupMsgNotice_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_U2Recall_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_U2Recall_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_GroupRecall_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_GroupRecall_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_U2Web_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_U2Web_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_GroupWeb_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_GroupWeb_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_U2WebNotice_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_U2WebNotice_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_GroupWebNotice_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_GroupWebNotice_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\017core/core.proto\022\004core\"\'\n\tErrorInfo\022\014\n\004" + + "code\030\001 \001(\t\022\014\n\004info\030\002 \001(\t\"\016\n\014NoneResponse" + + "\"\251\001\n\024TransportPackageData\022\034\n\003err\030\001 \001(\0132\017" + + ".core.ErrorInfo\022\014\n\004data\030\002 \001(\014\0226\n\006header\030" + + "\003 \003(\0132&.core.TransportPackageData.Header" + + "Entry\032-\n\013HeaderEntry\022\013\n\003key\030\001 \001(\005\022\r\n\005val" + + "ue\030\002 \001(\t:\0028\001\"]\n\tMsgStatus\022\016\n\006msg_id\030\001 \001(" + + "\t\022\022\n\nmsg_status\030\002 \001(\005\022\027\n\017msg_server_time" + + "\030\003 \001(\003\022\023\n\013msg_pointer\030\004 \001(\005\"c\n\007MsgText\022\016" + + "\n\006msg_id\030\001 \001(\t\022\024\n\014site_user_id\030\002 \001(\t\022\026\n\016", + "site_friend_id\030\003 \001(\t\022\014\n\004text\030\004 \001(\014\022\014\n\004ti" + + "me\030\005 \001(\003\"\226\001\n\rMsgSecretText\022\016\n\006msg_id\030\001 \001" + + "(\t\022\024\n\014site_user_id\030\002 \001(\t\022\026\n\016site_friend_" + + "id\030\003 \001(\t\022\014\n\004text\030\004 \001(\014\022\025\n\rbase64_ts_key\030" + + "\005 \001(\t\022\024\n\014to_device_id\030\006 \001(\t\022\014\n\004time\030\007 \001(" + + "\003\"}\n\tGroupText\022\016\n\006msg_id\030\001 \001(\t\022\024\n\014site_u" + + "ser_id\030\002 \001(\t\022\025\n\rsite_group_id\030\003 \001(\t\022\014\n\004t" + + "ext\030\004 \001(\014\022\014\n\004time\030\005 \001(\003\022\027\n\017at_site_user_" + + "id\030\006 \001(\t\"\227\001\n\017GroupSecretText\022\016\n\006msg_id\030\001" + + " \001(\t\022\024\n\014site_user_id\030\002 \001(\t\022\025\n\rsite_group", + "_id\030\003 \001(\t\022\014\n\004text\030\004 \001(\014\022\025\n\rbase64_ts_key" + + "\030\005 \001(\t\022\024\n\014to_device_id\030\006 \001(\t\022\014\n\004time\030\007 \001" + + "(\003\"g\n\010MsgImage\022\016\n\006msg_id\030\001 \001(\t\022\024\n\014site_u" + + "ser_id\030\002 \001(\t\022\026\n\016site_friend_id\030\003 \001(\t\022\017\n\007" + + "imageId\030\004 \001(\t\022\014\n\004time\030\007 \001(\003\"\232\001\n\016MsgSecre" + + "tImage\022\016\n\006msg_id\030\001 \001(\t\022\024\n\014site_user_id\030\002" + + " \001(\t\022\026\n\016site_friend_id\030\003 \001(\t\022\017\n\007imageId\030" + + "\004 \001(\t\022\025\n\rbase64_ts_key\030\005 \001(\t\022\024\n\014to_devic" + + "e_id\030\006 \001(\t\022\014\n\004time\030\007 \001(\003\"h\n\nGroupImage\022\016" + + "\n\006msg_id\030\001 \001(\t\022\024\n\014site_user_id\030\002 \001(\t\022\025\n\r", + "site_group_id\030\003 \001(\t\022\017\n\007imageId\030\004 \001(\t\022\014\n\004" + + "time\030\007 \001(\003\"\233\001\n\020GroupSecretImage\022\016\n\006msg_i" + + "d\030\001 \001(\t\022\024\n\014site_user_id\030\002 \001(\t\022\025\n\rsite_gr" + + "oup_id\030\003 \001(\t\022\017\n\007imageId\030\004 \001(\t\022\025\n\rbase64_" + + "ts_key\030\005 \001(\t\022\024\n\014to_device_id\030\006 \001(\t\022\014\n\004ti" + + "me\030\007 \001(\003\"g\n\010MsgVoice\022\016\n\006msg_id\030\001 \001(\t\022\024\n\014" + + "site_user_id\030\002 \001(\t\022\026\n\016site_friend_id\030\003 \001" + + "(\t\022\017\n\007voiceId\030\004 \001(\t\022\014\n\004time\030\007 \001(\003\"\232\001\n\016Ms" + + "gSecretVoice\022\016\n\006msg_id\030\001 \001(\t\022\024\n\014site_use" + + "r_id\030\002 \001(\t\022\026\n\016site_friend_id\030\003 \001(\t\022\017\n\007vo", + "iceId\030\004 \001(\t\022\025\n\rbase64_ts_key\030\005 \001(\t\022\024\n\014to" + + "_device_id\030\006 \001(\t\022\014\n\004time\030\007 \001(\003\"h\n\nGroupV" + + "oice\022\016\n\006msg_id\030\001 \001(\t\022\024\n\014site_user_id\030\002 \001" + + "(\t\022\025\n\rsite_group_id\030\003 \001(\t\022\017\n\007voiceId\030\004 \001" + + "(\t\022\014\n\004time\030\007 \001(\003\"\233\001\n\020GroupSecretVoice\022\016\n" + + "\006msg_id\030\001 \001(\t\022\024\n\014site_user_id\030\002 \001(\t\022\025\n\rs" + + "ite_group_id\030\003 \001(\t\022\017\n\007voiceId\030\004 \001(\t\022\025\n\rb" + + "ase64_ts_key\030\005 \001(\t\022\024\n\014to_device_id\030\006 \001(\t" + + "\022\014\n\004time\030\007 \001(\003\"m\n\005U2Map\022\016\n\006msg_id\030\001 \001(\t\022" + + "\024\n\014site_user_id\030\002 \001(\t\022\026\n\016site_friend_id\030", + "\003 \001(\t\022\013\n\003lng\030\004 \001(\t\022\013\n\003lat\030\005 \001(\t\022\014\n\004time\030" + + "\006 \001(\003\"\256\001\n\013U2SecretMap\022\016\n\006msg_id\030\001 \001(\t\022\024\n" + + "\014site_user_id\030\002 \001(\t\022\026\n\016site_friend_id\030\003 " + + "\001(\t\022\022\n\nbase64_lng\030\004 \001(\t\022\022\n\nbase64_lat\030\005 " + + "\001(\t\022\025\n\rbase64_ts_key\030\006 \001(\t\022\024\n\014to_device_" + + "id\030\007 \001(\t\022\014\n\004time\030\010 \001(\003\"o\n\010GroupMap\022\016\n\006ms" + + "g_id\030\001 \001(\t\022\024\n\014site_user_id\030\002 \001(\t\022\025\n\rsite" + + "_group_id\030\003 \001(\t\022\013\n\003lng\030\004 \001(\t\022\013\n\003lat\030\005 \001(" + + "\t\022\014\n\004time\030\006 \001(\003\"\260\001\n\016GroupSecretMap\022\016\n\006ms" + + "g_id\030\001 \001(\t\022\024\n\014site_user_id\030\002 \001(\t\022\025\n\rsite", + "_group_id\030\003 \001(\t\022\022\n\nbase64_lng\030\004 \001(\t\022\022\n\nb" + + "ase64_lat\030\005 \001(\t\022\025\n\rbase64_ts_key\030\006 \001(\t\022\024" + + "\n\014to_device_id\030\007 \001(\t\022\014\n\004time\030\010 \001(\003\"g\n\013U2" + + "MsgNotice\022\024\n\014site_user_id\030\001 \001(\t\022\026\n\016site_" + + "friend_id\030\002 \001(\t\022\014\n\004text\030\003 \001(\014\022\014\n\004time\030\004 " + + "\001(\003\022\016\n\006msg_id\030\005 \001(\t\"i\n\016GroupMsgNotice\022\024\n" + + "\014site_user_id\030\001 \001(\t\022\025\n\rsite_group_id\030\002 \001" + + "(\t\022\014\n\004text\030\003 \001(\014\022\014\n\004time\030\004 \001(\003\022\016\n\006msg_id" + + "\030\005 \001(\t\"m\n\010U2Recall\022\016\n\006msg_id\030\001 \001(\t\022\024\n\014si" + + "te_user_id\030\002 \001(\t\022\026\n\016site_friend_id\030\003 \001(\t", + "\022\025\n\rrecall_msg_id\030\004 \001(\t\022\014\n\004time\030\005 \001(\003\"o\n" + + "\013GroupRecall\022\016\n\006msg_id\030\001 \001(\t\022\024\n\014site_use" + + "r_id\030\002 \001(\t\022\025\n\rsite_group_id\030\003 \001(\t\022\025\n\rrec" + + "all_msg_id\030\004 \001(\t\022\014\n\004time\030\005 \001(\003\"\226\001\n\005U2Web" + + "\022\016\n\006msg_id\030\001 \001(\t\022\024\n\014site_user_id\030\002 \001(\t\022\026" + + "\n\016site_friend_id\030\003 \001(\t\022\020\n\010web_code\030\004 \001(\t" + + "\022\r\n\005width\030\005 \001(\005\022\016\n\006height\030\006 \001(\005\022\014\n\004time\030" + + "\007 \001(\003\022\020\n\010href_url\030\010 \001(\t\"\230\001\n\010GroupWeb\022\016\n\006" + + "msg_id\030\001 \001(\t\022\024\n\014site_user_id\030\002 \001(\t\022\025\n\rsi" + + "te_group_id\030\003 \001(\t\022\020\n\010web_code\030\004 \001(\t\022\r\n\005w", + "idth\030\005 \001(\005\022\016\n\006height\030\006 \001(\005\022\014\n\004time\030\007 \001(\003" + + "\022\020\n\010href_url\030\010 \001(\t\"\215\001\n\013U2WebNotice\022\016\n\006ms" + + "g_id\030\001 \001(\t\022\024\n\014site_user_id\030\002 \001(\t\022\026\n\016site" + + "_friend_id\030\003 \001(\t\022\020\n\010web_code\030\004 \001(\t\022\014\n\004ti" + + "me\030\005 \001(\003\022\020\n\010href_url\030\006 \001(\t\022\016\n\006height\030\007 \001" + + "(\005\"\217\001\n\016GroupWebNotice\022\016\n\006msg_id\030\001 \001(\t\022\024\n" + + "\014site_user_id\030\002 \001(\t\022\025\n\rsite_group_id\030\003 \001" + + "(\t\022\020\n\010web_code\030\004 \001(\t\022\014\n\004time\030\005 \001(\003\022\020\n\010hr" + + "ef_url\030\006 \001(\t\022\016\n\006height\030\007 \001(\005*\204\003\n\tHeaderK" + + "ey\022\031\n\025CLIENT_SOCKET_VERSION\020\000\022!\n\035CLIENT_", + "SOCKET_SITE_SESSION_ID\020\001\022%\n!CLIENT_SOCKE" + + "T_PLATFORM_SESSION_ID\020\002\022\033\n\027CLIENT_SOCKET" + + "_DEVICE_ID\020\003\022\032\n\026CLIENT_SOCKET_LANGUAGE\020\004" + + "\022\026\n\022CLIENT_SOCKET_TYPE\020\005\022\033\n\026CLIENT_REQUE" + + "ST_REFERER\020\365\003\022\037\n\032CLIENT_REQUEST_SERVER_H" + + "OST\020\366\003\022\037\n\032CLIENT_REQUEST_SERVER_PORT\020\367\003\022" + + "\030\n\023SITE_SERVER_VERSION\020\351\007\022\025\n\020SITE_SERVER" + + "_HOST\020\352\007\022\025\n\020SITE_SERVER_PORT\020\353\007\022\032\n\025PLUGI" + + "N_CLIENT_REFERER\020\271\027*\275\003\n\007MsgType\022\n\n\006NOTIC" + + "E\020\000\022\016\n\nMSG_STATUS\020\001\022\010\n\004TEXT\020\003\022\017\n\013SECRET_", + "TEXT\020\004\022\016\n\nGROUP_TEXT\020\005\022\025\n\021GROUP_SECRET_T" + + "EXT\020\006\022\t\n\005IMAGE\020\007\022\020\n\014SECRET_IMAGE\020\010\022\017\n\013GR" + + "OUP_IMAGE\020\t\022\026\n\022GROUP_SECRET_IMAGE\020\n\022\t\n\005V" + + "OICE\020\013\022\020\n\014SECRET_VOICE\020\014\022\017\n\013GROUP_VOICE\020" + + "\r\022\026\n\022GROUP_SECRET_VOICE\020\016\022\n\n\006U2_MAP\020\017\022\021\n" + + "\rU2_SECRET_MAP\020\020\022\r\n\tGROUP_MAP\020\021\022\024\n\020GROUP" + + "_SECRET_MAP\020\022\022\r\n\tU2_NOTICE\020\023\022\020\n\014GROUP_NO" + + "TICE\020\024\022\r\n\tU2_RECALL\020\025\022\020\n\014GROUP_RECALL\020\026\022" + + "\n\n\006U2_WEB\020\027\022\r\n\tGROUP_WEB\020\030\022\021\n\rU2_WEB_NOT" + + "ICE\020\031\022\024\n\020GROUP_WEB_NOTICE\020\032B\"\n\025com.akaxi", + "n.proto.coreB\tCoreProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_core_ErrorInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_core_ErrorInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_ErrorInfo_descriptor, + new java.lang.String[] { "Code", "Info", }); + internal_static_core_NoneResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_core_NoneResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_NoneResponse_descriptor, + new java.lang.String[] { }); + internal_static_core_TransportPackageData_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_core_TransportPackageData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_TransportPackageData_descriptor, + new java.lang.String[] { "Err", "Data", "Header", }); + internal_static_core_TransportPackageData_HeaderEntry_descriptor = + internal_static_core_TransportPackageData_descriptor.getNestedTypes().get(0); + internal_static_core_TransportPackageData_HeaderEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_TransportPackageData_HeaderEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_core_MsgStatus_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_core_MsgStatus_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_MsgStatus_descriptor, + new java.lang.String[] { "MsgId", "MsgStatus", "MsgServerTime", "MsgPointer", }); + internal_static_core_MsgText_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_core_MsgText_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_MsgText_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteFriendId", "Text", "Time", }); + internal_static_core_MsgSecretText_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_core_MsgSecretText_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_MsgSecretText_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteFriendId", "Text", "Base64TsKey", "ToDeviceId", "Time", }); + internal_static_core_GroupText_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_core_GroupText_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_GroupText_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteGroupId", "Text", "Time", "AtSiteUserId", }); + internal_static_core_GroupSecretText_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_core_GroupSecretText_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_GroupSecretText_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteGroupId", "Text", "Base64TsKey", "ToDeviceId", "Time", }); + internal_static_core_MsgImage_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_core_MsgImage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_MsgImage_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteFriendId", "ImageId", "Time", }); + internal_static_core_MsgSecretImage_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_core_MsgSecretImage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_MsgSecretImage_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteFriendId", "ImageId", "Base64TsKey", "ToDeviceId", "Time", }); + internal_static_core_GroupImage_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_core_GroupImage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_GroupImage_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteGroupId", "ImageId", "Time", }); + internal_static_core_GroupSecretImage_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_core_GroupSecretImage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_GroupSecretImage_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteGroupId", "ImageId", "Base64TsKey", "ToDeviceId", "Time", }); + internal_static_core_MsgVoice_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_core_MsgVoice_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_MsgVoice_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteFriendId", "VoiceId", "Time", }); + internal_static_core_MsgSecretVoice_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_core_MsgSecretVoice_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_MsgSecretVoice_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteFriendId", "VoiceId", "Base64TsKey", "ToDeviceId", "Time", }); + internal_static_core_GroupVoice_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_core_GroupVoice_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_GroupVoice_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteGroupId", "VoiceId", "Time", }); + internal_static_core_GroupSecretVoice_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_core_GroupSecretVoice_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_GroupSecretVoice_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteGroupId", "VoiceId", "Base64TsKey", "ToDeviceId", "Time", }); + internal_static_core_U2Map_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_core_U2Map_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_U2Map_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteFriendId", "Lng", "Lat", "Time", }); + internal_static_core_U2SecretMap_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_core_U2SecretMap_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_U2SecretMap_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteFriendId", "Base64Lng", "Base64Lat", "Base64TsKey", "ToDeviceId", "Time", }); + internal_static_core_GroupMap_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_core_GroupMap_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_GroupMap_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteGroupId", "Lng", "Lat", "Time", }); + internal_static_core_GroupSecretMap_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_core_GroupSecretMap_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_GroupSecretMap_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteGroupId", "Base64Lng", "Base64Lat", "Base64TsKey", "ToDeviceId", "Time", }); + internal_static_core_U2MsgNotice_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_core_U2MsgNotice_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_U2MsgNotice_descriptor, + new java.lang.String[] { "SiteUserId", "SiteFriendId", "Text", "Time", "MsgId", }); + internal_static_core_GroupMsgNotice_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_core_GroupMsgNotice_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_GroupMsgNotice_descriptor, + new java.lang.String[] { "SiteUserId", "SiteGroupId", "Text", "Time", "MsgId", }); + internal_static_core_U2Recall_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_core_U2Recall_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_U2Recall_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteFriendId", "RecallMsgId", "Time", }); + internal_static_core_GroupRecall_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_core_GroupRecall_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_GroupRecall_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteGroupId", "RecallMsgId", "Time", }); + internal_static_core_U2Web_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_core_U2Web_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_U2Web_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteFriendId", "WebCode", "Width", "Height", "Time", "HrefUrl", }); + internal_static_core_GroupWeb_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_core_GroupWeb_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_GroupWeb_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteGroupId", "WebCode", "Width", "Height", "Time", "HrefUrl", }); + internal_static_core_U2WebNotice_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_core_U2WebNotice_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_U2WebNotice_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteFriendId", "WebCode", "Time", "HrefUrl", "Height", }); + internal_static_core_GroupWebNotice_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_core_GroupWebNotice_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_GroupWebNotice_descriptor, + new java.lang.String[] { "MsgId", "SiteUserId", "SiteGroupId", "WebCode", "Time", "HrefUrl", "Height", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/core/DeviceProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/DeviceProto.java new file mode 100755 index 0000000..b04e33e --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/DeviceProto.java @@ -0,0 +1,1808 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/device.proto + +package com.akaxin.proto.core; + +public final class DeviceProto { + private DeviceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface DeviceProfileOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.DeviceProfile) + com.google.protobuf.MessageOrBuilder { + + /** + * string device_id = 1; + */ + java.lang.String getDeviceId(); + /** + * string device_id = 1; + */ + com.google.protobuf.ByteString + getDeviceIdBytes(); + + /** + * string device_name = 2; + */ + java.lang.String getDeviceName(); + /** + * string device_name = 2; + */ + com.google.protobuf.ByteString + getDeviceNameBytes(); + + /** + * string user_device_pubk = 3; + */ + java.lang.String getUserDevicePubk(); + /** + * string user_device_pubk = 3; + */ + com.google.protobuf.ByteString + getUserDevicePubkBytes(); + + /** + * int64 last_login_time = 4; + */ + long getLastLoginTime(); + } + /** + *
+   *设备的详细信息
+   * 
+ * + * Protobuf type {@code core.DeviceProfile} + */ + public static final class DeviceProfile extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.DeviceProfile) + DeviceProfileOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeviceProfile.newBuilder() to construct. + private DeviceProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeviceProfile() { + deviceId_ = ""; + deviceName_ = ""; + userDevicePubk_ = ""; + lastLoginTime_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeviceProfile( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + deviceId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + deviceName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + userDevicePubk_ = s; + break; + } + case 32: { + + lastLoginTime_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.DeviceProto.internal_static_core_DeviceProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.DeviceProto.internal_static_core_DeviceProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.DeviceProto.DeviceProfile.class, com.akaxin.proto.core.DeviceProto.DeviceProfile.Builder.class); + } + + public static final int DEVICE_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object deviceId_; + /** + * string device_id = 1; + */ + public java.lang.String getDeviceId() { + java.lang.Object ref = deviceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceId_ = s; + return s; + } + } + /** + * string device_id = 1; + */ + public com.google.protobuf.ByteString + getDeviceIdBytes() { + java.lang.Object ref = deviceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEVICE_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object deviceName_; + /** + * string device_name = 2; + */ + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceName_ = s; + return s; + } + } + /** + * string device_name = 2; + */ + public com.google.protobuf.ByteString + getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_DEVICE_PUBK_FIELD_NUMBER = 3; + private volatile java.lang.Object userDevicePubk_; + /** + * string user_device_pubk = 3; + */ + public java.lang.String getUserDevicePubk() { + java.lang.Object ref = userDevicePubk_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userDevicePubk_ = s; + return s; + } + } + /** + * string user_device_pubk = 3; + */ + public com.google.protobuf.ByteString + getUserDevicePubkBytes() { + java.lang.Object ref = userDevicePubk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userDevicePubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAST_LOGIN_TIME_FIELD_NUMBER = 4; + private long lastLoginTime_; + /** + * int64 last_login_time = 4; + */ + public long getLastLoginTime() { + return lastLoginTime_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getDeviceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, deviceId_); + } + if (!getDeviceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deviceName_); + } + if (!getUserDevicePubkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userDevicePubk_); + } + if (lastLoginTime_ != 0L) { + output.writeInt64(4, lastLoginTime_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDeviceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, deviceId_); + } + if (!getDeviceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deviceName_); + } + if (!getUserDevicePubkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userDevicePubk_); + } + if (lastLoginTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, lastLoginTime_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.DeviceProto.DeviceProfile)) { + return super.equals(obj); + } + com.akaxin.proto.core.DeviceProto.DeviceProfile other = (com.akaxin.proto.core.DeviceProto.DeviceProfile) obj; + + boolean result = true; + result = result && getDeviceId() + .equals(other.getDeviceId()); + result = result && getDeviceName() + .equals(other.getDeviceName()); + result = result && getUserDevicePubk() + .equals(other.getUserDevicePubk()); + result = result && (getLastLoginTime() + == other.getLastLoginTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId().hashCode(); + hash = (37 * hash) + DEVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDeviceName().hashCode(); + hash = (37 * hash) + USER_DEVICE_PUBK_FIELD_NUMBER; + hash = (53 * hash) + getUserDevicePubk().hashCode(); + hash = (37 * hash) + LAST_LOGIN_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLastLoginTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.DeviceProto.DeviceProfile parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.DeviceProto.DeviceProfile parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.DeviceProto.DeviceProfile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.DeviceProto.DeviceProfile parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.DeviceProto.DeviceProfile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.DeviceProto.DeviceProfile parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.DeviceProto.DeviceProfile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.DeviceProto.DeviceProfile parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.DeviceProto.DeviceProfile parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.DeviceProto.DeviceProfile parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.DeviceProto.DeviceProfile parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.DeviceProto.DeviceProfile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.DeviceProto.DeviceProfile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *设备的详细信息
+     * 
+ * + * Protobuf type {@code core.DeviceProfile} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.DeviceProfile) + com.akaxin.proto.core.DeviceProto.DeviceProfileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.DeviceProto.internal_static_core_DeviceProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.DeviceProto.internal_static_core_DeviceProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.DeviceProto.DeviceProfile.class, com.akaxin.proto.core.DeviceProto.DeviceProfile.Builder.class); + } + + // Construct using com.akaxin.proto.core.DeviceProto.DeviceProfile.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + deviceId_ = ""; + + deviceName_ = ""; + + userDevicePubk_ = ""; + + lastLoginTime_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.DeviceProto.internal_static_core_DeviceProfile_descriptor; + } + + public com.akaxin.proto.core.DeviceProto.DeviceProfile getDefaultInstanceForType() { + return com.akaxin.proto.core.DeviceProto.DeviceProfile.getDefaultInstance(); + } + + public com.akaxin.proto.core.DeviceProto.DeviceProfile build() { + com.akaxin.proto.core.DeviceProto.DeviceProfile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.DeviceProto.DeviceProfile buildPartial() { + com.akaxin.proto.core.DeviceProto.DeviceProfile result = new com.akaxin.proto.core.DeviceProto.DeviceProfile(this); + result.deviceId_ = deviceId_; + result.deviceName_ = deviceName_; + result.userDevicePubk_ = userDevicePubk_; + result.lastLoginTime_ = lastLoginTime_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.DeviceProto.DeviceProfile) { + return mergeFrom((com.akaxin.proto.core.DeviceProto.DeviceProfile)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.DeviceProto.DeviceProfile other) { + if (other == com.akaxin.proto.core.DeviceProto.DeviceProfile.getDefaultInstance()) return this; + if (!other.getDeviceId().isEmpty()) { + deviceId_ = other.deviceId_; + onChanged(); + } + if (!other.getDeviceName().isEmpty()) { + deviceName_ = other.deviceName_; + onChanged(); + } + if (!other.getUserDevicePubk().isEmpty()) { + userDevicePubk_ = other.userDevicePubk_; + onChanged(); + } + if (other.getLastLoginTime() != 0L) { + setLastLoginTime(other.getLastLoginTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.DeviceProto.DeviceProfile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.DeviceProto.DeviceProfile) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object deviceId_ = ""; + /** + * string device_id = 1; + */ + public java.lang.String getDeviceId() { + java.lang.Object ref = deviceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string device_id = 1; + */ + public com.google.protobuf.ByteString + getDeviceIdBytes() { + java.lang.Object ref = deviceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string device_id = 1; + */ + public Builder setDeviceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deviceId_ = value; + onChanged(); + return this; + } + /** + * string device_id = 1; + */ + public Builder clearDeviceId() { + + deviceId_ = getDefaultInstance().getDeviceId(); + onChanged(); + return this; + } + /** + * string device_id = 1; + */ + public Builder setDeviceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deviceId_ = value; + onChanged(); + return this; + } + + private java.lang.Object deviceName_ = ""; + /** + * string device_name = 2; + */ + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string device_name = 2; + */ + public com.google.protobuf.ByteString + getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string device_name = 2; + */ + public Builder setDeviceName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deviceName_ = value; + onChanged(); + return this; + } + /** + * string device_name = 2; + */ + public Builder clearDeviceName() { + + deviceName_ = getDefaultInstance().getDeviceName(); + onChanged(); + return this; + } + /** + * string device_name = 2; + */ + public Builder setDeviceNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deviceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object userDevicePubk_ = ""; + /** + * string user_device_pubk = 3; + */ + public java.lang.String getUserDevicePubk() { + java.lang.Object ref = userDevicePubk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userDevicePubk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string user_device_pubk = 3; + */ + public com.google.protobuf.ByteString + getUserDevicePubkBytes() { + java.lang.Object ref = userDevicePubk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userDevicePubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string user_device_pubk = 3; + */ + public Builder setUserDevicePubk( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userDevicePubk_ = value; + onChanged(); + return this; + } + /** + * string user_device_pubk = 3; + */ + public Builder clearUserDevicePubk() { + + userDevicePubk_ = getDefaultInstance().getUserDevicePubk(); + onChanged(); + return this; + } + /** + * string user_device_pubk = 3; + */ + public Builder setUserDevicePubkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userDevicePubk_ = value; + onChanged(); + return this; + } + + private long lastLoginTime_ ; + /** + * int64 last_login_time = 4; + */ + public long getLastLoginTime() { + return lastLoginTime_; + } + /** + * int64 last_login_time = 4; + */ + public Builder setLastLoginTime(long value) { + + lastLoginTime_ = value; + onChanged(); + return this; + } + /** + * int64 last_login_time = 4; + */ + public Builder clearLastLoginTime() { + + lastLoginTime_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.DeviceProfile) + } + + // @@protoc_insertion_point(class_scope:core.DeviceProfile) + private static final com.akaxin.proto.core.DeviceProto.DeviceProfile DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.DeviceProto.DeviceProfile(); + } + + public static com.akaxin.proto.core.DeviceProto.DeviceProfile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DeviceProfile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeviceProfile(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.DeviceProto.DeviceProfile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SimpleDeviceProfileOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.SimpleDeviceProfile) + com.google.protobuf.MessageOrBuilder { + + /** + * string device_id = 1; + */ + java.lang.String getDeviceId(); + /** + * string device_id = 1; + */ + com.google.protobuf.ByteString + getDeviceIdBytes(); + + /** + * string device_name = 2; + */ + java.lang.String getDeviceName(); + /** + * string device_name = 2; + */ + com.google.protobuf.ByteString + getDeviceNameBytes(); + + /** + * string user_device_pubk = 3; + */ + java.lang.String getUserDevicePubk(); + /** + * string user_device_pubk = 3; + */ + com.google.protobuf.ByteString + getUserDevicePubkBytes(); + + /** + * int64 last_login_time = 4; + */ + long getLastLoginTime(); + } + /** + *
+   *设备简要信息
+   * 
+ * + * Protobuf type {@code core.SimpleDeviceProfile} + */ + public static final class SimpleDeviceProfile extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.SimpleDeviceProfile) + SimpleDeviceProfileOrBuilder { + private static final long serialVersionUID = 0L; + // Use SimpleDeviceProfile.newBuilder() to construct. + private SimpleDeviceProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SimpleDeviceProfile() { + deviceId_ = ""; + deviceName_ = ""; + userDevicePubk_ = ""; + lastLoginTime_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SimpleDeviceProfile( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + deviceId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + deviceName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + userDevicePubk_ = s; + break; + } + case 32: { + + lastLoginTime_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.DeviceProto.internal_static_core_SimpleDeviceProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.DeviceProto.internal_static_core_SimpleDeviceProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.class, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder.class); + } + + public static final int DEVICE_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object deviceId_; + /** + * string device_id = 1; + */ + public java.lang.String getDeviceId() { + java.lang.Object ref = deviceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceId_ = s; + return s; + } + } + /** + * string device_id = 1; + */ + public com.google.protobuf.ByteString + getDeviceIdBytes() { + java.lang.Object ref = deviceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEVICE_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object deviceName_; + /** + * string device_name = 2; + */ + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceName_ = s; + return s; + } + } + /** + * string device_name = 2; + */ + public com.google.protobuf.ByteString + getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_DEVICE_PUBK_FIELD_NUMBER = 3; + private volatile java.lang.Object userDevicePubk_; + /** + * string user_device_pubk = 3; + */ + public java.lang.String getUserDevicePubk() { + java.lang.Object ref = userDevicePubk_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userDevicePubk_ = s; + return s; + } + } + /** + * string user_device_pubk = 3; + */ + public com.google.protobuf.ByteString + getUserDevicePubkBytes() { + java.lang.Object ref = userDevicePubk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userDevicePubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAST_LOGIN_TIME_FIELD_NUMBER = 4; + private long lastLoginTime_; + /** + * int64 last_login_time = 4; + */ + public long getLastLoginTime() { + return lastLoginTime_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getDeviceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, deviceId_); + } + if (!getDeviceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deviceName_); + } + if (!getUserDevicePubkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userDevicePubk_); + } + if (lastLoginTime_ != 0L) { + output.writeInt64(4, lastLoginTime_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDeviceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, deviceId_); + } + if (!getDeviceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deviceName_); + } + if (!getUserDevicePubkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userDevicePubk_); + } + if (lastLoginTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, lastLoginTime_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile)) { + return super.equals(obj); + } + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile other = (com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile) obj; + + boolean result = true; + result = result && getDeviceId() + .equals(other.getDeviceId()); + result = result && getDeviceName() + .equals(other.getDeviceName()); + result = result && getUserDevicePubk() + .equals(other.getUserDevicePubk()); + result = result && (getLastLoginTime() + == other.getLastLoginTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId().hashCode(); + hash = (37 * hash) + DEVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDeviceName().hashCode(); + hash = (37 * hash) + USER_DEVICE_PUBK_FIELD_NUMBER; + hash = (53 * hash) + getUserDevicePubk().hashCode(); + hash = (37 * hash) + LAST_LOGIN_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLastLoginTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *设备简要信息
+     * 
+ * + * Protobuf type {@code core.SimpleDeviceProfile} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.SimpleDeviceProfile) + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.DeviceProto.internal_static_core_SimpleDeviceProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.DeviceProto.internal_static_core_SimpleDeviceProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.class, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder.class); + } + + // Construct using com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + deviceId_ = ""; + + deviceName_ = ""; + + userDevicePubk_ = ""; + + lastLoginTime_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.DeviceProto.internal_static_core_SimpleDeviceProfile_descriptor; + } + + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile getDefaultInstanceForType() { + return com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.getDefaultInstance(); + } + + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile build() { + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile buildPartial() { + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile result = new com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile(this); + result.deviceId_ = deviceId_; + result.deviceName_ = deviceName_; + result.userDevicePubk_ = userDevicePubk_; + result.lastLoginTime_ = lastLoginTime_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile) { + return mergeFrom((com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile other) { + if (other == com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.getDefaultInstance()) return this; + if (!other.getDeviceId().isEmpty()) { + deviceId_ = other.deviceId_; + onChanged(); + } + if (!other.getDeviceName().isEmpty()) { + deviceName_ = other.deviceName_; + onChanged(); + } + if (!other.getUserDevicePubk().isEmpty()) { + userDevicePubk_ = other.userDevicePubk_; + onChanged(); + } + if (other.getLastLoginTime() != 0L) { + setLastLoginTime(other.getLastLoginTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object deviceId_ = ""; + /** + * string device_id = 1; + */ + public java.lang.String getDeviceId() { + java.lang.Object ref = deviceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string device_id = 1; + */ + public com.google.protobuf.ByteString + getDeviceIdBytes() { + java.lang.Object ref = deviceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string device_id = 1; + */ + public Builder setDeviceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deviceId_ = value; + onChanged(); + return this; + } + /** + * string device_id = 1; + */ + public Builder clearDeviceId() { + + deviceId_ = getDefaultInstance().getDeviceId(); + onChanged(); + return this; + } + /** + * string device_id = 1; + */ + public Builder setDeviceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deviceId_ = value; + onChanged(); + return this; + } + + private java.lang.Object deviceName_ = ""; + /** + * string device_name = 2; + */ + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string device_name = 2; + */ + public com.google.protobuf.ByteString + getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string device_name = 2; + */ + public Builder setDeviceName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deviceName_ = value; + onChanged(); + return this; + } + /** + * string device_name = 2; + */ + public Builder clearDeviceName() { + + deviceName_ = getDefaultInstance().getDeviceName(); + onChanged(); + return this; + } + /** + * string device_name = 2; + */ + public Builder setDeviceNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deviceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object userDevicePubk_ = ""; + /** + * string user_device_pubk = 3; + */ + public java.lang.String getUserDevicePubk() { + java.lang.Object ref = userDevicePubk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userDevicePubk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string user_device_pubk = 3; + */ + public com.google.protobuf.ByteString + getUserDevicePubkBytes() { + java.lang.Object ref = userDevicePubk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userDevicePubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string user_device_pubk = 3; + */ + public Builder setUserDevicePubk( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userDevicePubk_ = value; + onChanged(); + return this; + } + /** + * string user_device_pubk = 3; + */ + public Builder clearUserDevicePubk() { + + userDevicePubk_ = getDefaultInstance().getUserDevicePubk(); + onChanged(); + return this; + } + /** + * string user_device_pubk = 3; + */ + public Builder setUserDevicePubkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userDevicePubk_ = value; + onChanged(); + return this; + } + + private long lastLoginTime_ ; + /** + * int64 last_login_time = 4; + */ + public long getLastLoginTime() { + return lastLoginTime_; + } + /** + * int64 last_login_time = 4; + */ + public Builder setLastLoginTime(long value) { + + lastLoginTime_ = value; + onChanged(); + return this; + } + /** + * int64 last_login_time = 4; + */ + public Builder clearLastLoginTime() { + + lastLoginTime_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.SimpleDeviceProfile) + } + + // @@protoc_insertion_point(class_scope:core.SimpleDeviceProfile) + private static final com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile(); + } + + public static com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public SimpleDeviceProfile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SimpleDeviceProfile(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_DeviceProfile_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_DeviceProfile_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_SimpleDeviceProfile_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_SimpleDeviceProfile_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\021core/device.proto\022\004core\"j\n\rDeviceProfi" + + "le\022\021\n\tdevice_id\030\001 \001(\t\022\023\n\013device_name\030\002 \001" + + "(\t\022\030\n\020user_device_pubk\030\003 \001(\t\022\027\n\017last_log" + + "in_time\030\004 \001(\003\"p\n\023SimpleDeviceProfile\022\021\n\t" + + "device_id\030\001 \001(\t\022\023\n\013device_name\030\002 \001(\t\022\030\n\020" + + "user_device_pubk\030\003 \001(\t\022\027\n\017last_login_tim" + + "e\030\004 \001(\003B$\n\025com.akaxin.proto.coreB\013Device" + + "Protob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_core_DeviceProfile_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_core_DeviceProfile_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_DeviceProfile_descriptor, + new java.lang.String[] { "DeviceId", "DeviceName", "UserDevicePubk", "LastLoginTime", }); + internal_static_core_SimpleDeviceProfile_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_core_SimpleDeviceProfile_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_SimpleDeviceProfile_descriptor, + new java.lang.String[] { "DeviceId", "DeviceName", "UserDevicePubk", "LastLoginTime", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/core/FileProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/FileProto.java new file mode 100755 index 0000000..374ba07 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/FileProto.java @@ -0,0 +1,1686 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/file.proto + +package com.akaxin.proto.core; + +public final class FileProto { + private FileProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code core.FileType} + */ + public enum FileType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * 未知的文件类型类型
+     * 
+ * + * UNKNOWN_FILE = 0; + */ + UNKNOWN_FILE(0), + /** + *
+     *用户,群头像
+     * 
+ * + * USER_PORTRAIT = 1; + */ + USER_PORTRAIT(1), + /** + *
+     * 个人消息,群图片消息
+     * 
+ * + * MESSAGE_IMAGE = 2; + */ + MESSAGE_IMAGE(2), + /** + *
+     * 个人,群语音消息
+     * 
+ * + * MESSAGE_VOICE = 3; + */ + MESSAGE_VOICE(3), + /** + *
+     *群头像
+     * 
+ * + * GROUP_PORTRAIT = 4; + */ + GROUP_PORTRAIT(4), + /** + *
+     * 站点扩展图片存放位置
+     * 
+ * + * SITE_PLUGIN = 5; + */ + SITE_PLUGIN(5), + /** + *
+     *站点本身相关图片,例如站点logo
+     * 
+ * + * SITE_ICON = 6; + */ + SITE_ICON(6), + UNRECOGNIZED(-1), + ; + + /** + *
+     * 未知的文件类型类型
+     * 
+ * + * UNKNOWN_FILE = 0; + */ + public static final int UNKNOWN_FILE_VALUE = 0; + /** + *
+     *用户,群头像
+     * 
+ * + * USER_PORTRAIT = 1; + */ + public static final int USER_PORTRAIT_VALUE = 1; + /** + *
+     * 个人消息,群图片消息
+     * 
+ * + * MESSAGE_IMAGE = 2; + */ + public static final int MESSAGE_IMAGE_VALUE = 2; + /** + *
+     * 个人,群语音消息
+     * 
+ * + * MESSAGE_VOICE = 3; + */ + public static final int MESSAGE_VOICE_VALUE = 3; + /** + *
+     *群头像
+     * 
+ * + * GROUP_PORTRAIT = 4; + */ + public static final int GROUP_PORTRAIT_VALUE = 4; + /** + *
+     * 站点扩展图片存放位置
+     * 
+ * + * SITE_PLUGIN = 5; + */ + public static final int SITE_PLUGIN_VALUE = 5; + /** + *
+     *站点本身相关图片,例如站点logo
+     * 
+ * + * SITE_ICON = 6; + */ + public static final int SITE_ICON_VALUE = 6; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FileType valueOf(int value) { + return forNumber(value); + } + + public static FileType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_FILE; + case 1: return USER_PORTRAIT; + case 2: return MESSAGE_IMAGE; + case 3: return MESSAGE_VOICE; + case 4: return GROUP_PORTRAIT; + case 5: return SITE_PLUGIN; + case 6: return SITE_ICON; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + FileType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FileType findValueByNumber(int number) { + return FileType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.FileProto.getDescriptor().getEnumTypes().get(0); + } + + private static final FileType[] VALUES = values(); + + public static FileType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private FileType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.FileType) + } + + public interface FileOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.File) + com.google.protobuf.MessageOrBuilder { + + /** + * string file_id = 1; + */ + java.lang.String getFileId(); + /** + * string file_id = 1; + */ + com.google.protobuf.ByteString + getFileIdBytes(); + + /** + * bytes file_content = 2; + */ + com.google.protobuf.ByteString getFileContent(); + + /** + * .core.FileType file_type = 3; + */ + int getFileTypeValue(); + /** + * .core.FileType file_type = 3; + */ + com.akaxin.proto.core.FileProto.FileType getFileType(); + } + /** + *
+   *上传站点服务端的文件
+   * 
+ * + * Protobuf type {@code core.File} + */ + public static final class File extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.File) + FileOrBuilder { + private static final long serialVersionUID = 0L; + // Use File.newBuilder() to construct. + private File(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private File() { + fileId_ = ""; + fileContent_ = com.google.protobuf.ByteString.EMPTY; + fileType_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private File( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + fileId_ = s; + break; + } + case 18: { + + fileContent_ = input.readBytes(); + break; + } + case 24: { + int rawValue = input.readEnum(); + + fileType_ = rawValue; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.FileProto.internal_static_core_File_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.FileProto.internal_static_core_File_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.FileProto.File.class, com.akaxin.proto.core.FileProto.File.Builder.class); + } + + public static final int FILE_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object fileId_; + /** + * string file_id = 1; + */ + public java.lang.String getFileId() { + java.lang.Object ref = fileId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fileId_ = s; + return s; + } + } + /** + * string file_id = 1; + */ + public com.google.protobuf.ByteString + getFileIdBytes() { + java.lang.Object ref = fileId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILE_CONTENT_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString fileContent_; + /** + * bytes file_content = 2; + */ + public com.google.protobuf.ByteString getFileContent() { + return fileContent_; + } + + public static final int FILE_TYPE_FIELD_NUMBER = 3; + private int fileType_; + /** + * .core.FileType file_type = 3; + */ + public int getFileTypeValue() { + return fileType_; + } + /** + * .core.FileType file_type = 3; + */ + public com.akaxin.proto.core.FileProto.FileType getFileType() { + com.akaxin.proto.core.FileProto.FileType result = com.akaxin.proto.core.FileProto.FileType.valueOf(fileType_); + return result == null ? com.akaxin.proto.core.FileProto.FileType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getFileIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fileId_); + } + if (!fileContent_.isEmpty()) { + output.writeBytes(2, fileContent_); + } + if (fileType_ != com.akaxin.proto.core.FileProto.FileType.UNKNOWN_FILE.getNumber()) { + output.writeEnum(3, fileType_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFileIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fileId_); + } + if (!fileContent_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, fileContent_); + } + if (fileType_ != com.akaxin.proto.core.FileProto.FileType.UNKNOWN_FILE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, fileType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.FileProto.File)) { + return super.equals(obj); + } + com.akaxin.proto.core.FileProto.File other = (com.akaxin.proto.core.FileProto.File) obj; + + boolean result = true; + result = result && getFileId() + .equals(other.getFileId()); + result = result && getFileContent() + .equals(other.getFileContent()); + result = result && fileType_ == other.fileType_; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FILE_ID_FIELD_NUMBER; + hash = (53 * hash) + getFileId().hashCode(); + hash = (37 * hash) + FILE_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getFileContent().hashCode(); + hash = (37 * hash) + FILE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + fileType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.FileProto.File parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.FileProto.File parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.FileProto.File parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.FileProto.File parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.FileProto.File parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.FileProto.File parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.FileProto.File parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.FileProto.File parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.FileProto.File parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.FileProto.File parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.FileProto.File parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.FileProto.File parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.FileProto.File prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *上传站点服务端的文件
+     * 
+ * + * Protobuf type {@code core.File} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.File) + com.akaxin.proto.core.FileProto.FileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.FileProto.internal_static_core_File_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.FileProto.internal_static_core_File_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.FileProto.File.class, com.akaxin.proto.core.FileProto.File.Builder.class); + } + + // Construct using com.akaxin.proto.core.FileProto.File.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + fileId_ = ""; + + fileContent_ = com.google.protobuf.ByteString.EMPTY; + + fileType_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.FileProto.internal_static_core_File_descriptor; + } + + public com.akaxin.proto.core.FileProto.File getDefaultInstanceForType() { + return com.akaxin.proto.core.FileProto.File.getDefaultInstance(); + } + + public com.akaxin.proto.core.FileProto.File build() { + com.akaxin.proto.core.FileProto.File result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.FileProto.File buildPartial() { + com.akaxin.proto.core.FileProto.File result = new com.akaxin.proto.core.FileProto.File(this); + result.fileId_ = fileId_; + result.fileContent_ = fileContent_; + result.fileType_ = fileType_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.FileProto.File) { + return mergeFrom((com.akaxin.proto.core.FileProto.File)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.FileProto.File other) { + if (other == com.akaxin.proto.core.FileProto.File.getDefaultInstance()) return this; + if (!other.getFileId().isEmpty()) { + fileId_ = other.fileId_; + onChanged(); + } + if (other.getFileContent() != com.google.protobuf.ByteString.EMPTY) { + setFileContent(other.getFileContent()); + } + if (other.fileType_ != 0) { + setFileTypeValue(other.getFileTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.FileProto.File parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.FileProto.File) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object fileId_ = ""; + /** + * string file_id = 1; + */ + public java.lang.String getFileId() { + java.lang.Object ref = fileId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fileId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string file_id = 1; + */ + public com.google.protobuf.ByteString + getFileIdBytes() { + java.lang.Object ref = fileId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string file_id = 1; + */ + public Builder setFileId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fileId_ = value; + onChanged(); + return this; + } + /** + * string file_id = 1; + */ + public Builder clearFileId() { + + fileId_ = getDefaultInstance().getFileId(); + onChanged(); + return this; + } + /** + * string file_id = 1; + */ + public Builder setFileIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fileId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString fileContent_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes file_content = 2; + */ + public com.google.protobuf.ByteString getFileContent() { + return fileContent_; + } + /** + * bytes file_content = 2; + */ + public Builder setFileContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + fileContent_ = value; + onChanged(); + return this; + } + /** + * bytes file_content = 2; + */ + public Builder clearFileContent() { + + fileContent_ = getDefaultInstance().getFileContent(); + onChanged(); + return this; + } + + private int fileType_ = 0; + /** + * .core.FileType file_type = 3; + */ + public int getFileTypeValue() { + return fileType_; + } + /** + * .core.FileType file_type = 3; + */ + public Builder setFileTypeValue(int value) { + fileType_ = value; + onChanged(); + return this; + } + /** + * .core.FileType file_type = 3; + */ + public com.akaxin.proto.core.FileProto.FileType getFileType() { + com.akaxin.proto.core.FileProto.FileType result = com.akaxin.proto.core.FileProto.FileType.valueOf(fileType_); + return result == null ? com.akaxin.proto.core.FileProto.FileType.UNRECOGNIZED : result; + } + /** + * .core.FileType file_type = 3; + */ + public Builder setFileType(com.akaxin.proto.core.FileProto.FileType value) { + if (value == null) { + throw new NullPointerException(); + } + + fileType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .core.FileType file_type = 3; + */ + public Builder clearFileType() { + + fileType_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.File) + } + + // @@protoc_insertion_point(class_scope:core.File) + private static final com.akaxin.proto.core.FileProto.File DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.FileProto.File(); + } + + public static com.akaxin.proto.core.FileProto.File getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public File parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new File(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.FileProto.File getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FileDescOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.FileDesc) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *语音的长度
+     * 
+ * + * int32 length = 1; + */ + int getLength(); + + /** + *
+     *图片的宽
+     * 
+ * + * int32 width = 2; + */ + int getWidth(); + + /** + *
+     *图片的高
+     * 
+ * + * int32 height = 3; + */ + int getHeight(); + + /** + *
+     *视频的大小,单位kb
+     * 
+ * + * int32 size = 4; + */ + int getSize(); + } + /** + *
+   * 文件信息的描述
+   * 
+ * + * Protobuf type {@code core.FileDesc} + */ + public static final class FileDesc extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.FileDesc) + FileDescOrBuilder { + private static final long serialVersionUID = 0L; + // Use FileDesc.newBuilder() to construct. + private FileDesc(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FileDesc() { + length_ = 0; + width_ = 0; + height_ = 0; + size_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FileDesc( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + length_ = input.readInt32(); + break; + } + case 16: { + + width_ = input.readInt32(); + break; + } + case 24: { + + height_ = input.readInt32(); + break; + } + case 32: { + + size_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.FileProto.internal_static_core_FileDesc_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.FileProto.internal_static_core_FileDesc_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.FileProto.FileDesc.class, com.akaxin.proto.core.FileProto.FileDesc.Builder.class); + } + + public static final int LENGTH_FIELD_NUMBER = 1; + private int length_; + /** + *
+     *语音的长度
+     * 
+ * + * int32 length = 1; + */ + public int getLength() { + return length_; + } + + public static final int WIDTH_FIELD_NUMBER = 2; + private int width_; + /** + *
+     *图片的宽
+     * 
+ * + * int32 width = 2; + */ + public int getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 3; + private int height_; + /** + *
+     *图片的高
+     * 
+ * + * int32 height = 3; + */ + public int getHeight() { + return height_; + } + + public static final int SIZE_FIELD_NUMBER = 4; + private int size_; + /** + *
+     *视频的大小,单位kb
+     * 
+ * + * int32 size = 4; + */ + public int getSize() { + return size_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (length_ != 0) { + output.writeInt32(1, length_); + } + if (width_ != 0) { + output.writeInt32(2, width_); + } + if (height_ != 0) { + output.writeInt32(3, height_); + } + if (size_ != 0) { + output.writeInt32(4, size_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (length_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, length_); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, width_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, height_); + } + if (size_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, size_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.FileProto.FileDesc)) { + return super.equals(obj); + } + com.akaxin.proto.core.FileProto.FileDesc other = (com.akaxin.proto.core.FileProto.FileDesc) obj; + + boolean result = true; + result = result && (getLength() + == other.getLength()); + result = result && (getWidth() + == other.getWidth()); + result = result && (getHeight() + == other.getHeight()); + result = result && (getSize() + == other.getSize()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LENGTH_FIELD_NUMBER; + hash = (53 * hash) + getLength(); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (37 * hash) + SIZE_FIELD_NUMBER; + hash = (53 * hash) + getSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.FileProto.FileDesc parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.FileProto.FileDesc parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.FileProto.FileDesc parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.FileProto.FileDesc parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.FileProto.FileDesc parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.FileProto.FileDesc parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.FileProto.FileDesc parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.FileProto.FileDesc parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.FileProto.FileDesc parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.FileProto.FileDesc parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.FileProto.FileDesc parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.FileProto.FileDesc parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.FileProto.FileDesc prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * 文件信息的描述
+     * 
+ * + * Protobuf type {@code core.FileDesc} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.FileDesc) + com.akaxin.proto.core.FileProto.FileDescOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.FileProto.internal_static_core_FileDesc_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.FileProto.internal_static_core_FileDesc_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.FileProto.FileDesc.class, com.akaxin.proto.core.FileProto.FileDesc.Builder.class); + } + + // Construct using com.akaxin.proto.core.FileProto.FileDesc.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + length_ = 0; + + width_ = 0; + + height_ = 0; + + size_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.FileProto.internal_static_core_FileDesc_descriptor; + } + + public com.akaxin.proto.core.FileProto.FileDesc getDefaultInstanceForType() { + return com.akaxin.proto.core.FileProto.FileDesc.getDefaultInstance(); + } + + public com.akaxin.proto.core.FileProto.FileDesc build() { + com.akaxin.proto.core.FileProto.FileDesc result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.FileProto.FileDesc buildPartial() { + com.akaxin.proto.core.FileProto.FileDesc result = new com.akaxin.proto.core.FileProto.FileDesc(this); + result.length_ = length_; + result.width_ = width_; + result.height_ = height_; + result.size_ = size_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.FileProto.FileDesc) { + return mergeFrom((com.akaxin.proto.core.FileProto.FileDesc)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.FileProto.FileDesc other) { + if (other == com.akaxin.proto.core.FileProto.FileDesc.getDefaultInstance()) return this; + if (other.getLength() != 0) { + setLength(other.getLength()); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (other.getSize() != 0) { + setSize(other.getSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.FileProto.FileDesc parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.FileProto.FileDesc) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int length_ ; + /** + *
+       *语音的长度
+       * 
+ * + * int32 length = 1; + */ + public int getLength() { + return length_; + } + /** + *
+       *语音的长度
+       * 
+ * + * int32 length = 1; + */ + public Builder setLength(int value) { + + length_ = value; + onChanged(); + return this; + } + /** + *
+       *语音的长度
+       * 
+ * + * int32 length = 1; + */ + public Builder clearLength() { + + length_ = 0; + onChanged(); + return this; + } + + private int width_ ; + /** + *
+       *图片的宽
+       * 
+ * + * int32 width = 2; + */ + public int getWidth() { + return width_; + } + /** + *
+       *图片的宽
+       * 
+ * + * int32 width = 2; + */ + public Builder setWidth(int value) { + + width_ = value; + onChanged(); + return this; + } + /** + *
+       *图片的宽
+       * 
+ * + * int32 width = 2; + */ + public Builder clearWidth() { + + width_ = 0; + onChanged(); + return this; + } + + private int height_ ; + /** + *
+       *图片的高
+       * 
+ * + * int32 height = 3; + */ + public int getHeight() { + return height_; + } + /** + *
+       *图片的高
+       * 
+ * + * int32 height = 3; + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+       *图片的高
+       * 
+ * + * int32 height = 3; + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + + private int size_ ; + /** + *
+       *视频的大小,单位kb
+       * 
+ * + * int32 size = 4; + */ + public int getSize() { + return size_; + } + /** + *
+       *视频的大小,单位kb
+       * 
+ * + * int32 size = 4; + */ + public Builder setSize(int value) { + + size_ = value; + onChanged(); + return this; + } + /** + *
+       *视频的大小,单位kb
+       * 
+ * + * int32 size = 4; + */ + public Builder clearSize() { + + size_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.FileDesc) + } + + // @@protoc_insertion_point(class_scope:core.FileDesc) + private static final com.akaxin.proto.core.FileProto.FileDesc DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.FileProto.FileDesc(); + } + + public static com.akaxin.proto.core.FileProto.FileDesc getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public FileDesc parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FileDesc(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.FileProto.FileDesc getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_File_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_File_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_FileDesc_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_FileDesc_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\017core/file.proto\022\004core\"P\n\004File\022\017\n\007file_" + + "id\030\001 \001(\t\022\024\n\014file_content\030\002 \001(\014\022!\n\tfile_t" + + "ype\030\003 \001(\0162\016.core.FileType\"G\n\010FileDesc\022\016\n" + + "\006length\030\001 \001(\005\022\r\n\005width\030\002 \001(\005\022\016\n\006height\030\003" + + " \001(\005\022\014\n\004size\030\004 \001(\005*\211\001\n\010FileType\022\020\n\014UNKNO" + + "WN_FILE\020\000\022\021\n\rUSER_PORTRAIT\020\001\022\021\n\rMESSAGE_" + + "IMAGE\020\002\022\021\n\rMESSAGE_VOICE\020\003\022\022\n\016GROUP_PORT" + + "RAIT\020\004\022\017\n\013SITE_PLUGIN\020\005\022\r\n\tSITE_ICON\020\006B\"" + + "\n\025com.akaxin.proto.coreB\tFileProtob\006prot" + + "o3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_core_File_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_core_File_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_File_descriptor, + new java.lang.String[] { "FileId", "FileContent", "FileType", }); + internal_static_core_FileDesc_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_core_FileDesc_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_FileDesc_descriptor, + new java.lang.String[] { "Length", "Width", "Height", "Size", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/core/GroupProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/GroupProto.java new file mode 100755 index 0000000..fb2032d --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/GroupProto.java @@ -0,0 +1,2759 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/group.proto + +package com.akaxin.proto.core; + +public final class GroupProto { + private GroupProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code core.GroupMemberRole} + */ + public enum GroupMemberRole + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *非群成员
+     * 
+ * + * NONMEMBER = 0; + */ + NONMEMBER(0), + /** + *
+     *群成员
+     * 
+ * + * MEMBER = 1; + */ + MEMBER(1), + /** + *
+     *群所有者
+     * 
+ * + * OWNER = 2; + */ + OWNER(2), + /** + *
+     *群管理员
+     * 
+ * + * ADMIN = 3; + */ + ADMIN(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     *非群成员
+     * 
+ * + * NONMEMBER = 0; + */ + public static final int NONMEMBER_VALUE = 0; + /** + *
+     *群成员
+     * 
+ * + * MEMBER = 1; + */ + public static final int MEMBER_VALUE = 1; + /** + *
+     *群所有者
+     * 
+ * + * OWNER = 2; + */ + public static final int OWNER_VALUE = 2; + /** + *
+     *群管理员
+     * 
+ * + * ADMIN = 3; + */ + public static final int ADMIN_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static GroupMemberRole valueOf(int value) { + return forNumber(value); + } + + public static GroupMemberRole forNumber(int value) { + switch (value) { + case 0: return NONMEMBER; + case 1: return MEMBER; + case 2: return OWNER; + case 3: return ADMIN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + GroupMemberRole> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public GroupMemberRole findValueByNumber(int number) { + return GroupMemberRole.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.GroupProto.getDescriptor().getEnumTypes().get(0); + } + + private static final GroupMemberRole[] VALUES = values(); + + public static GroupMemberRole valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private GroupMemberRole(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.GroupMemberRole) + } + + /** + * Protobuf enum {@code core.GroupStatus} + */ + public enum GroupStatus + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *已经解散的群组
+     * 
+ * + * GROUP_DELETE = 0; + */ + GROUP_DELETE(0), + /** + *
+     *正常的群组
+     * 
+ * + * GROUP_NORMAL = 1; + */ + GROUP_NORMAL(1), + UNRECOGNIZED(-1), + ; + + /** + *
+     *已经解散的群组
+     * 
+ * + * GROUP_DELETE = 0; + */ + public static final int GROUP_DELETE_VALUE = 0; + /** + *
+     *正常的群组
+     * 
+ * + * GROUP_NORMAL = 1; + */ + public static final int GROUP_NORMAL_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static GroupStatus valueOf(int value) { + return forNumber(value); + } + + public static GroupStatus forNumber(int value) { + switch (value) { + case 0: return GROUP_DELETE; + case 1: return GROUP_NORMAL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + GroupStatus> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public GroupStatus findValueByNumber(int number) { + return GroupStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.GroupProto.getDescriptor().getEnumTypes().get(1); + } + + private static final GroupStatus[] VALUES = values(); + + public static GroupStatus valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private GroupStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.GroupStatus) + } + + public interface GroupProfileOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.GroupProfile) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1; + */ + java.lang.String getId(); + /** + * string id = 1; + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * string name = 2; + */ + java.lang.String getName(); + /** + * string name = 2; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * string icon = 4; + */ + java.lang.String getIcon(); + /** + * string icon = 4; + */ + com.google.protobuf.ByteString + getIconBytes(); + + /** + * string group_notice = 5; + */ + java.lang.String getGroupNotice(); + /** + * string group_notice = 5; + */ + com.google.protobuf.ByteString + getGroupNoticeBytes(); + } + /** + *
+   *简单的group file
+   * 
+ * + * Protobuf type {@code core.GroupProfile} + */ + public static final class GroupProfile extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.GroupProfile) + GroupProfileOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupProfile.newBuilder() to construct. + private GroupProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GroupProfile() { + id_ = ""; + name_ = ""; + icon_ = ""; + groupNotice_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GroupProfile( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + icon_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + groupNotice_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.GroupProto.internal_static_core_GroupProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.GroupProto.internal_static_core_GroupProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.GroupProto.GroupProfile.class, com.akaxin.proto.core.GroupProto.GroupProfile.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * string id = 1; + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1; + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + * string name = 2; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * string name = 2; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ICON_FIELD_NUMBER = 4; + private volatile java.lang.Object icon_; + /** + * string icon = 4; + */ + public java.lang.String getIcon() { + java.lang.Object ref = icon_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + icon_ = s; + return s; + } + } + /** + * string icon = 4; + */ + public com.google.protobuf.ByteString + getIconBytes() { + java.lang.Object ref = icon_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + icon_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUP_NOTICE_FIELD_NUMBER = 5; + private volatile java.lang.Object groupNotice_; + /** + * string group_notice = 5; + */ + public java.lang.String getGroupNotice() { + java.lang.Object ref = groupNotice_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupNotice_ = s; + return s; + } + } + /** + * string group_notice = 5; + */ + public com.google.protobuf.ByteString + getGroupNoticeBytes() { + java.lang.Object ref = groupNotice_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupNotice_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!getIconBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, icon_); + } + if (!getGroupNoticeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, groupNotice_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!getIconBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, icon_); + } + if (!getGroupNoticeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, groupNotice_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.GroupProto.GroupProfile)) { + return super.equals(obj); + } + com.akaxin.proto.core.GroupProto.GroupProfile other = (com.akaxin.proto.core.GroupProto.GroupProfile) obj; + + boolean result = true; + result = result && getId() + .equals(other.getId()); + result = result && getName() + .equals(other.getName()); + result = result && getIcon() + .equals(other.getIcon()); + result = result && getGroupNotice() + .equals(other.getGroupNotice()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ICON_FIELD_NUMBER; + hash = (53 * hash) + getIcon().hashCode(); + hash = (37 * hash) + GROUP_NOTICE_FIELD_NUMBER; + hash = (53 * hash) + getGroupNotice().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.GroupProto.GroupProfile parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.GroupProto.GroupProfile parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.GroupProto.GroupProfile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.GroupProto.GroupProfile parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.GroupProto.GroupProfile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.GroupProto.GroupProfile parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.GroupProto.GroupProfile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.GroupProto.GroupProfile parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.GroupProto.GroupProfile parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.GroupProto.GroupProfile parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.GroupProto.GroupProfile parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.GroupProto.GroupProfile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.GroupProto.GroupProfile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *简单的group file
+     * 
+ * + * Protobuf type {@code core.GroupProfile} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.GroupProfile) + com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.GroupProto.internal_static_core_GroupProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.GroupProto.internal_static_core_GroupProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.GroupProto.GroupProfile.class, com.akaxin.proto.core.GroupProto.GroupProfile.Builder.class); + } + + // Construct using com.akaxin.proto.core.GroupProto.GroupProfile.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + id_ = ""; + + name_ = ""; + + icon_ = ""; + + groupNotice_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.GroupProto.internal_static_core_GroupProfile_descriptor; + } + + public com.akaxin.proto.core.GroupProto.GroupProfile getDefaultInstanceForType() { + return com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance(); + } + + public com.akaxin.proto.core.GroupProto.GroupProfile build() { + com.akaxin.proto.core.GroupProto.GroupProfile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.GroupProto.GroupProfile buildPartial() { + com.akaxin.proto.core.GroupProto.GroupProfile result = new com.akaxin.proto.core.GroupProto.GroupProfile(this); + result.id_ = id_; + result.name_ = name_; + result.icon_ = icon_; + result.groupNotice_ = groupNotice_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.GroupProto.GroupProfile) { + return mergeFrom((com.akaxin.proto.core.GroupProto.GroupProfile)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.GroupProto.GroupProfile other) { + if (other == com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getIcon().isEmpty()) { + icon_ = other.icon_; + onChanged(); + } + if (!other.getGroupNotice().isEmpty()) { + groupNotice_ = other.groupNotice_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.GroupProto.GroupProfile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.GroupProto.GroupProfile) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object id_ = ""; + /** + * string id = 1; + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1; + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1; + */ + public Builder setId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * string id = 1; + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * string id = 1; + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * string name = 2; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 2; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 2; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string name = 2; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * string name = 2; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object icon_ = ""; + /** + * string icon = 4; + */ + public java.lang.String getIcon() { + java.lang.Object ref = icon_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + icon_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string icon = 4; + */ + public com.google.protobuf.ByteString + getIconBytes() { + java.lang.Object ref = icon_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + icon_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string icon = 4; + */ + public Builder setIcon( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + icon_ = value; + onChanged(); + return this; + } + /** + * string icon = 4; + */ + public Builder clearIcon() { + + icon_ = getDefaultInstance().getIcon(); + onChanged(); + return this; + } + /** + * string icon = 4; + */ + public Builder setIconBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + icon_ = value; + onChanged(); + return this; + } + + private java.lang.Object groupNotice_ = ""; + /** + * string group_notice = 5; + */ + public java.lang.String getGroupNotice() { + java.lang.Object ref = groupNotice_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupNotice_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string group_notice = 5; + */ + public com.google.protobuf.ByteString + getGroupNoticeBytes() { + java.lang.Object ref = groupNotice_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupNotice_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string group_notice = 5; + */ + public Builder setGroupNotice( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupNotice_ = value; + onChanged(); + return this; + } + /** + * string group_notice = 5; + */ + public Builder clearGroupNotice() { + + groupNotice_ = getDefaultInstance().getGroupNotice(); + onChanged(); + return this; + } + /** + * string group_notice = 5; + */ + public Builder setGroupNoticeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupNotice_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.GroupProfile) + } + + // @@protoc_insertion_point(class_scope:core.GroupProfile) + private static final com.akaxin.proto.core.GroupProto.GroupProfile DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.GroupProto.GroupProfile(); + } + + public static com.akaxin.proto.core.GroupProto.GroupProfile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GroupProfile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GroupProfile(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.GroupProto.GroupProfile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SimpleGroupProfileOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.SimpleGroupProfile) + com.google.protobuf.MessageOrBuilder { + + /** + * string group_id = 1; + */ + java.lang.String getGroupId(); + /** + * string group_id = 1; + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + * string group_name = 2; + */ + java.lang.String getGroupName(); + /** + * string group_name = 2; + */ + com.google.protobuf.ByteString + getGroupNameBytes(); + + /** + * string group_icon = 3; + */ + java.lang.String getGroupIcon(); + /** + * string group_icon = 3; + */ + com.google.protobuf.ByteString + getGroupIconBytes(); + } + /** + * Protobuf type {@code core.SimpleGroupProfile} + */ + public static final class SimpleGroupProfile extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.SimpleGroupProfile) + SimpleGroupProfileOrBuilder { + private static final long serialVersionUID = 0L; + // Use SimpleGroupProfile.newBuilder() to construct. + private SimpleGroupProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SimpleGroupProfile() { + groupId_ = ""; + groupName_ = ""; + groupIcon_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SimpleGroupProfile( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + groupId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + groupName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + groupIcon_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.GroupProto.internal_static_core_SimpleGroupProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.GroupProto.internal_static_core_SimpleGroupProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.GroupProto.SimpleGroupProfile.class, com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object groupId_; + /** + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUP_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object groupName_; + /** + * string group_name = 2; + */ + public java.lang.String getGroupName() { + java.lang.Object ref = groupName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupName_ = s; + return s; + } + } + /** + * string group_name = 2; + */ + public com.google.protobuf.ByteString + getGroupNameBytes() { + java.lang.Object ref = groupName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUP_ICON_FIELD_NUMBER = 3; + private volatile java.lang.Object groupIcon_; + /** + * string group_icon = 3; + */ + public java.lang.String getGroupIcon() { + java.lang.Object ref = groupIcon_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupIcon_ = s; + return s; + } + } + /** + * string group_icon = 3; + */ + public com.google.protobuf.ByteString + getGroupIconBytes() { + java.lang.Object ref = groupIcon_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupIcon_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupId_); + } + if (!getGroupNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, groupName_); + } + if (!getGroupIconBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, groupIcon_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupId_); + } + if (!getGroupNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, groupName_); + } + if (!getGroupIconBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, groupIcon_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.GroupProto.SimpleGroupProfile)) { + return super.equals(obj); + } + com.akaxin.proto.core.GroupProto.SimpleGroupProfile other = (com.akaxin.proto.core.GroupProto.SimpleGroupProfile) obj; + + boolean result = true; + result = result && getGroupId() + .equals(other.getGroupId()); + result = result && getGroupName() + .equals(other.getGroupName()); + result = result && getGroupIcon() + .equals(other.getGroupIcon()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (37 * hash) + GROUP_NAME_FIELD_NUMBER; + hash = (53 * hash) + getGroupName().hashCode(); + hash = (37 * hash) + GROUP_ICON_FIELD_NUMBER; + hash = (53 * hash) + getGroupIcon().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.GroupProto.SimpleGroupProfile parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.GroupProto.SimpleGroupProfile parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.GroupProto.SimpleGroupProfile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.GroupProto.SimpleGroupProfile parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.GroupProto.SimpleGroupProfile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.GroupProto.SimpleGroupProfile parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.GroupProto.SimpleGroupProfile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.GroupProto.SimpleGroupProfile parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.GroupProto.SimpleGroupProfile parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.GroupProto.SimpleGroupProfile parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.GroupProto.SimpleGroupProfile parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.GroupProto.SimpleGroupProfile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.GroupProto.SimpleGroupProfile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code core.SimpleGroupProfile} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.SimpleGroupProfile) + com.akaxin.proto.core.GroupProto.SimpleGroupProfileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.GroupProto.internal_static_core_SimpleGroupProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.GroupProto.internal_static_core_SimpleGroupProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.GroupProto.SimpleGroupProfile.class, com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder.class); + } + + // Construct using com.akaxin.proto.core.GroupProto.SimpleGroupProfile.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + groupId_ = ""; + + groupName_ = ""; + + groupIcon_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.GroupProto.internal_static_core_SimpleGroupProfile_descriptor; + } + + public com.akaxin.proto.core.GroupProto.SimpleGroupProfile getDefaultInstanceForType() { + return com.akaxin.proto.core.GroupProto.SimpleGroupProfile.getDefaultInstance(); + } + + public com.akaxin.proto.core.GroupProto.SimpleGroupProfile build() { + com.akaxin.proto.core.GroupProto.SimpleGroupProfile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.GroupProto.SimpleGroupProfile buildPartial() { + com.akaxin.proto.core.GroupProto.SimpleGroupProfile result = new com.akaxin.proto.core.GroupProto.SimpleGroupProfile(this); + result.groupId_ = groupId_; + result.groupName_ = groupName_; + result.groupIcon_ = groupIcon_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.GroupProto.SimpleGroupProfile) { + return mergeFrom((com.akaxin.proto.core.GroupProto.SimpleGroupProfile)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.GroupProto.SimpleGroupProfile other) { + if (other == com.akaxin.proto.core.GroupProto.SimpleGroupProfile.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + onChanged(); + } + if (!other.getGroupName().isEmpty()) { + groupName_ = other.groupName_; + onChanged(); + } + if (!other.getGroupIcon().isEmpty()) { + groupIcon_ = other.groupIcon_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.GroupProto.SimpleGroupProfile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.GroupProto.SimpleGroupProfile) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object groupId_ = ""; + /** + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string group_id = 1; + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupId_ = value; + onChanged(); + return this; + } + /** + * string group_id = 1; + */ + public Builder clearGroupId() { + + groupId_ = getDefaultInstance().getGroupId(); + onChanged(); + return this; + } + /** + * string group_id = 1; + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupId_ = value; + onChanged(); + return this; + } + + private java.lang.Object groupName_ = ""; + /** + * string group_name = 2; + */ + public java.lang.String getGroupName() { + java.lang.Object ref = groupName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string group_name = 2; + */ + public com.google.protobuf.ByteString + getGroupNameBytes() { + java.lang.Object ref = groupName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string group_name = 2; + */ + public Builder setGroupName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupName_ = value; + onChanged(); + return this; + } + /** + * string group_name = 2; + */ + public Builder clearGroupName() { + + groupName_ = getDefaultInstance().getGroupName(); + onChanged(); + return this; + } + /** + * string group_name = 2; + */ + public Builder setGroupNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupName_ = value; + onChanged(); + return this; + } + + private java.lang.Object groupIcon_ = ""; + /** + * string group_icon = 3; + */ + public java.lang.String getGroupIcon() { + java.lang.Object ref = groupIcon_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupIcon_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string group_icon = 3; + */ + public com.google.protobuf.ByteString + getGroupIconBytes() { + java.lang.Object ref = groupIcon_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupIcon_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string group_icon = 3; + */ + public Builder setGroupIcon( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupIcon_ = value; + onChanged(); + return this; + } + /** + * string group_icon = 3; + */ + public Builder clearGroupIcon() { + + groupIcon_ = getDefaultInstance().getGroupIcon(); + onChanged(); + return this; + } + /** + * string group_icon = 3; + */ + public Builder setGroupIconBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupIcon_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.SimpleGroupProfile) + } + + // @@protoc_insertion_point(class_scope:core.SimpleGroupProfile) + private static final com.akaxin.proto.core.GroupProto.SimpleGroupProfile DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.GroupProto.SimpleGroupProfile(); + } + + public static com.akaxin.proto.core.GroupProto.SimpleGroupProfile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public SimpleGroupProfile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SimpleGroupProfile(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.GroupProto.SimpleGroupProfile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GroupMemberProfileOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.GroupMemberProfile) + com.google.protobuf.MessageOrBuilder { + + /** + * .core.GroupMemberRole role = 1; + */ + int getRoleValue(); + /** + * .core.GroupMemberRole role = 1; + */ + com.akaxin.proto.core.GroupProto.GroupMemberRole getRole(); + + /** + * .core.UserProfile profile = 2; + */ + boolean hasProfile(); + /** + * .core.UserProfile profile = 2; + */ + com.akaxin.proto.core.UserProto.UserProfile getProfile(); + /** + * .core.UserProfile profile = 2; + */ + com.akaxin.proto.core.UserProto.UserProfileOrBuilder getProfileOrBuilder(); + } + /** + * Protobuf type {@code core.GroupMemberProfile} + */ + public static final class GroupMemberProfile extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.GroupMemberProfile) + GroupMemberProfileOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupMemberProfile.newBuilder() to construct. + private GroupMemberProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GroupMemberProfile() { + role_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GroupMemberProfile( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + + role_ = rawValue; + break; + } + case 18: { + com.akaxin.proto.core.UserProto.UserProfile.Builder subBuilder = null; + if (profile_ != null) { + subBuilder = profile_.toBuilder(); + } + profile_ = input.readMessage(com.akaxin.proto.core.UserProto.UserProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(profile_); + profile_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.GroupProto.internal_static_core_GroupMemberProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.GroupProto.internal_static_core_GroupMemberProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.GroupProto.GroupMemberProfile.class, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder.class); + } + + public static final int ROLE_FIELD_NUMBER = 1; + private int role_; + /** + * .core.GroupMemberRole role = 1; + */ + public int getRoleValue() { + return role_; + } + /** + * .core.GroupMemberRole role = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberRole getRole() { + com.akaxin.proto.core.GroupProto.GroupMemberRole result = com.akaxin.proto.core.GroupProto.GroupMemberRole.valueOf(role_); + return result == null ? com.akaxin.proto.core.GroupProto.GroupMemberRole.UNRECOGNIZED : result; + } + + public static final int PROFILE_FIELD_NUMBER = 2; + private com.akaxin.proto.core.UserProto.UserProfile profile_; + /** + * .core.UserProfile profile = 2; + */ + public boolean hasProfile() { + return profile_ != null; + } + /** + * .core.UserProfile profile = 2; + */ + public com.akaxin.proto.core.UserProto.UserProfile getProfile() { + return profile_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : profile_; + } + /** + * .core.UserProfile profile = 2; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getProfileOrBuilder() { + return getProfile(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (role_ != com.akaxin.proto.core.GroupProto.GroupMemberRole.NONMEMBER.getNumber()) { + output.writeEnum(1, role_); + } + if (profile_ != null) { + output.writeMessage(2, getProfile()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (role_ != com.akaxin.proto.core.GroupProto.GroupMemberRole.NONMEMBER.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, role_); + } + if (profile_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getProfile()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.GroupProto.GroupMemberProfile)) { + return super.equals(obj); + } + com.akaxin.proto.core.GroupProto.GroupMemberProfile other = (com.akaxin.proto.core.GroupProto.GroupMemberProfile) obj; + + boolean result = true; + result = result && role_ == other.role_; + result = result && (hasProfile() == other.hasProfile()); + if (hasProfile()) { + result = result && getProfile() + .equals(other.getProfile()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ROLE_FIELD_NUMBER; + hash = (53 * hash) + role_; + if (hasProfile()) { + hash = (37 * hash) + PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getProfile().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.GroupProto.GroupMemberProfile parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.GroupProto.GroupMemberProfile parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.GroupProto.GroupMemberProfile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.GroupProto.GroupMemberProfile parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.GroupProto.GroupMemberProfile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.GroupProto.GroupMemberProfile parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.GroupProto.GroupMemberProfile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.GroupProto.GroupMemberProfile parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.GroupProto.GroupMemberProfile parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.GroupProto.GroupMemberProfile parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.GroupProto.GroupMemberProfile parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.GroupProto.GroupMemberProfile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.GroupProto.GroupMemberProfile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code core.GroupMemberProfile} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.GroupMemberProfile) + com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.GroupProto.internal_static_core_GroupMemberProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.GroupProto.internal_static_core_GroupMemberProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.GroupProto.GroupMemberProfile.class, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder.class); + } + + // Construct using com.akaxin.proto.core.GroupProto.GroupMemberProfile.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + role_ = 0; + + if (profileBuilder_ == null) { + profile_ = null; + } else { + profile_ = null; + profileBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.GroupProto.internal_static_core_GroupMemberProfile_descriptor; + } + + public com.akaxin.proto.core.GroupProto.GroupMemberProfile getDefaultInstanceForType() { + return com.akaxin.proto.core.GroupProto.GroupMemberProfile.getDefaultInstance(); + } + + public com.akaxin.proto.core.GroupProto.GroupMemberProfile build() { + com.akaxin.proto.core.GroupProto.GroupMemberProfile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.GroupProto.GroupMemberProfile buildPartial() { + com.akaxin.proto.core.GroupProto.GroupMemberProfile result = new com.akaxin.proto.core.GroupProto.GroupMemberProfile(this); + result.role_ = role_; + if (profileBuilder_ == null) { + result.profile_ = profile_; + } else { + result.profile_ = profileBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.GroupProto.GroupMemberProfile) { + return mergeFrom((com.akaxin.proto.core.GroupProto.GroupMemberProfile)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.GroupProto.GroupMemberProfile other) { + if (other == com.akaxin.proto.core.GroupProto.GroupMemberProfile.getDefaultInstance()) return this; + if (other.role_ != 0) { + setRoleValue(other.getRoleValue()); + } + if (other.hasProfile()) { + mergeProfile(other.getProfile()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.GroupProto.GroupMemberProfile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.GroupProto.GroupMemberProfile) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int role_ = 0; + /** + * .core.GroupMemberRole role = 1; + */ + public int getRoleValue() { + return role_; + } + /** + * .core.GroupMemberRole role = 1; + */ + public Builder setRoleValue(int value) { + role_ = value; + onChanged(); + return this; + } + /** + * .core.GroupMemberRole role = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberRole getRole() { + com.akaxin.proto.core.GroupProto.GroupMemberRole result = com.akaxin.proto.core.GroupProto.GroupMemberRole.valueOf(role_); + return result == null ? com.akaxin.proto.core.GroupProto.GroupMemberRole.UNRECOGNIZED : result; + } + /** + * .core.GroupMemberRole role = 1; + */ + public Builder setRole(com.akaxin.proto.core.GroupProto.GroupMemberRole value) { + if (value == null) { + throw new NullPointerException(); + } + + role_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .core.GroupMemberRole role = 1; + */ + public Builder clearRole() { + + role_ = 0; + onChanged(); + return this; + } + + private com.akaxin.proto.core.UserProto.UserProfile profile_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> profileBuilder_; + /** + * .core.UserProfile profile = 2; + */ + public boolean hasProfile() { + return profileBuilder_ != null || profile_ != null; + } + /** + * .core.UserProfile profile = 2; + */ + public com.akaxin.proto.core.UserProto.UserProfile getProfile() { + if (profileBuilder_ == null) { + return profile_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : profile_; + } else { + return profileBuilder_.getMessage(); + } + } + /** + * .core.UserProfile profile = 2; + */ + public Builder setProfile(com.akaxin.proto.core.UserProto.UserProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profile_ = value; + onChanged(); + } else { + profileBuilder_.setMessage(value); + } + + return this; + } + /** + * .core.UserProfile profile = 2; + */ + public Builder setProfile( + com.akaxin.proto.core.UserProto.UserProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + profile_ = builderForValue.build(); + onChanged(); + } else { + profileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .core.UserProfile profile = 2; + */ + public Builder mergeProfile(com.akaxin.proto.core.UserProto.UserProfile value) { + if (profileBuilder_ == null) { + if (profile_ != null) { + profile_ = + com.akaxin.proto.core.UserProto.UserProfile.newBuilder(profile_).mergeFrom(value).buildPartial(); + } else { + profile_ = value; + } + onChanged(); + } else { + profileBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .core.UserProfile profile = 2; + */ + public Builder clearProfile() { + if (profileBuilder_ == null) { + profile_ = null; + onChanged(); + } else { + profile_ = null; + profileBuilder_ = null; + } + + return this; + } + /** + * .core.UserProfile profile = 2; + */ + public com.akaxin.proto.core.UserProto.UserProfile.Builder getProfileBuilder() { + + onChanged(); + return getProfileFieldBuilder().getBuilder(); + } + /** + * .core.UserProfile profile = 2; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getProfileOrBuilder() { + if (profileBuilder_ != null) { + return profileBuilder_.getMessageOrBuilder(); + } else { + return profile_ == null ? + com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : profile_; + } + } + /** + * .core.UserProfile profile = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> + getProfileFieldBuilder() { + if (profileBuilder_ == null) { + profileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder>( + getProfile(), + getParentForChildren(), + isClean()); + profile_ = null; + } + return profileBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.GroupMemberProfile) + } + + // @@protoc_insertion_point(class_scope:core.GroupMemberProfile) + private static final com.akaxin.proto.core.GroupProto.GroupMemberProfile DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.GroupProto.GroupMemberProfile(); + } + + public static com.akaxin.proto.core.GroupProto.GroupMemberProfile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GroupMemberProfile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GroupMemberProfile(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.GroupProto.GroupMemberProfile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_GroupProfile_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_GroupProfile_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_SimpleGroupProfile_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_SimpleGroupProfile_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_GroupMemberProfile_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_GroupMemberProfile_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\020core/group.proto\022\004core\032\017core/user.prot" + + "o\"L\n\014GroupProfile\022\n\n\002id\030\001 \001(\t\022\014\n\004name\030\002 " + + "\001(\t\022\014\n\004icon\030\004 \001(\t\022\024\n\014group_notice\030\005 \001(\t\"" + + "N\n\022SimpleGroupProfile\022\020\n\010group_id\030\001 \001(\t\022" + + "\022\n\ngroup_name\030\002 \001(\t\022\022\n\ngroup_icon\030\003 \001(\t\"" + + "]\n\022GroupMemberProfile\022#\n\004role\030\001 \001(\0162\025.co" + + "re.GroupMemberRole\022\"\n\007profile\030\002 \001(\0132\021.co" + + "re.UserProfile*B\n\017GroupMemberRole\022\r\n\tNON" + + "MEMBER\020\000\022\n\n\006MEMBER\020\001\022\t\n\005OWNER\020\002\022\t\n\005ADMIN" + + "\020\003*1\n\013GroupStatus\022\020\n\014GROUP_DELETE\020\000\022\020\n\014G", + "ROUP_NORMAL\020\001B#\n\025com.akaxin.proto.coreB\n" + + "GroupProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.UserProto.getDescriptor(), + }, assigner); + internal_static_core_GroupProfile_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_core_GroupProfile_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_GroupProfile_descriptor, + new java.lang.String[] { "Id", "Name", "Icon", "GroupNotice", }); + internal_static_core_SimpleGroupProfile_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_core_SimpleGroupProfile_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_SimpleGroupProfile_descriptor, + new java.lang.String[] { "GroupId", "GroupName", "GroupIcon", }); + internal_static_core_GroupMemberProfile_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_core_GroupMemberProfile_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_GroupMemberProfile_descriptor, + new java.lang.String[] { "Role", "Profile", }); + com.akaxin.proto.core.UserProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/core/PhoneProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/PhoneProto.java new file mode 100755 index 0000000..166bc0d --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/PhoneProto.java @@ -0,0 +1,216 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/phone.proto + +package com.akaxin.proto.core; + +public final class PhoneProto { + private PhoneProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + *
+   *手机验证码类型
+   * 
+ * + * Protobuf enum {@code core.VCType} + */ + public enum VCType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *统一的验证码
+     * 
+ * + * UNIFIED = 0; + */ + UNIFIED(0), + /** + *
+     *手机号同步登陆使用的验证码
+     * 
+ * + * PHONE_LOGIN = 1; + */ + PHONE_LOGIN(1), + /** + *
+     *用户实名使用的验证码
+     * 
+ * + * PHONE_REALNAME = 2; + */ + PHONE_REALNAME(2), + /** + *
+     *通过手机号实名注册平台
+     * 
+ * + * PHONE_REGISTER = 3; + */ + PHONE_REGISTER(3), + /** + *
+     *匿名登陆实名站点,需平台手机注册
+     * 
+ * + * PHONE_REGISTER_FOR_SITE = 4; + */ + PHONE_REGISTER_FOR_SITE(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     *统一的验证码
+     * 
+ * + * UNIFIED = 0; + */ + public static final int UNIFIED_VALUE = 0; + /** + *
+     *手机号同步登陆使用的验证码
+     * 
+ * + * PHONE_LOGIN = 1; + */ + public static final int PHONE_LOGIN_VALUE = 1; + /** + *
+     *用户实名使用的验证码
+     * 
+ * + * PHONE_REALNAME = 2; + */ + public static final int PHONE_REALNAME_VALUE = 2; + /** + *
+     *通过手机号实名注册平台
+     * 
+ * + * PHONE_REGISTER = 3; + */ + public static final int PHONE_REGISTER_VALUE = 3; + /** + *
+     *匿名登陆实名站点,需平台手机注册
+     * 
+ * + * PHONE_REGISTER_FOR_SITE = 4; + */ + public static final int PHONE_REGISTER_FOR_SITE_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VCType valueOf(int value) { + return forNumber(value); + } + + public static VCType forNumber(int value) { + switch (value) { + case 0: return UNIFIED; + case 1: return PHONE_LOGIN; + case 2: return PHONE_REALNAME; + case 3: return PHONE_REGISTER; + case 4: return PHONE_REGISTER_FOR_SITE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + VCType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public VCType findValueByNumber(int number) { + return VCType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.PhoneProto.getDescriptor().getEnumTypes().get(0); + } + + private static final VCType[] VALUES = values(); + + public static VCType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private VCType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.VCType) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\020core/phone.proto\022\004core*k\n\006VCType\022\013\n\007UN" + + "IFIED\020\000\022\017\n\013PHONE_LOGIN\020\001\022\022\n\016PHONE_REALNA" + + "ME\020\002\022\022\n\016PHONE_REGISTER\020\003\022\033\n\027PHONE_REGIST" + + "ER_FOR_SITE\020\004B#\n\025com.akaxin.proto.coreB\n" + + "PhoneProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/core/PluginProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/PluginProto.java new file mode 100755 index 0000000..6940303 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/PluginProto.java @@ -0,0 +1,4298 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/plugin.proto + +package com.akaxin.proto.core; + +public final class PluginProto { + private PluginProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + *
+   *header 里面
+   * 
+ * + * Protobuf enum {@code core.PluginHeaderKey} + */ + public enum PluginHeaderKey + implements com.google.protobuf.ProtocolMessageEnum { + /** + * CLIENT_VERSION = 0; + */ + CLIENT_VERSION(0), + /** + *
+     *当前客户端用户ID
+     * 
+ * + * CLIENT_SITE_USER_ID = 1; + */ + CLIENT_SITE_USER_ID(1), + /** + *
+     *当前用户的sessionID
+     * 
+ * + * CLIENT_SITE_SESSION_ID = 2; + */ + CLIENT_SITE_SESSION_ID(2), + /** + *
+     *使用zaly:goto
+     * 
+ * + * PLUGIN_REFERER = 3; + */ + PLUGIN_REFERER(3), + /** + *
+     *单位ms
+     * 
+ * + * PLUGIN_TIMESTAMP = 4; + */ + PLUGIN_TIMESTAMP(4), + /** + *
+     *扩展的ID
+     * 
+ * + * PLUGIN_ID = 5; + */ + PLUGIN_ID(5), + UNRECOGNIZED(-1), + ; + + /** + * CLIENT_VERSION = 0; + */ + public static final int CLIENT_VERSION_VALUE = 0; + /** + *
+     *当前客户端用户ID
+     * 
+ * + * CLIENT_SITE_USER_ID = 1; + */ + public static final int CLIENT_SITE_USER_ID_VALUE = 1; + /** + *
+     *当前用户的sessionID
+     * 
+ * + * CLIENT_SITE_SESSION_ID = 2; + */ + public static final int CLIENT_SITE_SESSION_ID_VALUE = 2; + /** + *
+     *使用zaly:goto
+     * 
+ * + * PLUGIN_REFERER = 3; + */ + public static final int PLUGIN_REFERER_VALUE = 3; + /** + *
+     *单位ms
+     * 
+ * + * PLUGIN_TIMESTAMP = 4; + */ + public static final int PLUGIN_TIMESTAMP_VALUE = 4; + /** + *
+     *扩展的ID
+     * 
+ * + * PLUGIN_ID = 5; + */ + public static final int PLUGIN_ID_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PluginHeaderKey valueOf(int value) { + return forNumber(value); + } + + public static PluginHeaderKey forNumber(int value) { + switch (value) { + case 0: return CLIENT_VERSION; + case 1: return CLIENT_SITE_USER_ID; + case 2: return CLIENT_SITE_SESSION_ID; + case 3: return PLUGIN_REFERER; + case 4: return PLUGIN_TIMESTAMP; + case 5: return PLUGIN_ID; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PluginHeaderKey> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PluginHeaderKey findValueByNumber(int number) { + return PluginHeaderKey.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.PluginProto.getDescriptor().getEnumTypes().get(0); + } + + private static final PluginHeaderKey[] VALUES = values(); + + public static PluginHeaderKey valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PluginHeaderKey(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.PluginHeaderKey) + } + + /** + * Protobuf enum {@code core.PermissionStatus} + */ + public enum PermissionStatus + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *禁用状态
+     * 
+ * + * DISABLED = 0; + */ + DISABLED(0), + /** + *
+     *可用状态
+     * 
+ * + * AVAILABLE = 1; + */ + AVAILABLE(1), + UNRECOGNIZED(-1), + ; + + /** + *
+     *禁用状态
+     * 
+ * + * DISABLED = 0; + */ + public static final int DISABLED_VALUE = 0; + /** + *
+     *可用状态
+     * 
+ * + * AVAILABLE = 1; + */ + public static final int AVAILABLE_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PermissionStatus valueOf(int value) { + return forNumber(value); + } + + public static PermissionStatus forNumber(int value) { + switch (value) { + case 0: return DISABLED; + case 1: return AVAILABLE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PermissionStatus> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PermissionStatus findValueByNumber(int number) { + return PermissionStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.PluginProto.getDescriptor().getEnumTypes().get(1); + } + + private static final PermissionStatus[] VALUES = values(); + + public static PermissionStatus valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PermissionStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.PermissionStatus) + } + + /** + * Protobuf enum {@code core.PluginPosition} + */ + public enum PluginPosition + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *首页位置
+     * 
+ * + * HOME_PAGE = 0; + */ + HOME_PAGE(0), + /** + *
+     *消息帧位置
+     * 
+ * + * MSG_PAGE = 1; + */ + MSG_PAGE(1), + UNRECOGNIZED(-1), + ; + + /** + *
+     *首页位置
+     * 
+ * + * HOME_PAGE = 0; + */ + public static final int HOME_PAGE_VALUE = 0; + /** + *
+     *消息帧位置
+     * 
+ * + * MSG_PAGE = 1; + */ + public static final int MSG_PAGE_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PluginPosition valueOf(int value) { + return forNumber(value); + } + + public static PluginPosition forNumber(int value) { + switch (value) { + case 0: return HOME_PAGE; + case 1: return MSG_PAGE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PluginPosition> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PluginPosition findValueByNumber(int number) { + return PluginPosition.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.PluginProto.getDescriptor().getEnumTypes().get(2); + } + + private static final PluginPosition[] VALUES = values(); + + public static PluginPosition valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PluginPosition(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.PluginPosition) + } + + /** + * Protobuf enum {@code core.PluginDisplayMode} + */ + public enum PluginDisplayMode + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *默认,新页面
+     * 
+ * + * NEW_PAGE = 0; + */ + NEW_PAGE(0), + /** + *
+     *浮屏
+     * 
+ * + * FLOATING_SCREEN = 1; + */ + FLOATING_SCREEN(1), + /** + *
+     *分屏
+     * 
+ * + * SPLIT_SCREEN = 2; + */ + SPLIT_SCREEN(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     *默认,新页面
+     * 
+ * + * NEW_PAGE = 0; + */ + public static final int NEW_PAGE_VALUE = 0; + /** + *
+     *浮屏
+     * 
+ * + * FLOATING_SCREEN = 1; + */ + public static final int FLOATING_SCREEN_VALUE = 1; + /** + *
+     *分屏
+     * 
+ * + * SPLIT_SCREEN = 2; + */ + public static final int SPLIT_SCREEN_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PluginDisplayMode valueOf(int value) { + return forNumber(value); + } + + public static PluginDisplayMode forNumber(int value) { + switch (value) { + case 0: return NEW_PAGE; + case 1: return FLOATING_SCREEN; + case 2: return SPLIT_SCREEN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PluginDisplayMode> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PluginDisplayMode findValueByNumber(int number) { + return PluginDisplayMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.PluginProto.getDescriptor().getEnumTypes().get(3); + } + + private static final PluginDisplayMode[] VALUES = values(); + + public static PluginDisplayMode valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PluginDisplayMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.PluginDisplayMode) + } + + public interface ProxyPluginPackageOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.ProxyPluginPackage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *header
+     * 
+ * + * map<int32, string> plugin_header = 1; + */ + int getPluginHeaderCount(); + /** + *
+     *header
+     * 
+ * + * map<int32, string> plugin_header = 1; + */ + boolean containsPluginHeader( + int key); + /** + * Use {@link #getPluginHeaderMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getPluginHeader(); + /** + *
+     *header
+     * 
+ * + * map<int32, string> plugin_header = 1; + */ + java.util.Map + getPluginHeaderMap(); + /** + *
+     *header
+     * 
+ * + * map<int32, string> plugin_header = 1; + */ + + java.lang.String getPluginHeaderOrDefault( + int key, + java.lang.String defaultValue); + /** + *
+     *header
+     * 
+ * + * map<int32, string> plugin_header = 1; + */ + + java.lang.String getPluginHeaderOrThrow( + int key); + + /** + *
+     *data在赋值之前先base64
+     *site -> plugin 是开发者自定义的格式
+     *plugin -> site 为具体请求的proto格式
+     * 
+ * + * string data = 2; + */ + java.lang.String getData(); + /** + *
+     *data在赋值之前先base64
+     *site -> plugin 是开发者自定义的格式
+     *plugin -> site 为具体请求的proto格式
+     * 
+ * + * string data = 2; + */ + com.google.protobuf.ByteString + getDataBytes(); + + /** + *
+     *error信息
+     * 
+ * + * .core.ErrorInfo error_info = 3; + */ + boolean hasErrorInfo(); + /** + *
+     *error信息
+     * 
+ * + * .core.ErrorInfo error_info = 3; + */ + com.akaxin.proto.core.CoreProto.ErrorInfo getErrorInfo(); + /** + *
+     *error信息
+     * 
+ * + * .core.ErrorInfo error_info = 3; + */ + com.akaxin.proto.core.CoreProto.ErrorInfoOrBuilder getErrorInfoOrBuilder(); + } + /** + *
+   * site 与plugin之间交互传输的package包
+   * 
+ * + * Protobuf type {@code core.ProxyPluginPackage} + */ + public static final class ProxyPluginPackage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.ProxyPluginPackage) + ProxyPluginPackageOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProxyPluginPackage.newBuilder() to construct. + private ProxyPluginPackage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProxyPluginPackage() { + data_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ProxyPluginPackage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + pluginHeader_ = com.google.protobuf.MapField.newMapField( + PluginHeaderDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + pluginHeader__ = input.readMessage( + PluginHeaderDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + pluginHeader_.getMutableMap().put( + pluginHeader__.getKey(), pluginHeader__.getValue()); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + data_ = s; + break; + } + case 26: { + com.akaxin.proto.core.CoreProto.ErrorInfo.Builder subBuilder = null; + if (errorInfo_ != null) { + subBuilder = errorInfo_.toBuilder(); + } + errorInfo_ = input.readMessage(com.akaxin.proto.core.CoreProto.ErrorInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(errorInfo_); + errorInfo_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.PluginProto.internal_static_core_ProxyPluginPackage_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetPluginHeader(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.PluginProto.internal_static_core_ProxyPluginPackage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.PluginProto.ProxyPluginPackage.class, com.akaxin.proto.core.PluginProto.ProxyPluginPackage.Builder.class); + } + + private int bitField0_; + public static final int PLUGIN_HEADER_FIELD_NUMBER = 1; + private static final class PluginHeaderDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.akaxin.proto.core.PluginProto.internal_static_core_ProxyPluginPackage_PluginHeaderEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.String> pluginHeader_; + private com.google.protobuf.MapField + internalGetPluginHeader() { + if (pluginHeader_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PluginHeaderDefaultEntryHolder.defaultEntry); + } + return pluginHeader_; + } + + public int getPluginHeaderCount() { + return internalGetPluginHeader().getMap().size(); + } + /** + *
+     *header
+     * 
+ * + * map<int32, string> plugin_header = 1; + */ + + public boolean containsPluginHeader( + int key) { + + return internalGetPluginHeader().getMap().containsKey(key); + } + /** + * Use {@link #getPluginHeaderMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getPluginHeader() { + return getPluginHeaderMap(); + } + /** + *
+     *header
+     * 
+ * + * map<int32, string> plugin_header = 1; + */ + + public java.util.Map getPluginHeaderMap() { + return internalGetPluginHeader().getMap(); + } + /** + *
+     *header
+     * 
+ * + * map<int32, string> plugin_header = 1; + */ + + public java.lang.String getPluginHeaderOrDefault( + int key, + java.lang.String defaultValue) { + + java.util.Map map = + internalGetPluginHeader().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     *header
+     * 
+ * + * map<int32, string> plugin_header = 1; + */ + + public java.lang.String getPluginHeaderOrThrow( + int key) { + + java.util.Map map = + internalGetPluginHeader().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DATA_FIELD_NUMBER = 2; + private volatile java.lang.Object data_; + /** + *
+     *data在赋值之前先base64
+     *site -> plugin 是开发者自定义的格式
+     *plugin -> site 为具体请求的proto格式
+     * 
+ * + * string data = 2; + */ + public java.lang.String getData() { + java.lang.Object ref = data_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + data_ = s; + return s; + } + } + /** + *
+     *data在赋值之前先base64
+     *site -> plugin 是开发者自定义的格式
+     *plugin -> site 为具体请求的proto格式
+     * 
+ * + * string data = 2; + */ + public com.google.protobuf.ByteString + getDataBytes() { + java.lang.Object ref = data_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + data_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_INFO_FIELD_NUMBER = 3; + private com.akaxin.proto.core.CoreProto.ErrorInfo errorInfo_; + /** + *
+     *error信息
+     * 
+ * + * .core.ErrorInfo error_info = 3; + */ + public boolean hasErrorInfo() { + return errorInfo_ != null; + } + /** + *
+     *error信息
+     * 
+ * + * .core.ErrorInfo error_info = 3; + */ + public com.akaxin.proto.core.CoreProto.ErrorInfo getErrorInfo() { + return errorInfo_ == null ? com.akaxin.proto.core.CoreProto.ErrorInfo.getDefaultInstance() : errorInfo_; + } + /** + *
+     *error信息
+     * 
+ * + * .core.ErrorInfo error_info = 3; + */ + public com.akaxin.proto.core.CoreProto.ErrorInfoOrBuilder getErrorInfoOrBuilder() { + return getErrorInfo(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetPluginHeader(), + PluginHeaderDefaultEntryHolder.defaultEntry, + 1); + if (!getDataBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, data_); + } + if (errorInfo_ != null) { + output.writeMessage(3, getErrorInfo()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetPluginHeader().getMap().entrySet()) { + com.google.protobuf.MapEntry + pluginHeader__ = PluginHeaderDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, pluginHeader__); + } + if (!getDataBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, data_); + } + if (errorInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getErrorInfo()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.PluginProto.ProxyPluginPackage)) { + return super.equals(obj); + } + com.akaxin.proto.core.PluginProto.ProxyPluginPackage other = (com.akaxin.proto.core.PluginProto.ProxyPluginPackage) obj; + + boolean result = true; + result = result && internalGetPluginHeader().equals( + other.internalGetPluginHeader()); + result = result && getData() + .equals(other.getData()); + result = result && (hasErrorInfo() == other.hasErrorInfo()); + if (hasErrorInfo()) { + result = result && getErrorInfo() + .equals(other.getErrorInfo()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetPluginHeader().getMap().isEmpty()) { + hash = (37 * hash) + PLUGIN_HEADER_FIELD_NUMBER; + hash = (53 * hash) + internalGetPluginHeader().hashCode(); + } + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + if (hasErrorInfo()) { + hash = (37 * hash) + ERROR_INFO_FIELD_NUMBER; + hash = (53 * hash) + getErrorInfo().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.PluginProto.ProxyPluginPackage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.PluginProto.ProxyPluginPackage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.PluginProto.ProxyPluginPackage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.PluginProto.ProxyPluginPackage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.PluginProto.ProxyPluginPackage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.PluginProto.ProxyPluginPackage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.PluginProto.ProxyPluginPackage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.PluginProto.ProxyPluginPackage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.PluginProto.ProxyPluginPackage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.PluginProto.ProxyPluginPackage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.PluginProto.ProxyPluginPackage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.PluginProto.ProxyPluginPackage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.PluginProto.ProxyPluginPackage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * site 与plugin之间交互传输的package包
+     * 
+ * + * Protobuf type {@code core.ProxyPluginPackage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.ProxyPluginPackage) + com.akaxin.proto.core.PluginProto.ProxyPluginPackageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.PluginProto.internal_static_core_ProxyPluginPackage_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetPluginHeader(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutablePluginHeader(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.PluginProto.internal_static_core_ProxyPluginPackage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.PluginProto.ProxyPluginPackage.class, com.akaxin.proto.core.PluginProto.ProxyPluginPackage.Builder.class); + } + + // Construct using com.akaxin.proto.core.PluginProto.ProxyPluginPackage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + internalGetMutablePluginHeader().clear(); + data_ = ""; + + if (errorInfoBuilder_ == null) { + errorInfo_ = null; + } else { + errorInfo_ = null; + errorInfoBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.PluginProto.internal_static_core_ProxyPluginPackage_descriptor; + } + + public com.akaxin.proto.core.PluginProto.ProxyPluginPackage getDefaultInstanceForType() { + return com.akaxin.proto.core.PluginProto.ProxyPluginPackage.getDefaultInstance(); + } + + public com.akaxin.proto.core.PluginProto.ProxyPluginPackage build() { + com.akaxin.proto.core.PluginProto.ProxyPluginPackage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.PluginProto.ProxyPluginPackage buildPartial() { + com.akaxin.proto.core.PluginProto.ProxyPluginPackage result = new com.akaxin.proto.core.PluginProto.ProxyPluginPackage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.pluginHeader_ = internalGetPluginHeader(); + result.pluginHeader_.makeImmutable(); + result.data_ = data_; + if (errorInfoBuilder_ == null) { + result.errorInfo_ = errorInfo_; + } else { + result.errorInfo_ = errorInfoBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.PluginProto.ProxyPluginPackage) { + return mergeFrom((com.akaxin.proto.core.PluginProto.ProxyPluginPackage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.PluginProto.ProxyPluginPackage other) { + if (other == com.akaxin.proto.core.PluginProto.ProxyPluginPackage.getDefaultInstance()) return this; + internalGetMutablePluginHeader().mergeFrom( + other.internalGetPluginHeader()); + if (!other.getData().isEmpty()) { + data_ = other.data_; + onChanged(); + } + if (other.hasErrorInfo()) { + mergeErrorInfo(other.getErrorInfo()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.PluginProto.ProxyPluginPackage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.PluginProto.ProxyPluginPackage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.String> pluginHeader_; + private com.google.protobuf.MapField + internalGetPluginHeader() { + if (pluginHeader_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PluginHeaderDefaultEntryHolder.defaultEntry); + } + return pluginHeader_; + } + private com.google.protobuf.MapField + internalGetMutablePluginHeader() { + onChanged();; + if (pluginHeader_ == null) { + pluginHeader_ = com.google.protobuf.MapField.newMapField( + PluginHeaderDefaultEntryHolder.defaultEntry); + } + if (!pluginHeader_.isMutable()) { + pluginHeader_ = pluginHeader_.copy(); + } + return pluginHeader_; + } + + public int getPluginHeaderCount() { + return internalGetPluginHeader().getMap().size(); + } + /** + *
+       *header
+       * 
+ * + * map<int32, string> plugin_header = 1; + */ + + public boolean containsPluginHeader( + int key) { + + return internalGetPluginHeader().getMap().containsKey(key); + } + /** + * Use {@link #getPluginHeaderMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getPluginHeader() { + return getPluginHeaderMap(); + } + /** + *
+       *header
+       * 
+ * + * map<int32, string> plugin_header = 1; + */ + + public java.util.Map getPluginHeaderMap() { + return internalGetPluginHeader().getMap(); + } + /** + *
+       *header
+       * 
+ * + * map<int32, string> plugin_header = 1; + */ + + public java.lang.String getPluginHeaderOrDefault( + int key, + java.lang.String defaultValue) { + + java.util.Map map = + internalGetPluginHeader().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       *header
+       * 
+ * + * map<int32, string> plugin_header = 1; + */ + + public java.lang.String getPluginHeaderOrThrow( + int key) { + + java.util.Map map = + internalGetPluginHeader().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearPluginHeader() { + internalGetMutablePluginHeader().getMutableMap() + .clear(); + return this; + } + /** + *
+       *header
+       * 
+ * + * map<int32, string> plugin_header = 1; + */ + + public Builder removePluginHeader( + int key) { + + internalGetMutablePluginHeader().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutablePluginHeader() { + return internalGetMutablePluginHeader().getMutableMap(); + } + /** + *
+       *header
+       * 
+ * + * map<int32, string> plugin_header = 1; + */ + public Builder putPluginHeader( + int key, + java.lang.String value) { + + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutablePluginHeader().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       *header
+       * 
+ * + * map<int32, string> plugin_header = 1; + */ + + public Builder putAllPluginHeader( + java.util.Map values) { + internalGetMutablePluginHeader().getMutableMap() + .putAll(values); + return this; + } + + private java.lang.Object data_ = ""; + /** + *
+       *data在赋值之前先base64
+       *site -> plugin 是开发者自定义的格式
+       *plugin -> site 为具体请求的proto格式
+       * 
+ * + * string data = 2; + */ + public java.lang.String getData() { + java.lang.Object ref = data_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + data_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *data在赋值之前先base64
+       *site -> plugin 是开发者自定义的格式
+       *plugin -> site 为具体请求的proto格式
+       * 
+ * + * string data = 2; + */ + public com.google.protobuf.ByteString + getDataBytes() { + java.lang.Object ref = data_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + data_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *data在赋值之前先base64
+       *site -> plugin 是开发者自定义的格式
+       *plugin -> site 为具体请求的proto格式
+       * 
+ * + * string data = 2; + */ + public Builder setData( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + data_ = value; + onChanged(); + return this; + } + /** + *
+       *data在赋值之前先base64
+       *site -> plugin 是开发者自定义的格式
+       *plugin -> site 为具体请求的proto格式
+       * 
+ * + * string data = 2; + */ + public Builder clearData() { + + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + /** + *
+       *data在赋值之前先base64
+       *site -> plugin 是开发者自定义的格式
+       *plugin -> site 为具体请求的proto格式
+       * 
+ * + * string data = 2; + */ + public Builder setDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + data_ = value; + onChanged(); + return this; + } + + private com.akaxin.proto.core.CoreProto.ErrorInfo errorInfo_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.ErrorInfo, com.akaxin.proto.core.CoreProto.ErrorInfo.Builder, com.akaxin.proto.core.CoreProto.ErrorInfoOrBuilder> errorInfoBuilder_; + /** + *
+       *error信息
+       * 
+ * + * .core.ErrorInfo error_info = 3; + */ + public boolean hasErrorInfo() { + return errorInfoBuilder_ != null || errorInfo_ != null; + } + /** + *
+       *error信息
+       * 
+ * + * .core.ErrorInfo error_info = 3; + */ + public com.akaxin.proto.core.CoreProto.ErrorInfo getErrorInfo() { + if (errorInfoBuilder_ == null) { + return errorInfo_ == null ? com.akaxin.proto.core.CoreProto.ErrorInfo.getDefaultInstance() : errorInfo_; + } else { + return errorInfoBuilder_.getMessage(); + } + } + /** + *
+       *error信息
+       * 
+ * + * .core.ErrorInfo error_info = 3; + */ + public Builder setErrorInfo(com.akaxin.proto.core.CoreProto.ErrorInfo value) { + if (errorInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + errorInfo_ = value; + onChanged(); + } else { + errorInfoBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *error信息
+       * 
+ * + * .core.ErrorInfo error_info = 3; + */ + public Builder setErrorInfo( + com.akaxin.proto.core.CoreProto.ErrorInfo.Builder builderForValue) { + if (errorInfoBuilder_ == null) { + errorInfo_ = builderForValue.build(); + onChanged(); + } else { + errorInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *error信息
+       * 
+ * + * .core.ErrorInfo error_info = 3; + */ + public Builder mergeErrorInfo(com.akaxin.proto.core.CoreProto.ErrorInfo value) { + if (errorInfoBuilder_ == null) { + if (errorInfo_ != null) { + errorInfo_ = + com.akaxin.proto.core.CoreProto.ErrorInfo.newBuilder(errorInfo_).mergeFrom(value).buildPartial(); + } else { + errorInfo_ = value; + } + onChanged(); + } else { + errorInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *error信息
+       * 
+ * + * .core.ErrorInfo error_info = 3; + */ + public Builder clearErrorInfo() { + if (errorInfoBuilder_ == null) { + errorInfo_ = null; + onChanged(); + } else { + errorInfo_ = null; + errorInfoBuilder_ = null; + } + + return this; + } + /** + *
+       *error信息
+       * 
+ * + * .core.ErrorInfo error_info = 3; + */ + public com.akaxin.proto.core.CoreProto.ErrorInfo.Builder getErrorInfoBuilder() { + + onChanged(); + return getErrorInfoFieldBuilder().getBuilder(); + } + /** + *
+       *error信息
+       * 
+ * + * .core.ErrorInfo error_info = 3; + */ + public com.akaxin.proto.core.CoreProto.ErrorInfoOrBuilder getErrorInfoOrBuilder() { + if (errorInfoBuilder_ != null) { + return errorInfoBuilder_.getMessageOrBuilder(); + } else { + return errorInfo_ == null ? + com.akaxin.proto.core.CoreProto.ErrorInfo.getDefaultInstance() : errorInfo_; + } + } + /** + *
+       *error信息
+       * 
+ * + * .core.ErrorInfo error_info = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.ErrorInfo, com.akaxin.proto.core.CoreProto.ErrorInfo.Builder, com.akaxin.proto.core.CoreProto.ErrorInfoOrBuilder> + getErrorInfoFieldBuilder() { + if (errorInfoBuilder_ == null) { + errorInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.ErrorInfo, com.akaxin.proto.core.CoreProto.ErrorInfo.Builder, com.akaxin.proto.core.CoreProto.ErrorInfoOrBuilder>( + getErrorInfo(), + getParentForChildren(), + isClean()); + errorInfo_ = null; + } + return errorInfoBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.ProxyPluginPackage) + } + + // @@protoc_insertion_point(class_scope:core.ProxyPluginPackage) + private static final com.akaxin.proto.core.PluginProto.ProxyPluginPackage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.PluginProto.ProxyPluginPackage(); + } + + public static com.akaxin.proto.core.PluginProto.ProxyPluginPackage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ProxyPluginPackage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProxyPluginPackage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.PluginProto.ProxyPluginPackage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PluginOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.Plugin) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 对于一个特定的Site,plugin.id 是唯一的。
+     * 
+ * + * string id = 1; + */ + java.lang.String getId(); + /** + *
+     * 对于一个特定的Site,plugin.id 是唯一的。
+     * 
+ * + * string id = 1; + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+     * 扩展名字,会显示在界面上
+     * 
+ * + * string name = 2; + */ + java.lang.String getName(); + /** + *
+     * 扩展名字,会显示在界面上
+     * 
+ * + * string name = 2; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * 落地页地址
+     * 以http或https开头,客户端直接以url_page作为网址渲染webview
+     * 否则,为api.proxy.page 请求的page参数值,默认为空
+     * 如:
+     * value= https://www.google.com 直接以此网址加载webview。
+     * value= main,代表通过api.proxy.page接口请求main页面。
+     * value= 空,代表通过api.proxy.page接口请求空页面(pluginServer自己把空返回默认主页)
+     * 
+ * + * string url_page = 3; + */ + java.lang.String getUrlPage(); + /** + *
+     * 落地页地址
+     * 以http或https开头,客户端直接以url_page作为网址渲染webview
+     * 否则,为api.proxy.page 请求的page参数值,默认为空
+     * 如:
+     * value= https://www.google.com 直接以此网址加载webview。
+     * value= main,代表通过api.proxy.page接口请求main页面。
+     * value= 空,代表通过api.proxy.page接口请求空页面(pluginServer自己把空返回默认主页)
+     * 
+ * + * string url_page = 3; + */ + com.google.protobuf.ByteString + getUrlPageBytes(); + + /** + *
+     * api.plugin.proxy 请求转发请求时的目的URL
+     * 此URL只能以http或者https开头,如无则为http
+     * ====IMPORTANT====
+     * 此api是给server用的,不允许传递此值到客户端。如复用此结构必须在传递给客户端之前将此值置空。
+     * 
+ * + * string api_url = 4; + */ + java.lang.String getApiUrl(); + /** + *
+     * api.plugin.proxy 请求转发请求时的目的URL
+     * 此URL只能以http或者https开头,如无则为http
+     * ====IMPORTANT====
+     * 此api是给server用的,不允许传递此值到客户端。如复用此结构必须在传递给客户端之前将此值置空。
+     * 
+ * + * string api_url = 4; + */ + com.google.protobuf.ByteString + getApiUrlBytes(); + + /** + *
+     * 扩展图标文件,会显示在界面上
+     * 如果以http开头,则代表着这是一个http协议的文件。
+     * 否则,通过site-download功能下载此图片。
+     * 
+ * + * string icon = 5; + */ + java.lang.String getIcon(); + /** + *
+     * 扩展图标文件,会显示在界面上
+     * 如果以http开头,则代表着这是一个http协议的文件。
+     * 否则,通过site-download功能下载此图片。
+     * 
+ * + * string icon = 5; + */ + com.google.protobuf.ByteString + getIconBytes(); + + /** + *
+     * pluginServer 在 请求 siteServer的innerAPI时,使用此值加密数据,以证明身份。
+     * 添加扩展时由SiteServer自动生成并记录,为64个[A-Za-z0-9]组成的随机字符串。
+     * site 使用auth_key 加密发送给plugin的整个proto
+     * 同时 site使用auth_key解析 plugin传递过来的具体proto值
+     * 
+ * + * string auth_key = 6; + */ + java.lang.String getAuthKey(); + /** + *
+     * pluginServer 在 请求 siteServer的innerAPI时,使用此值加密数据,以证明身份。
+     * 添加扩展时由SiteServer自动生成并记录,为64个[A-Za-z0-9]组成的随机字符串。
+     * site 使用auth_key 加密发送给plugin的整个proto
+     * 同时 site使用auth_key解析 plugin传递过来的具体proto值
+     * 
+ * + * string auth_key = 6; + */ + com.google.protobuf.ByteString + getAuthKeyBytes(); + + /** + *
+     * site server的innerAPI允许的pluginServer地址。
+     * 默认为127.0.0.1,如为空则代表不限制,此外:支持网络掩码的配置方式。
+     * 如果有多个ip,以英文逗号[,]隔开。
+     * 
+ * + * string allowed_ip = 7; + */ + java.lang.String getAllowedIp(); + /** + *
+     * site server的innerAPI允许的pluginServer地址。
+     * 默认为127.0.0.1,如为空则代表不限制,此外:支持网络掩码的配置方式。
+     * 如果有多个ip,以英文逗号[,]隔开。
+     * 
+ * + * string allowed_ip = 7; + */ + com.google.protobuf.ByteString + getAllowedIpBytes(); + + /** + *
+     * 扩展的位置【应该为一个枚举】
+     * 值:首页、消息帧
+     * 本次不允许首页并且消息帧这个类型。
+     * 
+ * + * .core.PluginPosition position = 8; + */ + int getPositionValue(); + /** + *
+     * 扩展的位置【应该为一个枚举】
+     * 值:首页、消息帧
+     * 本次不允许首页并且消息帧这个类型。
+     * 
+ * + * .core.PluginPosition position = 8; + */ + com.akaxin.proto.core.PluginProto.PluginPosition getPosition(); + + /** + *
+     * 显示顺序
+     * 当一个位置,有多个扩展时,此处描述顺序,数字越小,排列越靠前(从上往下,从左往右排列)
+     * 
+ * + * int32 order = 9; + */ + int getOrder(); + + /** + *
+     * 展现方式【应该为一个枚举】
+     * 默认、浮屏、分屏
+     * 目前写死【默认】
+     * 
+ * + * .core.PluginDisplayMode display_mode = 10; + */ + int getDisplayModeValue(); + /** + *
+     * 展现方式【应该为一个枚举】
+     * 默认、浮屏、分屏
+     * 目前写死【默认】
+     * 
+ * + * .core.PluginDisplayMode display_mode = 10; + */ + com.akaxin.proto.core.PluginProto.PluginDisplayMode getDisplayMode(); + + /** + *
+     * 可用状态
+     * - 禁用
+     * - 管理员可用
+     * - 全员可用
+     * 
+ * + * .core.PermissionStatus permission_status = 11; + */ + int getPermissionStatusValue(); + /** + *
+     * 可用状态
+     * - 禁用
+     * - 管理员可用
+     * - 全员可用
+     * 
+ * + * .core.PermissionStatus permission_status = 11; + */ + com.akaxin.proto.core.PluginProto.PermissionStatus getPermissionStatus(); + + /** + *
+     * 使用auth_key加密的用户session
+     * 
+ * + * string encrypted_session_id_base64 = 12; + */ + java.lang.String getEncryptedSessionIdBase64(); + /** + *
+     * 使用auth_key加密的用户session
+     * 
+ * + * string encrypted_session_id_base64 = 12; + */ + com.google.protobuf.ByteString + getEncryptedSessionIdBase64Bytes(); + } + /** + * Protobuf type {@code core.Plugin} + */ + public static final class Plugin extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.Plugin) + PluginOrBuilder { + private static final long serialVersionUID = 0L; + // Use Plugin.newBuilder() to construct. + private Plugin(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Plugin() { + id_ = ""; + name_ = ""; + urlPage_ = ""; + apiUrl_ = ""; + icon_ = ""; + authKey_ = ""; + allowedIp_ = ""; + position_ = 0; + order_ = 0; + displayMode_ = 0; + permissionStatus_ = 0; + encryptedSessionIdBase64_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Plugin( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + urlPage_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + apiUrl_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + icon_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + authKey_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + allowedIp_ = s; + break; + } + case 64: { + int rawValue = input.readEnum(); + + position_ = rawValue; + break; + } + case 72: { + + order_ = input.readInt32(); + break; + } + case 80: { + int rawValue = input.readEnum(); + + displayMode_ = rawValue; + break; + } + case 88: { + int rawValue = input.readEnum(); + + permissionStatus_ = rawValue; + break; + } + case 98: { + java.lang.String s = input.readStringRequireUtf8(); + + encryptedSessionIdBase64_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.PluginProto.internal_static_core_Plugin_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.PluginProto.internal_static_core_Plugin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.PluginProto.Plugin.class, com.akaxin.proto.core.PluginProto.Plugin.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + *
+     * 对于一个特定的Site,plugin.id 是唯一的。
+     * 
+ * + * string id = 1; + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+     * 对于一个特定的Site,plugin.id 是唯一的。
+     * 
+ * + * string id = 1; + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + *
+     * 扩展名字,会显示在界面上
+     * 
+ * + * string name = 2; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+     * 扩展名字,会显示在界面上
+     * 
+ * + * string name = 2; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_PAGE_FIELD_NUMBER = 3; + private volatile java.lang.Object urlPage_; + /** + *
+     * 落地页地址
+     * 以http或https开头,客户端直接以url_page作为网址渲染webview
+     * 否则,为api.proxy.page 请求的page参数值,默认为空
+     * 如:
+     * value= https://www.google.com 直接以此网址加载webview。
+     * value= main,代表通过api.proxy.page接口请求main页面。
+     * value= 空,代表通过api.proxy.page接口请求空页面(pluginServer自己把空返回默认主页)
+     * 
+ * + * string url_page = 3; + */ + public java.lang.String getUrlPage() { + java.lang.Object ref = urlPage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + urlPage_ = s; + return s; + } + } + /** + *
+     * 落地页地址
+     * 以http或https开头,客户端直接以url_page作为网址渲染webview
+     * 否则,为api.proxy.page 请求的page参数值,默认为空
+     * 如:
+     * value= https://www.google.com 直接以此网址加载webview。
+     * value= main,代表通过api.proxy.page接口请求main页面。
+     * value= 空,代表通过api.proxy.page接口请求空页面(pluginServer自己把空返回默认主页)
+     * 
+ * + * string url_page = 3; + */ + public com.google.protobuf.ByteString + getUrlPageBytes() { + java.lang.Object ref = urlPage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + urlPage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int API_URL_FIELD_NUMBER = 4; + private volatile java.lang.Object apiUrl_; + /** + *
+     * api.plugin.proxy 请求转发请求时的目的URL
+     * 此URL只能以http或者https开头,如无则为http
+     * ====IMPORTANT====
+     * 此api是给server用的,不允许传递此值到客户端。如复用此结构必须在传递给客户端之前将此值置空。
+     * 
+ * + * string api_url = 4; + */ + public java.lang.String getApiUrl() { + java.lang.Object ref = apiUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiUrl_ = s; + return s; + } + } + /** + *
+     * api.plugin.proxy 请求转发请求时的目的URL
+     * 此URL只能以http或者https开头,如无则为http
+     * ====IMPORTANT====
+     * 此api是给server用的,不允许传递此值到客户端。如复用此结构必须在传递给客户端之前将此值置空。
+     * 
+ * + * string api_url = 4; + */ + public com.google.protobuf.ByteString + getApiUrlBytes() { + java.lang.Object ref = apiUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ICON_FIELD_NUMBER = 5; + private volatile java.lang.Object icon_; + /** + *
+     * 扩展图标文件,会显示在界面上
+     * 如果以http开头,则代表着这是一个http协议的文件。
+     * 否则,通过site-download功能下载此图片。
+     * 
+ * + * string icon = 5; + */ + public java.lang.String getIcon() { + java.lang.Object ref = icon_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + icon_ = s; + return s; + } + } + /** + *
+     * 扩展图标文件,会显示在界面上
+     * 如果以http开头,则代表着这是一个http协议的文件。
+     * 否则,通过site-download功能下载此图片。
+     * 
+ * + * string icon = 5; + */ + public com.google.protobuf.ByteString + getIconBytes() { + java.lang.Object ref = icon_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + icon_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTH_KEY_FIELD_NUMBER = 6; + private volatile java.lang.Object authKey_; + /** + *
+     * pluginServer 在 请求 siteServer的innerAPI时,使用此值加密数据,以证明身份。
+     * 添加扩展时由SiteServer自动生成并记录,为64个[A-Za-z0-9]组成的随机字符串。
+     * site 使用auth_key 加密发送给plugin的整个proto
+     * 同时 site使用auth_key解析 plugin传递过来的具体proto值
+     * 
+ * + * string auth_key = 6; + */ + public java.lang.String getAuthKey() { + java.lang.Object ref = authKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authKey_ = s; + return s; + } + } + /** + *
+     * pluginServer 在 请求 siteServer的innerAPI时,使用此值加密数据,以证明身份。
+     * 添加扩展时由SiteServer自动生成并记录,为64个[A-Za-z0-9]组成的随机字符串。
+     * site 使用auth_key 加密发送给plugin的整个proto
+     * 同时 site使用auth_key解析 plugin传递过来的具体proto值
+     * 
+ * + * string auth_key = 6; + */ + public com.google.protobuf.ByteString + getAuthKeyBytes() { + java.lang.Object ref = authKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + authKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOWED_IP_FIELD_NUMBER = 7; + private volatile java.lang.Object allowedIp_; + /** + *
+     * site server的innerAPI允许的pluginServer地址。
+     * 默认为127.0.0.1,如为空则代表不限制,此外:支持网络掩码的配置方式。
+     * 如果有多个ip,以英文逗号[,]隔开。
+     * 
+ * + * string allowed_ip = 7; + */ + public java.lang.String getAllowedIp() { + java.lang.Object ref = allowedIp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + allowedIp_ = s; + return s; + } + } + /** + *
+     * site server的innerAPI允许的pluginServer地址。
+     * 默认为127.0.0.1,如为空则代表不限制,此外:支持网络掩码的配置方式。
+     * 如果有多个ip,以英文逗号[,]隔开。
+     * 
+ * + * string allowed_ip = 7; + */ + public com.google.protobuf.ByteString + getAllowedIpBytes() { + java.lang.Object ref = allowedIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + allowedIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POSITION_FIELD_NUMBER = 8; + private int position_; + /** + *
+     * 扩展的位置【应该为一个枚举】
+     * 值:首页、消息帧
+     * 本次不允许首页并且消息帧这个类型。
+     * 
+ * + * .core.PluginPosition position = 8; + */ + public int getPositionValue() { + return position_; + } + /** + *
+     * 扩展的位置【应该为一个枚举】
+     * 值:首页、消息帧
+     * 本次不允许首页并且消息帧这个类型。
+     * 
+ * + * .core.PluginPosition position = 8; + */ + public com.akaxin.proto.core.PluginProto.PluginPosition getPosition() { + com.akaxin.proto.core.PluginProto.PluginPosition result = com.akaxin.proto.core.PluginProto.PluginPosition.valueOf(position_); + return result == null ? com.akaxin.proto.core.PluginProto.PluginPosition.UNRECOGNIZED : result; + } + + public static final int ORDER_FIELD_NUMBER = 9; + private int order_; + /** + *
+     * 显示顺序
+     * 当一个位置,有多个扩展时,此处描述顺序,数字越小,排列越靠前(从上往下,从左往右排列)
+     * 
+ * + * int32 order = 9; + */ + public int getOrder() { + return order_; + } + + public static final int DISPLAY_MODE_FIELD_NUMBER = 10; + private int displayMode_; + /** + *
+     * 展现方式【应该为一个枚举】
+     * 默认、浮屏、分屏
+     * 目前写死【默认】
+     * 
+ * + * .core.PluginDisplayMode display_mode = 10; + */ + public int getDisplayModeValue() { + return displayMode_; + } + /** + *
+     * 展现方式【应该为一个枚举】
+     * 默认、浮屏、分屏
+     * 目前写死【默认】
+     * 
+ * + * .core.PluginDisplayMode display_mode = 10; + */ + public com.akaxin.proto.core.PluginProto.PluginDisplayMode getDisplayMode() { + com.akaxin.proto.core.PluginProto.PluginDisplayMode result = com.akaxin.proto.core.PluginProto.PluginDisplayMode.valueOf(displayMode_); + return result == null ? com.akaxin.proto.core.PluginProto.PluginDisplayMode.UNRECOGNIZED : result; + } + + public static final int PERMISSION_STATUS_FIELD_NUMBER = 11; + private int permissionStatus_; + /** + *
+     * 可用状态
+     * - 禁用
+     * - 管理员可用
+     * - 全员可用
+     * 
+ * + * .core.PermissionStatus permission_status = 11; + */ + public int getPermissionStatusValue() { + return permissionStatus_; + } + /** + *
+     * 可用状态
+     * - 禁用
+     * - 管理员可用
+     * - 全员可用
+     * 
+ * + * .core.PermissionStatus permission_status = 11; + */ + public com.akaxin.proto.core.PluginProto.PermissionStatus getPermissionStatus() { + com.akaxin.proto.core.PluginProto.PermissionStatus result = com.akaxin.proto.core.PluginProto.PermissionStatus.valueOf(permissionStatus_); + return result == null ? com.akaxin.proto.core.PluginProto.PermissionStatus.UNRECOGNIZED : result; + } + + public static final int ENCRYPTED_SESSION_ID_BASE64_FIELD_NUMBER = 12; + private volatile java.lang.Object encryptedSessionIdBase64_; + /** + *
+     * 使用auth_key加密的用户session
+     * 
+ * + * string encrypted_session_id_base64 = 12; + */ + public java.lang.String getEncryptedSessionIdBase64() { + java.lang.Object ref = encryptedSessionIdBase64_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + encryptedSessionIdBase64_ = s; + return s; + } + } + /** + *
+     * 使用auth_key加密的用户session
+     * 
+ * + * string encrypted_session_id_base64 = 12; + */ + public com.google.protobuf.ByteString + getEncryptedSessionIdBase64Bytes() { + java.lang.Object ref = encryptedSessionIdBase64_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + encryptedSessionIdBase64_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!getUrlPageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, urlPage_); + } + if (!getApiUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, apiUrl_); + } + if (!getIconBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, icon_); + } + if (!getAuthKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, authKey_); + } + if (!getAllowedIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, allowedIp_); + } + if (position_ != com.akaxin.proto.core.PluginProto.PluginPosition.HOME_PAGE.getNumber()) { + output.writeEnum(8, position_); + } + if (order_ != 0) { + output.writeInt32(9, order_); + } + if (displayMode_ != com.akaxin.proto.core.PluginProto.PluginDisplayMode.NEW_PAGE.getNumber()) { + output.writeEnum(10, displayMode_); + } + if (permissionStatus_ != com.akaxin.proto.core.PluginProto.PermissionStatus.DISABLED.getNumber()) { + output.writeEnum(11, permissionStatus_); + } + if (!getEncryptedSessionIdBase64Bytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, encryptedSessionIdBase64_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!getUrlPageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, urlPage_); + } + if (!getApiUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, apiUrl_); + } + if (!getIconBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, icon_); + } + if (!getAuthKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, authKey_); + } + if (!getAllowedIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, allowedIp_); + } + if (position_ != com.akaxin.proto.core.PluginProto.PluginPosition.HOME_PAGE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(8, position_); + } + if (order_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(9, order_); + } + if (displayMode_ != com.akaxin.proto.core.PluginProto.PluginDisplayMode.NEW_PAGE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, displayMode_); + } + if (permissionStatus_ != com.akaxin.proto.core.PluginProto.PermissionStatus.DISABLED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(11, permissionStatus_); + } + if (!getEncryptedSessionIdBase64Bytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, encryptedSessionIdBase64_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.PluginProto.Plugin)) { + return super.equals(obj); + } + com.akaxin.proto.core.PluginProto.Plugin other = (com.akaxin.proto.core.PluginProto.Plugin) obj; + + boolean result = true; + result = result && getId() + .equals(other.getId()); + result = result && getName() + .equals(other.getName()); + result = result && getUrlPage() + .equals(other.getUrlPage()); + result = result && getApiUrl() + .equals(other.getApiUrl()); + result = result && getIcon() + .equals(other.getIcon()); + result = result && getAuthKey() + .equals(other.getAuthKey()); + result = result && getAllowedIp() + .equals(other.getAllowedIp()); + result = result && position_ == other.position_; + result = result && (getOrder() + == other.getOrder()); + result = result && displayMode_ == other.displayMode_; + result = result && permissionStatus_ == other.permissionStatus_; + result = result && getEncryptedSessionIdBase64() + .equals(other.getEncryptedSessionIdBase64()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + URL_PAGE_FIELD_NUMBER; + hash = (53 * hash) + getUrlPage().hashCode(); + hash = (37 * hash) + API_URL_FIELD_NUMBER; + hash = (53 * hash) + getApiUrl().hashCode(); + hash = (37 * hash) + ICON_FIELD_NUMBER; + hash = (53 * hash) + getIcon().hashCode(); + hash = (37 * hash) + AUTH_KEY_FIELD_NUMBER; + hash = (53 * hash) + getAuthKey().hashCode(); + hash = (37 * hash) + ALLOWED_IP_FIELD_NUMBER; + hash = (53 * hash) + getAllowedIp().hashCode(); + hash = (37 * hash) + POSITION_FIELD_NUMBER; + hash = (53 * hash) + position_; + hash = (37 * hash) + ORDER_FIELD_NUMBER; + hash = (53 * hash) + getOrder(); + hash = (37 * hash) + DISPLAY_MODE_FIELD_NUMBER; + hash = (53 * hash) + displayMode_; + hash = (37 * hash) + PERMISSION_STATUS_FIELD_NUMBER; + hash = (53 * hash) + permissionStatus_; + hash = (37 * hash) + ENCRYPTED_SESSION_ID_BASE64_FIELD_NUMBER; + hash = (53 * hash) + getEncryptedSessionIdBase64().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.PluginProto.Plugin parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.PluginProto.Plugin parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.PluginProto.Plugin parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.PluginProto.Plugin parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.PluginProto.Plugin parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.PluginProto.Plugin parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.PluginProto.Plugin parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.PluginProto.Plugin parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.PluginProto.Plugin parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.PluginProto.Plugin parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.PluginProto.Plugin parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.PluginProto.Plugin parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.PluginProto.Plugin prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code core.Plugin} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.Plugin) + com.akaxin.proto.core.PluginProto.PluginOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.PluginProto.internal_static_core_Plugin_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.PluginProto.internal_static_core_Plugin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.PluginProto.Plugin.class, com.akaxin.proto.core.PluginProto.Plugin.Builder.class); + } + + // Construct using com.akaxin.proto.core.PluginProto.Plugin.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + id_ = ""; + + name_ = ""; + + urlPage_ = ""; + + apiUrl_ = ""; + + icon_ = ""; + + authKey_ = ""; + + allowedIp_ = ""; + + position_ = 0; + + order_ = 0; + + displayMode_ = 0; + + permissionStatus_ = 0; + + encryptedSessionIdBase64_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.PluginProto.internal_static_core_Plugin_descriptor; + } + + public com.akaxin.proto.core.PluginProto.Plugin getDefaultInstanceForType() { + return com.akaxin.proto.core.PluginProto.Plugin.getDefaultInstance(); + } + + public com.akaxin.proto.core.PluginProto.Plugin build() { + com.akaxin.proto.core.PluginProto.Plugin result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.PluginProto.Plugin buildPartial() { + com.akaxin.proto.core.PluginProto.Plugin result = new com.akaxin.proto.core.PluginProto.Plugin(this); + result.id_ = id_; + result.name_ = name_; + result.urlPage_ = urlPage_; + result.apiUrl_ = apiUrl_; + result.icon_ = icon_; + result.authKey_ = authKey_; + result.allowedIp_ = allowedIp_; + result.position_ = position_; + result.order_ = order_; + result.displayMode_ = displayMode_; + result.permissionStatus_ = permissionStatus_; + result.encryptedSessionIdBase64_ = encryptedSessionIdBase64_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.PluginProto.Plugin) { + return mergeFrom((com.akaxin.proto.core.PluginProto.Plugin)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.PluginProto.Plugin other) { + if (other == com.akaxin.proto.core.PluginProto.Plugin.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getUrlPage().isEmpty()) { + urlPage_ = other.urlPage_; + onChanged(); + } + if (!other.getApiUrl().isEmpty()) { + apiUrl_ = other.apiUrl_; + onChanged(); + } + if (!other.getIcon().isEmpty()) { + icon_ = other.icon_; + onChanged(); + } + if (!other.getAuthKey().isEmpty()) { + authKey_ = other.authKey_; + onChanged(); + } + if (!other.getAllowedIp().isEmpty()) { + allowedIp_ = other.allowedIp_; + onChanged(); + } + if (other.position_ != 0) { + setPositionValue(other.getPositionValue()); + } + if (other.getOrder() != 0) { + setOrder(other.getOrder()); + } + if (other.displayMode_ != 0) { + setDisplayModeValue(other.getDisplayModeValue()); + } + if (other.permissionStatus_ != 0) { + setPermissionStatusValue(other.getPermissionStatusValue()); + } + if (!other.getEncryptedSessionIdBase64().isEmpty()) { + encryptedSessionIdBase64_ = other.encryptedSessionIdBase64_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.PluginProto.Plugin parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.PluginProto.Plugin) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object id_ = ""; + /** + *
+       * 对于一个特定的Site,plugin.id 是唯一的。
+       * 
+ * + * string id = 1; + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * 对于一个特定的Site,plugin.id 是唯一的。
+       * 
+ * + * string id = 1; + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * 对于一个特定的Site,plugin.id 是唯一的。
+       * 
+ * + * string id = 1; + */ + public Builder setId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + *
+       * 对于一个特定的Site,plugin.id 是唯一的。
+       * 
+ * + * string id = 1; + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + *
+       * 对于一个特定的Site,plugin.id 是唯一的。
+       * 
+ * + * string id = 1; + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * 扩展名字,会显示在界面上
+       * 
+ * + * string name = 2; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * 扩展名字,会显示在界面上
+       * 
+ * + * string name = 2; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * 扩展名字,会显示在界面上
+       * 
+ * + * string name = 2; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+       * 扩展名字,会显示在界面上
+       * 
+ * + * string name = 2; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * 扩展名字,会显示在界面上
+       * 
+ * + * string name = 2; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object urlPage_ = ""; + /** + *
+       * 落地页地址
+       * 以http或https开头,客户端直接以url_page作为网址渲染webview
+       * 否则,为api.proxy.page 请求的page参数值,默认为空
+       * 如:
+       * value= https://www.google.com 直接以此网址加载webview。
+       * value= main,代表通过api.proxy.page接口请求main页面。
+       * value= 空,代表通过api.proxy.page接口请求空页面(pluginServer自己把空返回默认主页)
+       * 
+ * + * string url_page = 3; + */ + public java.lang.String getUrlPage() { + java.lang.Object ref = urlPage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + urlPage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * 落地页地址
+       * 以http或https开头,客户端直接以url_page作为网址渲染webview
+       * 否则,为api.proxy.page 请求的page参数值,默认为空
+       * 如:
+       * value= https://www.google.com 直接以此网址加载webview。
+       * value= main,代表通过api.proxy.page接口请求main页面。
+       * value= 空,代表通过api.proxy.page接口请求空页面(pluginServer自己把空返回默认主页)
+       * 
+ * + * string url_page = 3; + */ + public com.google.protobuf.ByteString + getUrlPageBytes() { + java.lang.Object ref = urlPage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + urlPage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * 落地页地址
+       * 以http或https开头,客户端直接以url_page作为网址渲染webview
+       * 否则,为api.proxy.page 请求的page参数值,默认为空
+       * 如:
+       * value= https://www.google.com 直接以此网址加载webview。
+       * value= main,代表通过api.proxy.page接口请求main页面。
+       * value= 空,代表通过api.proxy.page接口请求空页面(pluginServer自己把空返回默认主页)
+       * 
+ * + * string url_page = 3; + */ + public Builder setUrlPage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + urlPage_ = value; + onChanged(); + return this; + } + /** + *
+       * 落地页地址
+       * 以http或https开头,客户端直接以url_page作为网址渲染webview
+       * 否则,为api.proxy.page 请求的page参数值,默认为空
+       * 如:
+       * value= https://www.google.com 直接以此网址加载webview。
+       * value= main,代表通过api.proxy.page接口请求main页面。
+       * value= 空,代表通过api.proxy.page接口请求空页面(pluginServer自己把空返回默认主页)
+       * 
+ * + * string url_page = 3; + */ + public Builder clearUrlPage() { + + urlPage_ = getDefaultInstance().getUrlPage(); + onChanged(); + return this; + } + /** + *
+       * 落地页地址
+       * 以http或https开头,客户端直接以url_page作为网址渲染webview
+       * 否则,为api.proxy.page 请求的page参数值,默认为空
+       * 如:
+       * value= https://www.google.com 直接以此网址加载webview。
+       * value= main,代表通过api.proxy.page接口请求main页面。
+       * value= 空,代表通过api.proxy.page接口请求空页面(pluginServer自己把空返回默认主页)
+       * 
+ * + * string url_page = 3; + */ + public Builder setUrlPageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + urlPage_ = value; + onChanged(); + return this; + } + + private java.lang.Object apiUrl_ = ""; + /** + *
+       * api.plugin.proxy 请求转发请求时的目的URL
+       * 此URL只能以http或者https开头,如无则为http
+       * ====IMPORTANT====
+       * 此api是给server用的,不允许传递此值到客户端。如复用此结构必须在传递给客户端之前将此值置空。
+       * 
+ * + * string api_url = 4; + */ + public java.lang.String getApiUrl() { + java.lang.Object ref = apiUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * api.plugin.proxy 请求转发请求时的目的URL
+       * 此URL只能以http或者https开头,如无则为http
+       * ====IMPORTANT====
+       * 此api是给server用的,不允许传递此值到客户端。如复用此结构必须在传递给客户端之前将此值置空。
+       * 
+ * + * string api_url = 4; + */ + public com.google.protobuf.ByteString + getApiUrlBytes() { + java.lang.Object ref = apiUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * api.plugin.proxy 请求转发请求时的目的URL
+       * 此URL只能以http或者https开头,如无则为http
+       * ====IMPORTANT====
+       * 此api是给server用的,不允许传递此值到客户端。如复用此结构必须在传递给客户端之前将此值置空。
+       * 
+ * + * string api_url = 4; + */ + public Builder setApiUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + apiUrl_ = value; + onChanged(); + return this; + } + /** + *
+       * api.plugin.proxy 请求转发请求时的目的URL
+       * 此URL只能以http或者https开头,如无则为http
+       * ====IMPORTANT====
+       * 此api是给server用的,不允许传递此值到客户端。如复用此结构必须在传递给客户端之前将此值置空。
+       * 
+ * + * string api_url = 4; + */ + public Builder clearApiUrl() { + + apiUrl_ = getDefaultInstance().getApiUrl(); + onChanged(); + return this; + } + /** + *
+       * api.plugin.proxy 请求转发请求时的目的URL
+       * 此URL只能以http或者https开头,如无则为http
+       * ====IMPORTANT====
+       * 此api是给server用的,不允许传递此值到客户端。如复用此结构必须在传递给客户端之前将此值置空。
+       * 
+ * + * string api_url = 4; + */ + public Builder setApiUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + apiUrl_ = value; + onChanged(); + return this; + } + + private java.lang.Object icon_ = ""; + /** + *
+       * 扩展图标文件,会显示在界面上
+       * 如果以http开头,则代表着这是一个http协议的文件。
+       * 否则,通过site-download功能下载此图片。
+       * 
+ * + * string icon = 5; + */ + public java.lang.String getIcon() { + java.lang.Object ref = icon_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + icon_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * 扩展图标文件,会显示在界面上
+       * 如果以http开头,则代表着这是一个http协议的文件。
+       * 否则,通过site-download功能下载此图片。
+       * 
+ * + * string icon = 5; + */ + public com.google.protobuf.ByteString + getIconBytes() { + java.lang.Object ref = icon_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + icon_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * 扩展图标文件,会显示在界面上
+       * 如果以http开头,则代表着这是一个http协议的文件。
+       * 否则,通过site-download功能下载此图片。
+       * 
+ * + * string icon = 5; + */ + public Builder setIcon( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + icon_ = value; + onChanged(); + return this; + } + /** + *
+       * 扩展图标文件,会显示在界面上
+       * 如果以http开头,则代表着这是一个http协议的文件。
+       * 否则,通过site-download功能下载此图片。
+       * 
+ * + * string icon = 5; + */ + public Builder clearIcon() { + + icon_ = getDefaultInstance().getIcon(); + onChanged(); + return this; + } + /** + *
+       * 扩展图标文件,会显示在界面上
+       * 如果以http开头,则代表着这是一个http协议的文件。
+       * 否则,通过site-download功能下载此图片。
+       * 
+ * + * string icon = 5; + */ + public Builder setIconBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + icon_ = value; + onChanged(); + return this; + } + + private java.lang.Object authKey_ = ""; + /** + *
+       * pluginServer 在 请求 siteServer的innerAPI时,使用此值加密数据,以证明身份。
+       * 添加扩展时由SiteServer自动生成并记录,为64个[A-Za-z0-9]组成的随机字符串。
+       * site 使用auth_key 加密发送给plugin的整个proto
+       * 同时 site使用auth_key解析 plugin传递过来的具体proto值
+       * 
+ * + * string auth_key = 6; + */ + public java.lang.String getAuthKey() { + java.lang.Object ref = authKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * pluginServer 在 请求 siteServer的innerAPI时,使用此值加密数据,以证明身份。
+       * 添加扩展时由SiteServer自动生成并记录,为64个[A-Za-z0-9]组成的随机字符串。
+       * site 使用auth_key 加密发送给plugin的整个proto
+       * 同时 site使用auth_key解析 plugin传递过来的具体proto值
+       * 
+ * + * string auth_key = 6; + */ + public com.google.protobuf.ByteString + getAuthKeyBytes() { + java.lang.Object ref = authKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + authKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * pluginServer 在 请求 siteServer的innerAPI时,使用此值加密数据,以证明身份。
+       * 添加扩展时由SiteServer自动生成并记录,为64个[A-Za-z0-9]组成的随机字符串。
+       * site 使用auth_key 加密发送给plugin的整个proto
+       * 同时 site使用auth_key解析 plugin传递过来的具体proto值
+       * 
+ * + * string auth_key = 6; + */ + public Builder setAuthKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + authKey_ = value; + onChanged(); + return this; + } + /** + *
+       * pluginServer 在 请求 siteServer的innerAPI时,使用此值加密数据,以证明身份。
+       * 添加扩展时由SiteServer自动生成并记录,为64个[A-Za-z0-9]组成的随机字符串。
+       * site 使用auth_key 加密发送给plugin的整个proto
+       * 同时 site使用auth_key解析 plugin传递过来的具体proto值
+       * 
+ * + * string auth_key = 6; + */ + public Builder clearAuthKey() { + + authKey_ = getDefaultInstance().getAuthKey(); + onChanged(); + return this; + } + /** + *
+       * pluginServer 在 请求 siteServer的innerAPI时,使用此值加密数据,以证明身份。
+       * 添加扩展时由SiteServer自动生成并记录,为64个[A-Za-z0-9]组成的随机字符串。
+       * site 使用auth_key 加密发送给plugin的整个proto
+       * 同时 site使用auth_key解析 plugin传递过来的具体proto值
+       * 
+ * + * string auth_key = 6; + */ + public Builder setAuthKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + authKey_ = value; + onChanged(); + return this; + } + + private java.lang.Object allowedIp_ = ""; + /** + *
+       * site server的innerAPI允许的pluginServer地址。
+       * 默认为127.0.0.1,如为空则代表不限制,此外:支持网络掩码的配置方式。
+       * 如果有多个ip,以英文逗号[,]隔开。
+       * 
+ * + * string allowed_ip = 7; + */ + public java.lang.String getAllowedIp() { + java.lang.Object ref = allowedIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + allowedIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * site server的innerAPI允许的pluginServer地址。
+       * 默认为127.0.0.1,如为空则代表不限制,此外:支持网络掩码的配置方式。
+       * 如果有多个ip,以英文逗号[,]隔开。
+       * 
+ * + * string allowed_ip = 7; + */ + public com.google.protobuf.ByteString + getAllowedIpBytes() { + java.lang.Object ref = allowedIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + allowedIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * site server的innerAPI允许的pluginServer地址。
+       * 默认为127.0.0.1,如为空则代表不限制,此外:支持网络掩码的配置方式。
+       * 如果有多个ip,以英文逗号[,]隔开。
+       * 
+ * + * string allowed_ip = 7; + */ + public Builder setAllowedIp( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + allowedIp_ = value; + onChanged(); + return this; + } + /** + *
+       * site server的innerAPI允许的pluginServer地址。
+       * 默认为127.0.0.1,如为空则代表不限制,此外:支持网络掩码的配置方式。
+       * 如果有多个ip,以英文逗号[,]隔开。
+       * 
+ * + * string allowed_ip = 7; + */ + public Builder clearAllowedIp() { + + allowedIp_ = getDefaultInstance().getAllowedIp(); + onChanged(); + return this; + } + /** + *
+       * site server的innerAPI允许的pluginServer地址。
+       * 默认为127.0.0.1,如为空则代表不限制,此外:支持网络掩码的配置方式。
+       * 如果有多个ip,以英文逗号[,]隔开。
+       * 
+ * + * string allowed_ip = 7; + */ + public Builder setAllowedIpBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + allowedIp_ = value; + onChanged(); + return this; + } + + private int position_ = 0; + /** + *
+       * 扩展的位置【应该为一个枚举】
+       * 值:首页、消息帧
+       * 本次不允许首页并且消息帧这个类型。
+       * 
+ * + * .core.PluginPosition position = 8; + */ + public int getPositionValue() { + return position_; + } + /** + *
+       * 扩展的位置【应该为一个枚举】
+       * 值:首页、消息帧
+       * 本次不允许首页并且消息帧这个类型。
+       * 
+ * + * .core.PluginPosition position = 8; + */ + public Builder setPositionValue(int value) { + position_ = value; + onChanged(); + return this; + } + /** + *
+       * 扩展的位置【应该为一个枚举】
+       * 值:首页、消息帧
+       * 本次不允许首页并且消息帧这个类型。
+       * 
+ * + * .core.PluginPosition position = 8; + */ + public com.akaxin.proto.core.PluginProto.PluginPosition getPosition() { + com.akaxin.proto.core.PluginProto.PluginPosition result = com.akaxin.proto.core.PluginProto.PluginPosition.valueOf(position_); + return result == null ? com.akaxin.proto.core.PluginProto.PluginPosition.UNRECOGNIZED : result; + } + /** + *
+       * 扩展的位置【应该为一个枚举】
+       * 值:首页、消息帧
+       * 本次不允许首页并且消息帧这个类型。
+       * 
+ * + * .core.PluginPosition position = 8; + */ + public Builder setPosition(com.akaxin.proto.core.PluginProto.PluginPosition value) { + if (value == null) { + throw new NullPointerException(); + } + + position_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * 扩展的位置【应该为一个枚举】
+       * 值:首页、消息帧
+       * 本次不允许首页并且消息帧这个类型。
+       * 
+ * + * .core.PluginPosition position = 8; + */ + public Builder clearPosition() { + + position_ = 0; + onChanged(); + return this; + } + + private int order_ ; + /** + *
+       * 显示顺序
+       * 当一个位置,有多个扩展时,此处描述顺序,数字越小,排列越靠前(从上往下,从左往右排列)
+       * 
+ * + * int32 order = 9; + */ + public int getOrder() { + return order_; + } + /** + *
+       * 显示顺序
+       * 当一个位置,有多个扩展时,此处描述顺序,数字越小,排列越靠前(从上往下,从左往右排列)
+       * 
+ * + * int32 order = 9; + */ + public Builder setOrder(int value) { + + order_ = value; + onChanged(); + return this; + } + /** + *
+       * 显示顺序
+       * 当一个位置,有多个扩展时,此处描述顺序,数字越小,排列越靠前(从上往下,从左往右排列)
+       * 
+ * + * int32 order = 9; + */ + public Builder clearOrder() { + + order_ = 0; + onChanged(); + return this; + } + + private int displayMode_ = 0; + /** + *
+       * 展现方式【应该为一个枚举】
+       * 默认、浮屏、分屏
+       * 目前写死【默认】
+       * 
+ * + * .core.PluginDisplayMode display_mode = 10; + */ + public int getDisplayModeValue() { + return displayMode_; + } + /** + *
+       * 展现方式【应该为一个枚举】
+       * 默认、浮屏、分屏
+       * 目前写死【默认】
+       * 
+ * + * .core.PluginDisplayMode display_mode = 10; + */ + public Builder setDisplayModeValue(int value) { + displayMode_ = value; + onChanged(); + return this; + } + /** + *
+       * 展现方式【应该为一个枚举】
+       * 默认、浮屏、分屏
+       * 目前写死【默认】
+       * 
+ * + * .core.PluginDisplayMode display_mode = 10; + */ + public com.akaxin.proto.core.PluginProto.PluginDisplayMode getDisplayMode() { + com.akaxin.proto.core.PluginProto.PluginDisplayMode result = com.akaxin.proto.core.PluginProto.PluginDisplayMode.valueOf(displayMode_); + return result == null ? com.akaxin.proto.core.PluginProto.PluginDisplayMode.UNRECOGNIZED : result; + } + /** + *
+       * 展现方式【应该为一个枚举】
+       * 默认、浮屏、分屏
+       * 目前写死【默认】
+       * 
+ * + * .core.PluginDisplayMode display_mode = 10; + */ + public Builder setDisplayMode(com.akaxin.proto.core.PluginProto.PluginDisplayMode value) { + if (value == null) { + throw new NullPointerException(); + } + + displayMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * 展现方式【应该为一个枚举】
+       * 默认、浮屏、分屏
+       * 目前写死【默认】
+       * 
+ * + * .core.PluginDisplayMode display_mode = 10; + */ + public Builder clearDisplayMode() { + + displayMode_ = 0; + onChanged(); + return this; + } + + private int permissionStatus_ = 0; + /** + *
+       * 可用状态
+       * - 禁用
+       * - 管理员可用
+       * - 全员可用
+       * 
+ * + * .core.PermissionStatus permission_status = 11; + */ + public int getPermissionStatusValue() { + return permissionStatus_; + } + /** + *
+       * 可用状态
+       * - 禁用
+       * - 管理员可用
+       * - 全员可用
+       * 
+ * + * .core.PermissionStatus permission_status = 11; + */ + public Builder setPermissionStatusValue(int value) { + permissionStatus_ = value; + onChanged(); + return this; + } + /** + *
+       * 可用状态
+       * - 禁用
+       * - 管理员可用
+       * - 全员可用
+       * 
+ * + * .core.PermissionStatus permission_status = 11; + */ + public com.akaxin.proto.core.PluginProto.PermissionStatus getPermissionStatus() { + com.akaxin.proto.core.PluginProto.PermissionStatus result = com.akaxin.proto.core.PluginProto.PermissionStatus.valueOf(permissionStatus_); + return result == null ? com.akaxin.proto.core.PluginProto.PermissionStatus.UNRECOGNIZED : result; + } + /** + *
+       * 可用状态
+       * - 禁用
+       * - 管理员可用
+       * - 全员可用
+       * 
+ * + * .core.PermissionStatus permission_status = 11; + */ + public Builder setPermissionStatus(com.akaxin.proto.core.PluginProto.PermissionStatus value) { + if (value == null) { + throw new NullPointerException(); + } + + permissionStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * 可用状态
+       * - 禁用
+       * - 管理员可用
+       * - 全员可用
+       * 
+ * + * .core.PermissionStatus permission_status = 11; + */ + public Builder clearPermissionStatus() { + + permissionStatus_ = 0; + onChanged(); + return this; + } + + private java.lang.Object encryptedSessionIdBase64_ = ""; + /** + *
+       * 使用auth_key加密的用户session
+       * 
+ * + * string encrypted_session_id_base64 = 12; + */ + public java.lang.String getEncryptedSessionIdBase64() { + java.lang.Object ref = encryptedSessionIdBase64_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + encryptedSessionIdBase64_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * 使用auth_key加密的用户session
+       * 
+ * + * string encrypted_session_id_base64 = 12; + */ + public com.google.protobuf.ByteString + getEncryptedSessionIdBase64Bytes() { + java.lang.Object ref = encryptedSessionIdBase64_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + encryptedSessionIdBase64_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * 使用auth_key加密的用户session
+       * 
+ * + * string encrypted_session_id_base64 = 12; + */ + public Builder setEncryptedSessionIdBase64( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + encryptedSessionIdBase64_ = value; + onChanged(); + return this; + } + /** + *
+       * 使用auth_key加密的用户session
+       * 
+ * + * string encrypted_session_id_base64 = 12; + */ + public Builder clearEncryptedSessionIdBase64() { + + encryptedSessionIdBase64_ = getDefaultInstance().getEncryptedSessionIdBase64(); + onChanged(); + return this; + } + /** + *
+       * 使用auth_key加密的用户session
+       * 
+ * + * string encrypted_session_id_base64 = 12; + */ + public Builder setEncryptedSessionIdBase64Bytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + encryptedSessionIdBase64_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.Plugin) + } + + // @@protoc_insertion_point(class_scope:core.Plugin) + private static final com.akaxin.proto.core.PluginProto.Plugin DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.PluginProto.Plugin(); + } + + public static com.akaxin.proto.core.PluginProto.Plugin getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Plugin parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Plugin(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.PluginProto.Plugin getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_ProxyPluginPackage_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_ProxyPluginPackage_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_ProxyPluginPackage_PluginHeaderEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_ProxyPluginPackage_PluginHeaderEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_Plugin_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_Plugin_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\021core/plugin.proto\022\004core\032\017core/core.pro" + + "to\"\277\001\n\022ProxyPluginPackage\022A\n\rplugin_head" + + "er\030\001 \003(\0132*.core.ProxyPluginPackage.Plugi" + + "nHeaderEntry\022\014\n\004data\030\002 \001(\t\022#\n\nerror_info" + + "\030\003 \001(\0132\017.core.ErrorInfo\0323\n\021PluginHeaderE" + + "ntry\022\013\n\003key\030\001 \001(\005\022\r\n\005value\030\002 \001(\t:\0028\001\"\267\002\n" + + "\006Plugin\022\n\n\002id\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\020\n\010url" + + "_page\030\003 \001(\t\022\017\n\007api_url\030\004 \001(\t\022\014\n\004icon\030\005 \001" + + "(\t\022\020\n\010auth_key\030\006 \001(\t\022\022\n\nallowed_ip\030\007 \001(\t" + + "\022&\n\010position\030\010 \001(\0162\024.core.PluginPosition", + "\022\r\n\005order\030\t \001(\005\022-\n\014display_mode\030\n \001(\0162\027." + + "core.PluginDisplayMode\0221\n\021permission_sta" + + "tus\030\013 \001(\0162\026.core.PermissionStatus\022#\n\033enc" + + "rypted_session_id_base64\030\014 \001(\t*\223\001\n\017Plugi" + + "nHeaderKey\022\022\n\016CLIENT_VERSION\020\000\022\027\n\023CLIENT" + + "_SITE_USER_ID\020\001\022\032\n\026CLIENT_SITE_SESSION_I" + + "D\020\002\022\022\n\016PLUGIN_REFERER\020\003\022\024\n\020PLUGIN_TIMEST" + + "AMP\020\004\022\r\n\tPLUGIN_ID\020\005*/\n\020PermissionStatus" + + "\022\014\n\010DISABLED\020\000\022\r\n\tAVAILABLE\020\001*-\n\016PluginP" + + "osition\022\r\n\tHOME_PAGE\020\000\022\014\n\010MSG_PAGE\020\001*H\n\021", + "PluginDisplayMode\022\014\n\010NEW_PAGE\020\000\022\023\n\017FLOAT" + + "ING_SCREEN\020\001\022\020\n\014SPLIT_SCREEN\020\002B$\n\025com.ak" + + "axin.proto.coreB\013PluginProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.CoreProto.getDescriptor(), + }, assigner); + internal_static_core_ProxyPluginPackage_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_core_ProxyPluginPackage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_ProxyPluginPackage_descriptor, + new java.lang.String[] { "PluginHeader", "Data", "ErrorInfo", }); + internal_static_core_ProxyPluginPackage_PluginHeaderEntry_descriptor = + internal_static_core_ProxyPluginPackage_descriptor.getNestedTypes().get(0); + internal_static_core_ProxyPluginPackage_PluginHeaderEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_ProxyPluginPackage_PluginHeaderEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_core_Plugin_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_core_Plugin_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_Plugin_descriptor, + new java.lang.String[] { "Id", "Name", "UrlPage", "ApiUrl", "Icon", "AuthKey", "AllowedIp", "Position", "Order", "DisplayMode", "PermissionStatus", "EncryptedSessionIdBase64", }); + com.akaxin.proto.core.CoreProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/core/PushProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/PushProto.java new file mode 100755 index 0000000..1ad1c97 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/PushProto.java @@ -0,0 +1,6139 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/push.proto + +package com.akaxin.proto.core; + +public final class PushProto { + private PushProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code core.PushType} + */ + public enum PushType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *系统通知
+     * 
+ * + * PUSH_NOTICE = 0; + */ + PUSH_NOTICE(0), + /** + * PUSH_MSG_STATUS = 1; + */ + PUSH_MSG_STATUS(1), + /** + *
+     *这个不是废弃了么?
+     * 
+ * + * PUSH_MSG_FINISH = 2; + */ + PUSH_MSG_FINISH(2), + /** + * PUSH_TEXT = 3; + */ + PUSH_TEXT(3), + /** + * PUSH_SECRET_TEXT = 4; + */ + PUSH_SECRET_TEXT(4), + /** + * PUSH_GROUP_TEXT = 5; + */ + PUSH_GROUP_TEXT(5), + /** + * PUSH_GROUP_SECRET_TEXT = 6; + */ + PUSH_GROUP_SECRET_TEXT(6), + /** + * PUSH_IMAGE = 7; + */ + PUSH_IMAGE(7), + /** + * PUSH_SECRET_IMAGE = 8; + */ + PUSH_SECRET_IMAGE(8), + /** + * PUSH_GROUP_IMAGE = 9; + */ + PUSH_GROUP_IMAGE(9), + /** + * PUSH_GROUP_SECRET_IMAGE = 10; + */ + PUSH_GROUP_SECRET_IMAGE(10), + /** + * PUSH_VOICE = 11; + */ + PUSH_VOICE(11), + /** + * PUSH_SECRET_VOICE = 12; + */ + PUSH_SECRET_VOICE(12), + /** + * PUSH_GROUP_VOICE = 13; + */ + PUSH_GROUP_VOICE(13), + /** + * PUSH_GROUP_SECRET_VOICE = 14; + */ + PUSH_GROUP_SECRET_VOICE(14), + /** + * PUSH_MAP = 15; + */ + PUSH_MAP(15), + /** + * PUSH_SECRET_MAP = 16; + */ + PUSH_SECRET_MAP(16), + /** + * PUSH_GROUP_MAP = 17; + */ + PUSH_GROUP_MAP(17), + /** + * PUSH_GROUP_SECRET_MAP = 18; + */ + PUSH_GROUP_SECRET_MAP(18), + /** + *
+     *二人消息中的通知消息
+     * 
+ * + * PUSH_U2_NOTICE = 19; + */ + PUSH_U2_NOTICE(19), + /** + *
+     *群消息中的通知消息
+     * 
+ * + * PUSH_GROUP_NOTICE = 20; + */ + PUSH_GROUP_NOTICE(20), + /** + *
+     *申请添加好友通知
+     * 
+ * + * PUSH_APPLY_FRIEND_NOTICE = 100; + */ + PUSH_APPLY_FRIEND_NOTICE(100), + UNRECOGNIZED(-1), + ; + + /** + *
+     *系统通知
+     * 
+ * + * PUSH_NOTICE = 0; + */ + public static final int PUSH_NOTICE_VALUE = 0; + /** + * PUSH_MSG_STATUS = 1; + */ + public static final int PUSH_MSG_STATUS_VALUE = 1; + /** + *
+     *这个不是废弃了么?
+     * 
+ * + * PUSH_MSG_FINISH = 2; + */ + public static final int PUSH_MSG_FINISH_VALUE = 2; + /** + * PUSH_TEXT = 3; + */ + public static final int PUSH_TEXT_VALUE = 3; + /** + * PUSH_SECRET_TEXT = 4; + */ + public static final int PUSH_SECRET_TEXT_VALUE = 4; + /** + * PUSH_GROUP_TEXT = 5; + */ + public static final int PUSH_GROUP_TEXT_VALUE = 5; + /** + * PUSH_GROUP_SECRET_TEXT = 6; + */ + public static final int PUSH_GROUP_SECRET_TEXT_VALUE = 6; + /** + * PUSH_IMAGE = 7; + */ + public static final int PUSH_IMAGE_VALUE = 7; + /** + * PUSH_SECRET_IMAGE = 8; + */ + public static final int PUSH_SECRET_IMAGE_VALUE = 8; + /** + * PUSH_GROUP_IMAGE = 9; + */ + public static final int PUSH_GROUP_IMAGE_VALUE = 9; + /** + * PUSH_GROUP_SECRET_IMAGE = 10; + */ + public static final int PUSH_GROUP_SECRET_IMAGE_VALUE = 10; + /** + * PUSH_VOICE = 11; + */ + public static final int PUSH_VOICE_VALUE = 11; + /** + * PUSH_SECRET_VOICE = 12; + */ + public static final int PUSH_SECRET_VOICE_VALUE = 12; + /** + * PUSH_GROUP_VOICE = 13; + */ + public static final int PUSH_GROUP_VOICE_VALUE = 13; + /** + * PUSH_GROUP_SECRET_VOICE = 14; + */ + public static final int PUSH_GROUP_SECRET_VOICE_VALUE = 14; + /** + * PUSH_MAP = 15; + */ + public static final int PUSH_MAP_VALUE = 15; + /** + * PUSH_SECRET_MAP = 16; + */ + public static final int PUSH_SECRET_MAP_VALUE = 16; + /** + * PUSH_GROUP_MAP = 17; + */ + public static final int PUSH_GROUP_MAP_VALUE = 17; + /** + * PUSH_GROUP_SECRET_MAP = 18; + */ + public static final int PUSH_GROUP_SECRET_MAP_VALUE = 18; + /** + *
+     *二人消息中的通知消息
+     * 
+ * + * PUSH_U2_NOTICE = 19; + */ + public static final int PUSH_U2_NOTICE_VALUE = 19; + /** + *
+     *群消息中的通知消息
+     * 
+ * + * PUSH_GROUP_NOTICE = 20; + */ + public static final int PUSH_GROUP_NOTICE_VALUE = 20; + /** + *
+     *申请添加好友通知
+     * 
+ * + * PUSH_APPLY_FRIEND_NOTICE = 100; + */ + public static final int PUSH_APPLY_FRIEND_NOTICE_VALUE = 100; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PushType valueOf(int value) { + return forNumber(value); + } + + public static PushType forNumber(int value) { + switch (value) { + case 0: return PUSH_NOTICE; + case 1: return PUSH_MSG_STATUS; + case 2: return PUSH_MSG_FINISH; + case 3: return PUSH_TEXT; + case 4: return PUSH_SECRET_TEXT; + case 5: return PUSH_GROUP_TEXT; + case 6: return PUSH_GROUP_SECRET_TEXT; + case 7: return PUSH_IMAGE; + case 8: return PUSH_SECRET_IMAGE; + case 9: return PUSH_GROUP_IMAGE; + case 10: return PUSH_GROUP_SECRET_IMAGE; + case 11: return PUSH_VOICE; + case 12: return PUSH_SECRET_VOICE; + case 13: return PUSH_GROUP_VOICE; + case 14: return PUSH_GROUP_SECRET_VOICE; + case 15: return PUSH_MAP; + case 16: return PUSH_SECRET_MAP; + case 17: return PUSH_GROUP_MAP; + case 18: return PUSH_GROUP_SECRET_MAP; + case 19: return PUSH_U2_NOTICE; + case 20: return PUSH_GROUP_NOTICE; + case 100: return PUSH_APPLY_FRIEND_NOTICE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PushType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PushType findValueByNumber(int number) { + return PushType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.PushProto.getDescriptor().getEnumTypes().get(0); + } + + private static final PushType[] VALUES = values(); + + public static PushType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PushType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.PushType) + } + + public interface NotificationOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.Notification) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *站点服务地址eg->127.0.0.1:2021
+     * 
+ * + * string site_server = 1; + */ + java.lang.String getSiteServer(); + /** + *
+     *站点服务地址eg->127.0.0.1:2021
+     * 
+ * + * string site_server = 1; + */ + com.google.protobuf.ByteString + getSiteServerBytes(); + + /** + *
+     *站点服务名称
+     * 
+ * + * string push_title = 2; + */ + java.lang.String getPushTitle(); + /** + *
+     *站点服务名称
+     * 
+ * + * string push_title = 2; + */ + com.google.protobuf.ByteString + getPushTitleBytes(); + + /** + *
+     *展示的内容
+     * 
+ * + * string push_alert = 3; + */ + java.lang.String getPushAlert(); + /** + *
+     *展示的内容
+     * 
+ * + * string push_alert = 3; + */ + com.google.protobuf.ByteString + getPushAlertBytes(); + + /** + *
+     *Push跳转位置
+     * 
+ * + * string push_goto = 4; + */ + java.lang.String getPushGoto(); + /** + *
+     *Push跳转位置
+     * 
+ * + * string push_goto = 4; + */ + com.google.protobuf.ByteString + getPushGotoBytes(); + + /** + *
+     *气泡展示个数,默认气泡数1
+     * 
+ * + * int32 push_badge = 5; + */ + int getPushBadge(); + + /** + *
+     *声音
+     * 
+ * + * string push_sound = 6; + */ + java.lang.String getPushSound(); + /** + *
+     *声音
+     * 
+ * + * string push_sound = 6; + */ + com.google.protobuf.ByteString + getPushSoundBytes(); + + /** + *
+     *用户id,这个地方需要使用Global User ID
+     * 
+ * + * string user_id = 7; + */ + java.lang.String getUserId(); + /** + *
+     *用户id,这个地方需要使用Global User ID
+     * 
+ * + * string user_id = 7; + */ + com.google.protobuf.ByteString + getUserIdBytes(); + + /** + *
+     *接受者用户的token,给一个人发送使用
+     * 
+ * + * string user_token = 8; + */ + java.lang.String getUserToken(); + /** + *
+     *接受者用户的token,给一个人发送使用
+     * 
+ * + * string user_token = 8; + */ + com.google.protobuf.ByteString + getUserTokenBytes(); + + /** + *
+     *push消息发送者或者群ID,这里使用站点siteUserId或者groupId
+     * 
+ * + * string push_from_id = 9; + */ + java.lang.String getPushFromId(); + /** + *
+     *push消息发送者或者群ID,这里使用站点siteUserId或者groupId
+     * 
+ * + * string push_from_id = 9; + */ + com.google.protobuf.ByteString + getPushFromIdBytes(); + + /** + *
+     *发送着用户名称或者群名称
+     * 
+ * + * string push_from_name = 10; + */ + java.lang.String getPushFromName(); + /** + *
+     *发送着用户名称或者群名称
+     * 
+ * + * string push_from_name = 10; + */ + com.google.protobuf.ByteString + getPushFromNameBytes(); + + /** + *
+     *接受者用户的tokens,给多人发送使用
+     * 
+ * + * repeated string user_tokens = 11; + */ + java.util.List + getUserTokensList(); + /** + *
+     *接受者用户的tokens,给多人发送使用
+     * 
+ * + * repeated string user_tokens = 11; + */ + int getUserTokensCount(); + /** + *
+     *接受者用户的tokens,给多人发送使用
+     * 
+ * + * repeated string user_tokens = 11; + */ + java.lang.String getUserTokens(int index); + /** + *
+     *接受者用户的tokens,给多人发送使用
+     * 
+ * + * repeated string user_tokens = 11; + */ + com.google.protobuf.ByteString + getUserTokensBytes(int index); + } + /** + *
+   *最简单的用户信息,用于给别人呈现
+   * 
+ * + * Protobuf type {@code core.Notification} + */ + public static final class Notification extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.Notification) + NotificationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Notification.newBuilder() to construct. + private Notification(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Notification() { + siteServer_ = ""; + pushTitle_ = ""; + pushAlert_ = ""; + pushGoto_ = ""; + pushBadge_ = 0; + pushSound_ = ""; + userId_ = ""; + userToken_ = ""; + pushFromId_ = ""; + pushFromName_ = ""; + userTokens_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Notification( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteServer_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + pushTitle_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pushAlert_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + pushGoto_ = s; + break; + } + case 40: { + + pushBadge_ = input.readInt32(); + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + pushSound_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + userId_ = s; + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + userToken_ = s; + break; + } + case 74: { + java.lang.String s = input.readStringRequireUtf8(); + + pushFromId_ = s; + break; + } + case 82: { + java.lang.String s = input.readStringRequireUtf8(); + + pushFromName_ = s; + break; + } + case 90: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) { + userTokens_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000400; + } + userTokens_.add(s); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) { + userTokens_ = userTokens_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.PushProto.internal_static_core_Notification_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.PushProto.internal_static_core_Notification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.PushProto.Notification.class, com.akaxin.proto.core.PushProto.Notification.Builder.class); + } + + private int bitField0_; + public static final int SITE_SERVER_FIELD_NUMBER = 1; + private volatile java.lang.Object siteServer_; + /** + *
+     *站点服务地址eg->127.0.0.1:2021
+     * 
+ * + * string site_server = 1; + */ + public java.lang.String getSiteServer() { + java.lang.Object ref = siteServer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteServer_ = s; + return s; + } + } + /** + *
+     *站点服务地址eg->127.0.0.1:2021
+     * 
+ * + * string site_server = 1; + */ + public com.google.protobuf.ByteString + getSiteServerBytes() { + java.lang.Object ref = siteServer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteServer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUSH_TITLE_FIELD_NUMBER = 2; + private volatile java.lang.Object pushTitle_; + /** + *
+     *站点服务名称
+     * 
+ * + * string push_title = 2; + */ + public java.lang.String getPushTitle() { + java.lang.Object ref = pushTitle_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushTitle_ = s; + return s; + } + } + /** + *
+     *站点服务名称
+     * 
+ * + * string push_title = 2; + */ + public com.google.protobuf.ByteString + getPushTitleBytes() { + java.lang.Object ref = pushTitle_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushTitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUSH_ALERT_FIELD_NUMBER = 3; + private volatile java.lang.Object pushAlert_; + /** + *
+     *展示的内容
+     * 
+ * + * string push_alert = 3; + */ + public java.lang.String getPushAlert() { + java.lang.Object ref = pushAlert_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushAlert_ = s; + return s; + } + } + /** + *
+     *展示的内容
+     * 
+ * + * string push_alert = 3; + */ + public com.google.protobuf.ByteString + getPushAlertBytes() { + java.lang.Object ref = pushAlert_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushAlert_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUSH_GOTO_FIELD_NUMBER = 4; + private volatile java.lang.Object pushGoto_; + /** + *
+     *Push跳转位置
+     * 
+ * + * string push_goto = 4; + */ + public java.lang.String getPushGoto() { + java.lang.Object ref = pushGoto_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushGoto_ = s; + return s; + } + } + /** + *
+     *Push跳转位置
+     * 
+ * + * string push_goto = 4; + */ + public com.google.protobuf.ByteString + getPushGotoBytes() { + java.lang.Object ref = pushGoto_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushGoto_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUSH_BADGE_FIELD_NUMBER = 5; + private int pushBadge_; + /** + *
+     *气泡展示个数,默认气泡数1
+     * 
+ * + * int32 push_badge = 5; + */ + public int getPushBadge() { + return pushBadge_; + } + + public static final int PUSH_SOUND_FIELD_NUMBER = 6; + private volatile java.lang.Object pushSound_; + /** + *
+     *声音
+     * 
+ * + * string push_sound = 6; + */ + public java.lang.String getPushSound() { + java.lang.Object ref = pushSound_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushSound_ = s; + return s; + } + } + /** + *
+     *声音
+     * 
+ * + * string push_sound = 6; + */ + public com.google.protobuf.ByteString + getPushSoundBytes() { + java.lang.Object ref = pushSound_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushSound_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_FIELD_NUMBER = 7; + private volatile java.lang.Object userId_; + /** + *
+     *用户id,这个地方需要使用Global User ID
+     * 
+ * + * string user_id = 7; + */ + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } + } + /** + *
+     *用户id,这个地方需要使用Global User ID
+     * 
+ * + * string user_id = 7; + */ + public com.google.protobuf.ByteString + getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_TOKEN_FIELD_NUMBER = 8; + private volatile java.lang.Object userToken_; + /** + *
+     *接受者用户的token,给一个人发送使用
+     * 
+ * + * string user_token = 8; + */ + public java.lang.String getUserToken() { + java.lang.Object ref = userToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userToken_ = s; + return s; + } + } + /** + *
+     *接受者用户的token,给一个人发送使用
+     * 
+ * + * string user_token = 8; + */ + public com.google.protobuf.ByteString + getUserTokenBytes() { + java.lang.Object ref = userToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUSH_FROM_ID_FIELD_NUMBER = 9; + private volatile java.lang.Object pushFromId_; + /** + *
+     *push消息发送者或者群ID,这里使用站点siteUserId或者groupId
+     * 
+ * + * string push_from_id = 9; + */ + public java.lang.String getPushFromId() { + java.lang.Object ref = pushFromId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushFromId_ = s; + return s; + } + } + /** + *
+     *push消息发送者或者群ID,这里使用站点siteUserId或者groupId
+     * 
+ * + * string push_from_id = 9; + */ + public com.google.protobuf.ByteString + getPushFromIdBytes() { + java.lang.Object ref = pushFromId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushFromId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUSH_FROM_NAME_FIELD_NUMBER = 10; + private volatile java.lang.Object pushFromName_; + /** + *
+     *发送着用户名称或者群名称
+     * 
+ * + * string push_from_name = 10; + */ + public java.lang.String getPushFromName() { + java.lang.Object ref = pushFromName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushFromName_ = s; + return s; + } + } + /** + *
+     *发送着用户名称或者群名称
+     * 
+ * + * string push_from_name = 10; + */ + public com.google.protobuf.ByteString + getPushFromNameBytes() { + java.lang.Object ref = pushFromName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushFromName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_TOKENS_FIELD_NUMBER = 11; + private com.google.protobuf.LazyStringList userTokens_; + /** + *
+     *接受者用户的tokens,给多人发送使用
+     * 
+ * + * repeated string user_tokens = 11; + */ + public com.google.protobuf.ProtocolStringList + getUserTokensList() { + return userTokens_; + } + /** + *
+     *接受者用户的tokens,给多人发送使用
+     * 
+ * + * repeated string user_tokens = 11; + */ + public int getUserTokensCount() { + return userTokens_.size(); + } + /** + *
+     *接受者用户的tokens,给多人发送使用
+     * 
+ * + * repeated string user_tokens = 11; + */ + public java.lang.String getUserTokens(int index) { + return userTokens_.get(index); + } + /** + *
+     *接受者用户的tokens,给多人发送使用
+     * 
+ * + * repeated string user_tokens = 11; + */ + public com.google.protobuf.ByteString + getUserTokensBytes(int index) { + return userTokens_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteServerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteServer_); + } + if (!getPushTitleBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pushTitle_); + } + if (!getPushAlertBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pushAlert_); + } + if (!getPushGotoBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pushGoto_); + } + if (pushBadge_ != 0) { + output.writeInt32(5, pushBadge_); + } + if (!getPushSoundBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pushSound_); + } + if (!getUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, userId_); + } + if (!getUserTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, userToken_); + } + if (!getPushFromIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, pushFromId_); + } + if (!getPushFromNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, pushFromName_); + } + for (int i = 0; i < userTokens_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, userTokens_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteServerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteServer_); + } + if (!getPushTitleBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pushTitle_); + } + if (!getPushAlertBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pushAlert_); + } + if (!getPushGotoBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pushGoto_); + } + if (pushBadge_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, pushBadge_); + } + if (!getPushSoundBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pushSound_); + } + if (!getUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, userId_); + } + if (!getUserTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, userToken_); + } + if (!getPushFromIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, pushFromId_); + } + if (!getPushFromNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, pushFromName_); + } + { + int dataSize = 0; + for (int i = 0; i < userTokens_.size(); i++) { + dataSize += computeStringSizeNoTag(userTokens_.getRaw(i)); + } + size += dataSize; + size += 1 * getUserTokensList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.PushProto.Notification)) { + return super.equals(obj); + } + com.akaxin.proto.core.PushProto.Notification other = (com.akaxin.proto.core.PushProto.Notification) obj; + + boolean result = true; + result = result && getSiteServer() + .equals(other.getSiteServer()); + result = result && getPushTitle() + .equals(other.getPushTitle()); + result = result && getPushAlert() + .equals(other.getPushAlert()); + result = result && getPushGoto() + .equals(other.getPushGoto()); + result = result && (getPushBadge() + == other.getPushBadge()); + result = result && getPushSound() + .equals(other.getPushSound()); + result = result && getUserId() + .equals(other.getUserId()); + result = result && getUserToken() + .equals(other.getUserToken()); + result = result && getPushFromId() + .equals(other.getPushFromId()); + result = result && getPushFromName() + .equals(other.getPushFromName()); + result = result && getUserTokensList() + .equals(other.getUserTokensList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getSiteServer().hashCode(); + hash = (37 * hash) + PUSH_TITLE_FIELD_NUMBER; + hash = (53 * hash) + getPushTitle().hashCode(); + hash = (37 * hash) + PUSH_ALERT_FIELD_NUMBER; + hash = (53 * hash) + getPushAlert().hashCode(); + hash = (37 * hash) + PUSH_GOTO_FIELD_NUMBER; + hash = (53 * hash) + getPushGoto().hashCode(); + hash = (37 * hash) + PUSH_BADGE_FIELD_NUMBER; + hash = (53 * hash) + getPushBadge(); + hash = (37 * hash) + PUSH_SOUND_FIELD_NUMBER; + hash = (53 * hash) + getPushSound().hashCode(); + hash = (37 * hash) + USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserId().hashCode(); + hash = (37 * hash) + USER_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getUserToken().hashCode(); + hash = (37 * hash) + PUSH_FROM_ID_FIELD_NUMBER; + hash = (53 * hash) + getPushFromId().hashCode(); + hash = (37 * hash) + PUSH_FROM_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPushFromName().hashCode(); + if (getUserTokensCount() > 0) { + hash = (37 * hash) + USER_TOKENS_FIELD_NUMBER; + hash = (53 * hash) + getUserTokensList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.PushProto.Notification parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.PushProto.Notification parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.Notification parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.PushProto.Notification parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.Notification parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.PushProto.Notification parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.Notification parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.PushProto.Notification parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.Notification parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.PushProto.Notification parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.Notification parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.PushProto.Notification parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.PushProto.Notification prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *最简单的用户信息,用于给别人呈现
+     * 
+ * + * Protobuf type {@code core.Notification} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.Notification) + com.akaxin.proto.core.PushProto.NotificationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.PushProto.internal_static_core_Notification_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.PushProto.internal_static_core_Notification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.PushProto.Notification.class, com.akaxin.proto.core.PushProto.Notification.Builder.class); + } + + // Construct using com.akaxin.proto.core.PushProto.Notification.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteServer_ = ""; + + pushTitle_ = ""; + + pushAlert_ = ""; + + pushGoto_ = ""; + + pushBadge_ = 0; + + pushSound_ = ""; + + userId_ = ""; + + userToken_ = ""; + + pushFromId_ = ""; + + pushFromName_ = ""; + + userTokens_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000400); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.PushProto.internal_static_core_Notification_descriptor; + } + + public com.akaxin.proto.core.PushProto.Notification getDefaultInstanceForType() { + return com.akaxin.proto.core.PushProto.Notification.getDefaultInstance(); + } + + public com.akaxin.proto.core.PushProto.Notification build() { + com.akaxin.proto.core.PushProto.Notification result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.PushProto.Notification buildPartial() { + com.akaxin.proto.core.PushProto.Notification result = new com.akaxin.proto.core.PushProto.Notification(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.siteServer_ = siteServer_; + result.pushTitle_ = pushTitle_; + result.pushAlert_ = pushAlert_; + result.pushGoto_ = pushGoto_; + result.pushBadge_ = pushBadge_; + result.pushSound_ = pushSound_; + result.userId_ = userId_; + result.userToken_ = userToken_; + result.pushFromId_ = pushFromId_; + result.pushFromName_ = pushFromName_; + if (((bitField0_ & 0x00000400) == 0x00000400)) { + userTokens_ = userTokens_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.userTokens_ = userTokens_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.PushProto.Notification) { + return mergeFrom((com.akaxin.proto.core.PushProto.Notification)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.PushProto.Notification other) { + if (other == com.akaxin.proto.core.PushProto.Notification.getDefaultInstance()) return this; + if (!other.getSiteServer().isEmpty()) { + siteServer_ = other.siteServer_; + onChanged(); + } + if (!other.getPushTitle().isEmpty()) { + pushTitle_ = other.pushTitle_; + onChanged(); + } + if (!other.getPushAlert().isEmpty()) { + pushAlert_ = other.pushAlert_; + onChanged(); + } + if (!other.getPushGoto().isEmpty()) { + pushGoto_ = other.pushGoto_; + onChanged(); + } + if (other.getPushBadge() != 0) { + setPushBadge(other.getPushBadge()); + } + if (!other.getPushSound().isEmpty()) { + pushSound_ = other.pushSound_; + onChanged(); + } + if (!other.getUserId().isEmpty()) { + userId_ = other.userId_; + onChanged(); + } + if (!other.getUserToken().isEmpty()) { + userToken_ = other.userToken_; + onChanged(); + } + if (!other.getPushFromId().isEmpty()) { + pushFromId_ = other.pushFromId_; + onChanged(); + } + if (!other.getPushFromName().isEmpty()) { + pushFromName_ = other.pushFromName_; + onChanged(); + } + if (!other.userTokens_.isEmpty()) { + if (userTokens_.isEmpty()) { + userTokens_ = other.userTokens_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureUserTokensIsMutable(); + userTokens_.addAll(other.userTokens_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.PushProto.Notification parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.PushProto.Notification) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object siteServer_ = ""; + /** + *
+       *站点服务地址eg->127.0.0.1:2021
+       * 
+ * + * string site_server = 1; + */ + public java.lang.String getSiteServer() { + java.lang.Object ref = siteServer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteServer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *站点服务地址eg->127.0.0.1:2021
+       * 
+ * + * string site_server = 1; + */ + public com.google.protobuf.ByteString + getSiteServerBytes() { + java.lang.Object ref = siteServer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteServer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *站点服务地址eg->127.0.0.1:2021
+       * 
+ * + * string site_server = 1; + */ + public Builder setSiteServer( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteServer_ = value; + onChanged(); + return this; + } + /** + *
+       *站点服务地址eg->127.0.0.1:2021
+       * 
+ * + * string site_server = 1; + */ + public Builder clearSiteServer() { + + siteServer_ = getDefaultInstance().getSiteServer(); + onChanged(); + return this; + } + /** + *
+       *站点服务地址eg->127.0.0.1:2021
+       * 
+ * + * string site_server = 1; + */ + public Builder setSiteServerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteServer_ = value; + onChanged(); + return this; + } + + private java.lang.Object pushTitle_ = ""; + /** + *
+       *站点服务名称
+       * 
+ * + * string push_title = 2; + */ + public java.lang.String getPushTitle() { + java.lang.Object ref = pushTitle_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushTitle_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *站点服务名称
+       * 
+ * + * string push_title = 2; + */ + public com.google.protobuf.ByteString + getPushTitleBytes() { + java.lang.Object ref = pushTitle_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushTitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *站点服务名称
+       * 
+ * + * string push_title = 2; + */ + public Builder setPushTitle( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pushTitle_ = value; + onChanged(); + return this; + } + /** + *
+       *站点服务名称
+       * 
+ * + * string push_title = 2; + */ + public Builder clearPushTitle() { + + pushTitle_ = getDefaultInstance().getPushTitle(); + onChanged(); + return this; + } + /** + *
+       *站点服务名称
+       * 
+ * + * string push_title = 2; + */ + public Builder setPushTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pushTitle_ = value; + onChanged(); + return this; + } + + private java.lang.Object pushAlert_ = ""; + /** + *
+       *展示的内容
+       * 
+ * + * string push_alert = 3; + */ + public java.lang.String getPushAlert() { + java.lang.Object ref = pushAlert_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushAlert_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *展示的内容
+       * 
+ * + * string push_alert = 3; + */ + public com.google.protobuf.ByteString + getPushAlertBytes() { + java.lang.Object ref = pushAlert_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushAlert_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *展示的内容
+       * 
+ * + * string push_alert = 3; + */ + public Builder setPushAlert( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pushAlert_ = value; + onChanged(); + return this; + } + /** + *
+       *展示的内容
+       * 
+ * + * string push_alert = 3; + */ + public Builder clearPushAlert() { + + pushAlert_ = getDefaultInstance().getPushAlert(); + onChanged(); + return this; + } + /** + *
+       *展示的内容
+       * 
+ * + * string push_alert = 3; + */ + public Builder setPushAlertBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pushAlert_ = value; + onChanged(); + return this; + } + + private java.lang.Object pushGoto_ = ""; + /** + *
+       *Push跳转位置
+       * 
+ * + * string push_goto = 4; + */ + public java.lang.String getPushGoto() { + java.lang.Object ref = pushGoto_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushGoto_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *Push跳转位置
+       * 
+ * + * string push_goto = 4; + */ + public com.google.protobuf.ByteString + getPushGotoBytes() { + java.lang.Object ref = pushGoto_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushGoto_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *Push跳转位置
+       * 
+ * + * string push_goto = 4; + */ + public Builder setPushGoto( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pushGoto_ = value; + onChanged(); + return this; + } + /** + *
+       *Push跳转位置
+       * 
+ * + * string push_goto = 4; + */ + public Builder clearPushGoto() { + + pushGoto_ = getDefaultInstance().getPushGoto(); + onChanged(); + return this; + } + /** + *
+       *Push跳转位置
+       * 
+ * + * string push_goto = 4; + */ + public Builder setPushGotoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pushGoto_ = value; + onChanged(); + return this; + } + + private int pushBadge_ ; + /** + *
+       *气泡展示个数,默认气泡数1
+       * 
+ * + * int32 push_badge = 5; + */ + public int getPushBadge() { + return pushBadge_; + } + /** + *
+       *气泡展示个数,默认气泡数1
+       * 
+ * + * int32 push_badge = 5; + */ + public Builder setPushBadge(int value) { + + pushBadge_ = value; + onChanged(); + return this; + } + /** + *
+       *气泡展示个数,默认气泡数1
+       * 
+ * + * int32 push_badge = 5; + */ + public Builder clearPushBadge() { + + pushBadge_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pushSound_ = ""; + /** + *
+       *声音
+       * 
+ * + * string push_sound = 6; + */ + public java.lang.String getPushSound() { + java.lang.Object ref = pushSound_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushSound_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *声音
+       * 
+ * + * string push_sound = 6; + */ + public com.google.protobuf.ByteString + getPushSoundBytes() { + java.lang.Object ref = pushSound_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushSound_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *声音
+       * 
+ * + * string push_sound = 6; + */ + public Builder setPushSound( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pushSound_ = value; + onChanged(); + return this; + } + /** + *
+       *声音
+       * 
+ * + * string push_sound = 6; + */ + public Builder clearPushSound() { + + pushSound_ = getDefaultInstance().getPushSound(); + onChanged(); + return this; + } + /** + *
+       *声音
+       * 
+ * + * string push_sound = 6; + */ + public Builder setPushSoundBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pushSound_ = value; + onChanged(); + return this; + } + + private java.lang.Object userId_ = ""; + /** + *
+       *用户id,这个地方需要使用Global User ID
+       * 
+ * + * string user_id = 7; + */ + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户id,这个地方需要使用Global User ID
+       * 
+ * + * string user_id = 7; + */ + public com.google.protobuf.ByteString + getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户id,这个地方需要使用Global User ID
+       * 
+ * + * string user_id = 7; + */ + public Builder setUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userId_ = value; + onChanged(); + return this; + } + /** + *
+       *用户id,这个地方需要使用Global User ID
+       * 
+ * + * string user_id = 7; + */ + public Builder clearUserId() { + + userId_ = getDefaultInstance().getUserId(); + onChanged(); + return this; + } + /** + *
+       *用户id,这个地方需要使用Global User ID
+       * 
+ * + * string user_id = 7; + */ + public Builder setUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userId_ = value; + onChanged(); + return this; + } + + private java.lang.Object userToken_ = ""; + /** + *
+       *接受者用户的token,给一个人发送使用
+       * 
+ * + * string user_token = 8; + */ + public java.lang.String getUserToken() { + java.lang.Object ref = userToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *接受者用户的token,给一个人发送使用
+       * 
+ * + * string user_token = 8; + */ + public com.google.protobuf.ByteString + getUserTokenBytes() { + java.lang.Object ref = userToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *接受者用户的token,给一个人发送使用
+       * 
+ * + * string user_token = 8; + */ + public Builder setUserToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userToken_ = value; + onChanged(); + return this; + } + /** + *
+       *接受者用户的token,给一个人发送使用
+       * 
+ * + * string user_token = 8; + */ + public Builder clearUserToken() { + + userToken_ = getDefaultInstance().getUserToken(); + onChanged(); + return this; + } + /** + *
+       *接受者用户的token,给一个人发送使用
+       * 
+ * + * string user_token = 8; + */ + public Builder setUserTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object pushFromId_ = ""; + /** + *
+       *push消息发送者或者群ID,这里使用站点siteUserId或者groupId
+       * 
+ * + * string push_from_id = 9; + */ + public java.lang.String getPushFromId() { + java.lang.Object ref = pushFromId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushFromId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *push消息发送者或者群ID,这里使用站点siteUserId或者groupId
+       * 
+ * + * string push_from_id = 9; + */ + public com.google.protobuf.ByteString + getPushFromIdBytes() { + java.lang.Object ref = pushFromId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushFromId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *push消息发送者或者群ID,这里使用站点siteUserId或者groupId
+       * 
+ * + * string push_from_id = 9; + */ + public Builder setPushFromId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pushFromId_ = value; + onChanged(); + return this; + } + /** + *
+       *push消息发送者或者群ID,这里使用站点siteUserId或者groupId
+       * 
+ * + * string push_from_id = 9; + */ + public Builder clearPushFromId() { + + pushFromId_ = getDefaultInstance().getPushFromId(); + onChanged(); + return this; + } + /** + *
+       *push消息发送者或者群ID,这里使用站点siteUserId或者groupId
+       * 
+ * + * string push_from_id = 9; + */ + public Builder setPushFromIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pushFromId_ = value; + onChanged(); + return this; + } + + private java.lang.Object pushFromName_ = ""; + /** + *
+       *发送着用户名称或者群名称
+       * 
+ * + * string push_from_name = 10; + */ + public java.lang.String getPushFromName() { + java.lang.Object ref = pushFromName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushFromName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *发送着用户名称或者群名称
+       * 
+ * + * string push_from_name = 10; + */ + public com.google.protobuf.ByteString + getPushFromNameBytes() { + java.lang.Object ref = pushFromName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushFromName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *发送着用户名称或者群名称
+       * 
+ * + * string push_from_name = 10; + */ + public Builder setPushFromName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pushFromName_ = value; + onChanged(); + return this; + } + /** + *
+       *发送着用户名称或者群名称
+       * 
+ * + * string push_from_name = 10; + */ + public Builder clearPushFromName() { + + pushFromName_ = getDefaultInstance().getPushFromName(); + onChanged(); + return this; + } + /** + *
+       *发送着用户名称或者群名称
+       * 
+ * + * string push_from_name = 10; + */ + public Builder setPushFromNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pushFromName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList userTokens_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUserTokensIsMutable() { + if (!((bitField0_ & 0x00000400) == 0x00000400)) { + userTokens_ = new com.google.protobuf.LazyStringArrayList(userTokens_); + bitField0_ |= 0x00000400; + } + } + /** + *
+       *接受者用户的tokens,给多人发送使用
+       * 
+ * + * repeated string user_tokens = 11; + */ + public com.google.protobuf.ProtocolStringList + getUserTokensList() { + return userTokens_.getUnmodifiableView(); + } + /** + *
+       *接受者用户的tokens,给多人发送使用
+       * 
+ * + * repeated string user_tokens = 11; + */ + public int getUserTokensCount() { + return userTokens_.size(); + } + /** + *
+       *接受者用户的tokens,给多人发送使用
+       * 
+ * + * repeated string user_tokens = 11; + */ + public java.lang.String getUserTokens(int index) { + return userTokens_.get(index); + } + /** + *
+       *接受者用户的tokens,给多人发送使用
+       * 
+ * + * repeated string user_tokens = 11; + */ + public com.google.protobuf.ByteString + getUserTokensBytes(int index) { + return userTokens_.getByteString(index); + } + /** + *
+       *接受者用户的tokens,给多人发送使用
+       * 
+ * + * repeated string user_tokens = 11; + */ + public Builder setUserTokens( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserTokensIsMutable(); + userTokens_.set(index, value); + onChanged(); + return this; + } + /** + *
+       *接受者用户的tokens,给多人发送使用
+       * 
+ * + * repeated string user_tokens = 11; + */ + public Builder addUserTokens( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserTokensIsMutable(); + userTokens_.add(value); + onChanged(); + return this; + } + /** + *
+       *接受者用户的tokens,给多人发送使用
+       * 
+ * + * repeated string user_tokens = 11; + */ + public Builder addAllUserTokens( + java.lang.Iterable values) { + ensureUserTokensIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, userTokens_); + onChanged(); + return this; + } + /** + *
+       *接受者用户的tokens,给多人发送使用
+       * 
+ * + * repeated string user_tokens = 11; + */ + public Builder clearUserTokens() { + userTokens_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + *
+       *接受者用户的tokens,给多人发送使用
+       * 
+ * + * repeated string user_tokens = 11; + */ + public Builder addUserTokensBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUserTokensIsMutable(); + userTokens_.add(value); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.Notification) + } + + // @@protoc_insertion_point(class_scope:core.Notification) + private static final com.akaxin.proto.core.PushProto.Notification DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.PushProto.Notification(); + } + + public static com.akaxin.proto.core.PushProto.Notification getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Notification parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Notification(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.PushProto.Notification getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface NotificationsOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.Notifications) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *站点服务地址eg->127.0.0.1:2021
+     * 
+ * + * string site_server = 1; + */ + java.lang.String getSiteServer(); + /** + *
+     *站点服务地址eg->127.0.0.1:2021
+     * 
+ * + * string site_server = 1; + */ + com.google.protobuf.ByteString + getSiteServerBytes(); + + /** + *
+     *站点服务名称
+     * 
+ * + * string push_title = 2; + */ + java.lang.String getPushTitle(); + /** + *
+     *站点服务名称
+     * 
+ * + * string push_title = 2; + */ + com.google.protobuf.ByteString + getPushTitleBytes(); + + /** + *
+     *push的副标题
+     * 
+ * + * string push_subtitle = 3; + */ + java.lang.String getPushSubtitle(); + /** + *
+     *push的副标题
+     * 
+ * + * string push_subtitle = 3; + */ + com.google.protobuf.ByteString + getPushSubtitleBytes(); + + /** + *
+     *展示的内容
+     * 
+ * + * string push_alert = 4; + */ + java.lang.String getPushAlert(); + /** + *
+     *展示的内容
+     * 
+ * + * string push_alert = 4; + */ + com.google.protobuf.ByteString + getPushAlertBytes(); + + /** + *
+     *Push跳转位置
+     * 
+ * + * string push_goto = 5; + */ + java.lang.String getPushGoto(); + /** + *
+     *Push跳转位置
+     * 
+ * + * string push_goto = 5; + */ + com.google.protobuf.ByteString + getPushGotoBytes(); + + /** + *
+     *气泡展示个数,默认气泡数1
+     * 
+ * + * int32 push_badge = 6; + */ + int getPushBadge(); + + /** + *
+     *声音
+     * 
+ * + * string push_sound = 7; + */ + java.lang.String getPushSound(); + /** + *
+     *声音
+     * 
+ * + * string push_sound = 7; + */ + com.google.protobuf.ByteString + getPushSoundBytes(); + } + /** + *
+   *支持站点批量发送push的功能
+   * 
+ * + * Protobuf type {@code core.Notifications} + */ + public static final class Notifications extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.Notifications) + NotificationsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Notifications.newBuilder() to construct. + private Notifications(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Notifications() { + siteServer_ = ""; + pushTitle_ = ""; + pushSubtitle_ = ""; + pushAlert_ = ""; + pushGoto_ = ""; + pushBadge_ = 0; + pushSound_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Notifications( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteServer_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + pushTitle_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pushSubtitle_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + pushAlert_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + pushGoto_ = s; + break; + } + case 48: { + + pushBadge_ = input.readInt32(); + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + pushSound_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.PushProto.internal_static_core_Notifications_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.PushProto.internal_static_core_Notifications_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.PushProto.Notifications.class, com.akaxin.proto.core.PushProto.Notifications.Builder.class); + } + + public static final int SITE_SERVER_FIELD_NUMBER = 1; + private volatile java.lang.Object siteServer_; + /** + *
+     *站点服务地址eg->127.0.0.1:2021
+     * 
+ * + * string site_server = 1; + */ + public java.lang.String getSiteServer() { + java.lang.Object ref = siteServer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteServer_ = s; + return s; + } + } + /** + *
+     *站点服务地址eg->127.0.0.1:2021
+     * 
+ * + * string site_server = 1; + */ + public com.google.protobuf.ByteString + getSiteServerBytes() { + java.lang.Object ref = siteServer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteServer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUSH_TITLE_FIELD_NUMBER = 2; + private volatile java.lang.Object pushTitle_; + /** + *
+     *站点服务名称
+     * 
+ * + * string push_title = 2; + */ + public java.lang.String getPushTitle() { + java.lang.Object ref = pushTitle_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushTitle_ = s; + return s; + } + } + /** + *
+     *站点服务名称
+     * 
+ * + * string push_title = 2; + */ + public com.google.protobuf.ByteString + getPushTitleBytes() { + java.lang.Object ref = pushTitle_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushTitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUSH_SUBTITLE_FIELD_NUMBER = 3; + private volatile java.lang.Object pushSubtitle_; + /** + *
+     *push的副标题
+     * 
+ * + * string push_subtitle = 3; + */ + public java.lang.String getPushSubtitle() { + java.lang.Object ref = pushSubtitle_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushSubtitle_ = s; + return s; + } + } + /** + *
+     *push的副标题
+     * 
+ * + * string push_subtitle = 3; + */ + public com.google.protobuf.ByteString + getPushSubtitleBytes() { + java.lang.Object ref = pushSubtitle_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushSubtitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUSH_ALERT_FIELD_NUMBER = 4; + private volatile java.lang.Object pushAlert_; + /** + *
+     *展示的内容
+     * 
+ * + * string push_alert = 4; + */ + public java.lang.String getPushAlert() { + java.lang.Object ref = pushAlert_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushAlert_ = s; + return s; + } + } + /** + *
+     *展示的内容
+     * 
+ * + * string push_alert = 4; + */ + public com.google.protobuf.ByteString + getPushAlertBytes() { + java.lang.Object ref = pushAlert_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushAlert_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUSH_GOTO_FIELD_NUMBER = 5; + private volatile java.lang.Object pushGoto_; + /** + *
+     *Push跳转位置
+     * 
+ * + * string push_goto = 5; + */ + public java.lang.String getPushGoto() { + java.lang.Object ref = pushGoto_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushGoto_ = s; + return s; + } + } + /** + *
+     *Push跳转位置
+     * 
+ * + * string push_goto = 5; + */ + public com.google.protobuf.ByteString + getPushGotoBytes() { + java.lang.Object ref = pushGoto_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushGoto_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUSH_BADGE_FIELD_NUMBER = 6; + private int pushBadge_; + /** + *
+     *气泡展示个数,默认气泡数1
+     * 
+ * + * int32 push_badge = 6; + */ + public int getPushBadge() { + return pushBadge_; + } + + public static final int PUSH_SOUND_FIELD_NUMBER = 7; + private volatile java.lang.Object pushSound_; + /** + *
+     *声音
+     * 
+ * + * string push_sound = 7; + */ + public java.lang.String getPushSound() { + java.lang.Object ref = pushSound_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushSound_ = s; + return s; + } + } + /** + *
+     *声音
+     * 
+ * + * string push_sound = 7; + */ + public com.google.protobuf.ByteString + getPushSoundBytes() { + java.lang.Object ref = pushSound_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushSound_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteServerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteServer_); + } + if (!getPushTitleBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pushTitle_); + } + if (!getPushSubtitleBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pushSubtitle_); + } + if (!getPushAlertBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pushAlert_); + } + if (!getPushGotoBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pushGoto_); + } + if (pushBadge_ != 0) { + output.writeInt32(6, pushBadge_); + } + if (!getPushSoundBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, pushSound_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteServerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteServer_); + } + if (!getPushTitleBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pushTitle_); + } + if (!getPushSubtitleBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pushSubtitle_); + } + if (!getPushAlertBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pushAlert_); + } + if (!getPushGotoBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pushGoto_); + } + if (pushBadge_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, pushBadge_); + } + if (!getPushSoundBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, pushSound_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.PushProto.Notifications)) { + return super.equals(obj); + } + com.akaxin.proto.core.PushProto.Notifications other = (com.akaxin.proto.core.PushProto.Notifications) obj; + + boolean result = true; + result = result && getSiteServer() + .equals(other.getSiteServer()); + result = result && getPushTitle() + .equals(other.getPushTitle()); + result = result && getPushSubtitle() + .equals(other.getPushSubtitle()); + result = result && getPushAlert() + .equals(other.getPushAlert()); + result = result && getPushGoto() + .equals(other.getPushGoto()); + result = result && (getPushBadge() + == other.getPushBadge()); + result = result && getPushSound() + .equals(other.getPushSound()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getSiteServer().hashCode(); + hash = (37 * hash) + PUSH_TITLE_FIELD_NUMBER; + hash = (53 * hash) + getPushTitle().hashCode(); + hash = (37 * hash) + PUSH_SUBTITLE_FIELD_NUMBER; + hash = (53 * hash) + getPushSubtitle().hashCode(); + hash = (37 * hash) + PUSH_ALERT_FIELD_NUMBER; + hash = (53 * hash) + getPushAlert().hashCode(); + hash = (37 * hash) + PUSH_GOTO_FIELD_NUMBER; + hash = (53 * hash) + getPushGoto().hashCode(); + hash = (37 * hash) + PUSH_BADGE_FIELD_NUMBER; + hash = (53 * hash) + getPushBadge(); + hash = (37 * hash) + PUSH_SOUND_FIELD_NUMBER; + hash = (53 * hash) + getPushSound().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.PushProto.Notifications parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.PushProto.Notifications parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.Notifications parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.PushProto.Notifications parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.Notifications parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.PushProto.Notifications parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.Notifications parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.PushProto.Notifications parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.Notifications parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.PushProto.Notifications parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.Notifications parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.PushProto.Notifications parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.PushProto.Notifications prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *支持站点批量发送push的功能
+     * 
+ * + * Protobuf type {@code core.Notifications} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.Notifications) + com.akaxin.proto.core.PushProto.NotificationsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.PushProto.internal_static_core_Notifications_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.PushProto.internal_static_core_Notifications_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.PushProto.Notifications.class, com.akaxin.proto.core.PushProto.Notifications.Builder.class); + } + + // Construct using com.akaxin.proto.core.PushProto.Notifications.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteServer_ = ""; + + pushTitle_ = ""; + + pushSubtitle_ = ""; + + pushAlert_ = ""; + + pushGoto_ = ""; + + pushBadge_ = 0; + + pushSound_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.PushProto.internal_static_core_Notifications_descriptor; + } + + public com.akaxin.proto.core.PushProto.Notifications getDefaultInstanceForType() { + return com.akaxin.proto.core.PushProto.Notifications.getDefaultInstance(); + } + + public com.akaxin.proto.core.PushProto.Notifications build() { + com.akaxin.proto.core.PushProto.Notifications result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.PushProto.Notifications buildPartial() { + com.akaxin.proto.core.PushProto.Notifications result = new com.akaxin.proto.core.PushProto.Notifications(this); + result.siteServer_ = siteServer_; + result.pushTitle_ = pushTitle_; + result.pushSubtitle_ = pushSubtitle_; + result.pushAlert_ = pushAlert_; + result.pushGoto_ = pushGoto_; + result.pushBadge_ = pushBadge_; + result.pushSound_ = pushSound_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.PushProto.Notifications) { + return mergeFrom((com.akaxin.proto.core.PushProto.Notifications)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.PushProto.Notifications other) { + if (other == com.akaxin.proto.core.PushProto.Notifications.getDefaultInstance()) return this; + if (!other.getSiteServer().isEmpty()) { + siteServer_ = other.siteServer_; + onChanged(); + } + if (!other.getPushTitle().isEmpty()) { + pushTitle_ = other.pushTitle_; + onChanged(); + } + if (!other.getPushSubtitle().isEmpty()) { + pushSubtitle_ = other.pushSubtitle_; + onChanged(); + } + if (!other.getPushAlert().isEmpty()) { + pushAlert_ = other.pushAlert_; + onChanged(); + } + if (!other.getPushGoto().isEmpty()) { + pushGoto_ = other.pushGoto_; + onChanged(); + } + if (other.getPushBadge() != 0) { + setPushBadge(other.getPushBadge()); + } + if (!other.getPushSound().isEmpty()) { + pushSound_ = other.pushSound_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.PushProto.Notifications parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.PushProto.Notifications) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteServer_ = ""; + /** + *
+       *站点服务地址eg->127.0.0.1:2021
+       * 
+ * + * string site_server = 1; + */ + public java.lang.String getSiteServer() { + java.lang.Object ref = siteServer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteServer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *站点服务地址eg->127.0.0.1:2021
+       * 
+ * + * string site_server = 1; + */ + public com.google.protobuf.ByteString + getSiteServerBytes() { + java.lang.Object ref = siteServer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteServer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *站点服务地址eg->127.0.0.1:2021
+       * 
+ * + * string site_server = 1; + */ + public Builder setSiteServer( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteServer_ = value; + onChanged(); + return this; + } + /** + *
+       *站点服务地址eg->127.0.0.1:2021
+       * 
+ * + * string site_server = 1; + */ + public Builder clearSiteServer() { + + siteServer_ = getDefaultInstance().getSiteServer(); + onChanged(); + return this; + } + /** + *
+       *站点服务地址eg->127.0.0.1:2021
+       * 
+ * + * string site_server = 1; + */ + public Builder setSiteServerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteServer_ = value; + onChanged(); + return this; + } + + private java.lang.Object pushTitle_ = ""; + /** + *
+       *站点服务名称
+       * 
+ * + * string push_title = 2; + */ + public java.lang.String getPushTitle() { + java.lang.Object ref = pushTitle_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushTitle_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *站点服务名称
+       * 
+ * + * string push_title = 2; + */ + public com.google.protobuf.ByteString + getPushTitleBytes() { + java.lang.Object ref = pushTitle_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushTitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *站点服务名称
+       * 
+ * + * string push_title = 2; + */ + public Builder setPushTitle( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pushTitle_ = value; + onChanged(); + return this; + } + /** + *
+       *站点服务名称
+       * 
+ * + * string push_title = 2; + */ + public Builder clearPushTitle() { + + pushTitle_ = getDefaultInstance().getPushTitle(); + onChanged(); + return this; + } + /** + *
+       *站点服务名称
+       * 
+ * + * string push_title = 2; + */ + public Builder setPushTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pushTitle_ = value; + onChanged(); + return this; + } + + private java.lang.Object pushSubtitle_ = ""; + /** + *
+       *push的副标题
+       * 
+ * + * string push_subtitle = 3; + */ + public java.lang.String getPushSubtitle() { + java.lang.Object ref = pushSubtitle_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushSubtitle_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *push的副标题
+       * 
+ * + * string push_subtitle = 3; + */ + public com.google.protobuf.ByteString + getPushSubtitleBytes() { + java.lang.Object ref = pushSubtitle_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushSubtitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *push的副标题
+       * 
+ * + * string push_subtitle = 3; + */ + public Builder setPushSubtitle( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pushSubtitle_ = value; + onChanged(); + return this; + } + /** + *
+       *push的副标题
+       * 
+ * + * string push_subtitle = 3; + */ + public Builder clearPushSubtitle() { + + pushSubtitle_ = getDefaultInstance().getPushSubtitle(); + onChanged(); + return this; + } + /** + *
+       *push的副标题
+       * 
+ * + * string push_subtitle = 3; + */ + public Builder setPushSubtitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pushSubtitle_ = value; + onChanged(); + return this; + } + + private java.lang.Object pushAlert_ = ""; + /** + *
+       *展示的内容
+       * 
+ * + * string push_alert = 4; + */ + public java.lang.String getPushAlert() { + java.lang.Object ref = pushAlert_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushAlert_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *展示的内容
+       * 
+ * + * string push_alert = 4; + */ + public com.google.protobuf.ByteString + getPushAlertBytes() { + java.lang.Object ref = pushAlert_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushAlert_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *展示的内容
+       * 
+ * + * string push_alert = 4; + */ + public Builder setPushAlert( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pushAlert_ = value; + onChanged(); + return this; + } + /** + *
+       *展示的内容
+       * 
+ * + * string push_alert = 4; + */ + public Builder clearPushAlert() { + + pushAlert_ = getDefaultInstance().getPushAlert(); + onChanged(); + return this; + } + /** + *
+       *展示的内容
+       * 
+ * + * string push_alert = 4; + */ + public Builder setPushAlertBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pushAlert_ = value; + onChanged(); + return this; + } + + private java.lang.Object pushGoto_ = ""; + /** + *
+       *Push跳转位置
+       * 
+ * + * string push_goto = 5; + */ + public java.lang.String getPushGoto() { + java.lang.Object ref = pushGoto_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushGoto_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *Push跳转位置
+       * 
+ * + * string push_goto = 5; + */ + public com.google.protobuf.ByteString + getPushGotoBytes() { + java.lang.Object ref = pushGoto_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushGoto_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *Push跳转位置
+       * 
+ * + * string push_goto = 5; + */ + public Builder setPushGoto( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pushGoto_ = value; + onChanged(); + return this; + } + /** + *
+       *Push跳转位置
+       * 
+ * + * string push_goto = 5; + */ + public Builder clearPushGoto() { + + pushGoto_ = getDefaultInstance().getPushGoto(); + onChanged(); + return this; + } + /** + *
+       *Push跳转位置
+       * 
+ * + * string push_goto = 5; + */ + public Builder setPushGotoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pushGoto_ = value; + onChanged(); + return this; + } + + private int pushBadge_ ; + /** + *
+       *气泡展示个数,默认气泡数1
+       * 
+ * + * int32 push_badge = 6; + */ + public int getPushBadge() { + return pushBadge_; + } + /** + *
+       *气泡展示个数,默认气泡数1
+       * 
+ * + * int32 push_badge = 6; + */ + public Builder setPushBadge(int value) { + + pushBadge_ = value; + onChanged(); + return this; + } + /** + *
+       *气泡展示个数,默认气泡数1
+       * 
+ * + * int32 push_badge = 6; + */ + public Builder clearPushBadge() { + + pushBadge_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pushSound_ = ""; + /** + *
+       *声音
+       * 
+ * + * string push_sound = 7; + */ + public java.lang.String getPushSound() { + java.lang.Object ref = pushSound_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushSound_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *声音
+       * 
+ * + * string push_sound = 7; + */ + public com.google.protobuf.ByteString + getPushSoundBytes() { + java.lang.Object ref = pushSound_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushSound_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *声音
+       * 
+ * + * string push_sound = 7; + */ + public Builder setPushSound( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pushSound_ = value; + onChanged(); + return this; + } + /** + *
+       *声音
+       * 
+ * + * string push_sound = 7; + */ + public Builder clearPushSound() { + + pushSound_ = getDefaultInstance().getPushSound(); + onChanged(); + return this; + } + /** + *
+       *声音
+       * 
+ * + * string push_sound = 7; + */ + public Builder setPushSoundBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pushSound_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.Notifications) + } + + // @@protoc_insertion_point(class_scope:core.Notifications) + private static final com.akaxin.proto.core.PushProto.Notifications DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.PushProto.Notifications(); + } + + public static com.akaxin.proto.core.PushProto.Notifications getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Notifications parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Notifications(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.PushProto.Notifications getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PushFromUserOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.PushFromUser) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *push发送者的globalUserId
+     * 
+ * + * string global_user_id = 1; + */ + java.lang.String getGlobalUserId(); + /** + *
+     *push发送者的globalUserId
+     * 
+ * + * string global_user_id = 1; + */ + com.google.protobuf.ByteString + getGlobalUserIdBytes(); + + /** + *
+     *push消息发送者或者群ID,这里使用站点siteUserId
+     * 
+ * + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + *
+     *push消息发送者或者群ID,这里使用站点siteUserId
+     * 
+ * + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *发送着用户名称,文案展示的一部分
+     * 
+ * + * string push_from_name = 3; + */ + java.lang.String getPushFromName(); + /** + *
+     *发送着用户名称,文案展示的一部分
+     * 
+ * + * string push_from_name = 3; + */ + com.google.protobuf.ByteString + getPushFromNameBytes(); + } + /** + * Protobuf type {@code core.PushFromUser} + */ + public static final class PushFromUser extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.PushFromUser) + PushFromUserOrBuilder { + private static final long serialVersionUID = 0L; + // Use PushFromUser.newBuilder() to construct. + private PushFromUser(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PushFromUser() { + globalUserId_ = ""; + siteUserId_ = ""; + pushFromName_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PushFromUser( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + globalUserId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pushFromName_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.PushProto.internal_static_core_PushFromUser_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.PushProto.internal_static_core_PushFromUser_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.PushProto.PushFromUser.class, com.akaxin.proto.core.PushProto.PushFromUser.Builder.class); + } + + public static final int GLOBAL_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object globalUserId_; + /** + *
+     *push发送者的globalUserId
+     * 
+ * + * string global_user_id = 1; + */ + public java.lang.String getGlobalUserId() { + java.lang.Object ref = globalUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + globalUserId_ = s; + return s; + } + } + /** + *
+     *push发送者的globalUserId
+     * 
+ * + * string global_user_id = 1; + */ + public com.google.protobuf.ByteString + getGlobalUserIdBytes() { + java.lang.Object ref = globalUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + globalUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + *
+     *push消息发送者或者群ID,这里使用站点siteUserId
+     * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *push消息发送者或者群ID,这里使用站点siteUserId
+     * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUSH_FROM_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object pushFromName_; + /** + *
+     *发送着用户名称,文案展示的一部分
+     * 
+ * + * string push_from_name = 3; + */ + public java.lang.String getPushFromName() { + java.lang.Object ref = pushFromName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushFromName_ = s; + return s; + } + } + /** + *
+     *发送着用户名称,文案展示的一部分
+     * 
+ * + * string push_from_name = 3; + */ + public com.google.protobuf.ByteString + getPushFromNameBytes() { + java.lang.Object ref = pushFromName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushFromName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGlobalUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, globalUserId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getPushFromNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pushFromName_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGlobalUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, globalUserId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getPushFromNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pushFromName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.PushProto.PushFromUser)) { + return super.equals(obj); + } + com.akaxin.proto.core.PushProto.PushFromUser other = (com.akaxin.proto.core.PushProto.PushFromUser) obj; + + boolean result = true; + result = result && getGlobalUserId() + .equals(other.getGlobalUserId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getPushFromName() + .equals(other.getPushFromName()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GLOBAL_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getGlobalUserId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + PUSH_FROM_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPushFromName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.PushProto.PushFromUser parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.PushProto.PushFromUser parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.PushFromUser parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.PushProto.PushFromUser parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.PushFromUser parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.PushProto.PushFromUser parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.PushFromUser parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.PushProto.PushFromUser parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.PushFromUser parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.PushProto.PushFromUser parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.PushFromUser parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.PushProto.PushFromUser parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.PushProto.PushFromUser prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code core.PushFromUser} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.PushFromUser) + com.akaxin.proto.core.PushProto.PushFromUserOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.PushProto.internal_static_core_PushFromUser_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.PushProto.internal_static_core_PushFromUser_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.PushProto.PushFromUser.class, com.akaxin.proto.core.PushProto.PushFromUser.Builder.class); + } + + // Construct using com.akaxin.proto.core.PushProto.PushFromUser.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + globalUserId_ = ""; + + siteUserId_ = ""; + + pushFromName_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.PushProto.internal_static_core_PushFromUser_descriptor; + } + + public com.akaxin.proto.core.PushProto.PushFromUser getDefaultInstanceForType() { + return com.akaxin.proto.core.PushProto.PushFromUser.getDefaultInstance(); + } + + public com.akaxin.proto.core.PushProto.PushFromUser build() { + com.akaxin.proto.core.PushProto.PushFromUser result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.PushProto.PushFromUser buildPartial() { + com.akaxin.proto.core.PushProto.PushFromUser result = new com.akaxin.proto.core.PushProto.PushFromUser(this); + result.globalUserId_ = globalUserId_; + result.siteUserId_ = siteUserId_; + result.pushFromName_ = pushFromName_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.PushProto.PushFromUser) { + return mergeFrom((com.akaxin.proto.core.PushProto.PushFromUser)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.PushProto.PushFromUser other) { + if (other == com.akaxin.proto.core.PushProto.PushFromUser.getDefaultInstance()) return this; + if (!other.getGlobalUserId().isEmpty()) { + globalUserId_ = other.globalUserId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getPushFromName().isEmpty()) { + pushFromName_ = other.pushFromName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.PushProto.PushFromUser parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.PushProto.PushFromUser) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object globalUserId_ = ""; + /** + *
+       *push发送者的globalUserId
+       * 
+ * + * string global_user_id = 1; + */ + public java.lang.String getGlobalUserId() { + java.lang.Object ref = globalUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + globalUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *push发送者的globalUserId
+       * 
+ * + * string global_user_id = 1; + */ + public com.google.protobuf.ByteString + getGlobalUserIdBytes() { + java.lang.Object ref = globalUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + globalUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *push发送者的globalUserId
+       * 
+ * + * string global_user_id = 1; + */ + public Builder setGlobalUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + globalUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *push发送者的globalUserId
+       * 
+ * + * string global_user_id = 1; + */ + public Builder clearGlobalUserId() { + + globalUserId_ = getDefaultInstance().getGlobalUserId(); + onChanged(); + return this; + } + /** + *
+       *push发送者的globalUserId
+       * 
+ * + * string global_user_id = 1; + */ + public Builder setGlobalUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + globalUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *push消息发送者或者群ID,这里使用站点siteUserId
+       * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *push消息发送者或者群ID,这里使用站点siteUserId
+       * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *push消息发送者或者群ID,这里使用站点siteUserId
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *push消息发送者或者群ID,这里使用站点siteUserId
+       * 
+ * + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *push消息发送者或者群ID,这里使用站点siteUserId
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object pushFromName_ = ""; + /** + *
+       *发送着用户名称,文案展示的一部分
+       * 
+ * + * string push_from_name = 3; + */ + public java.lang.String getPushFromName() { + java.lang.Object ref = pushFromName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushFromName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *发送着用户名称,文案展示的一部分
+       * 
+ * + * string push_from_name = 3; + */ + public com.google.protobuf.ByteString + getPushFromNameBytes() { + java.lang.Object ref = pushFromName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushFromName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *发送着用户名称,文案展示的一部分
+       * 
+ * + * string push_from_name = 3; + */ + public Builder setPushFromName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pushFromName_ = value; + onChanged(); + return this; + } + /** + *
+       *发送着用户名称,文案展示的一部分
+       * 
+ * + * string push_from_name = 3; + */ + public Builder clearPushFromName() { + + pushFromName_ = getDefaultInstance().getPushFromName(); + onChanged(); + return this; + } + /** + *
+       *发送着用户名称,文案展示的一部分
+       * 
+ * + * string push_from_name = 3; + */ + public Builder setPushFromNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pushFromName_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.PushFromUser) + } + + // @@protoc_insertion_point(class_scope:core.PushFromUser) + private static final com.akaxin.proto.core.PushProto.PushFromUser DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.PushProto.PushFromUser(); + } + + public static com.akaxin.proto.core.PushProto.PushFromUser getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public PushFromUser parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PushFromUser(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.PushProto.PushFromUser getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PushToUserOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.PushToUser) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *接受者:globalUserID,
+     * 
+ * + * string global_user_id = 1; + */ + java.lang.String getGlobalUserId(); + /** + *
+     *接受者:globalUserID,
+     * 
+ * + * string global_user_id = 1; + */ + com.google.protobuf.ByteString + getGlobalUserIdBytes(); + + /** + *
+     *接受者:单人用户的token
+     * 
+ * + * string user_token = 2; + */ + java.lang.String getUserToken(); + /** + *
+     *接受者:单人用户的token
+     * 
+ * + * string user_token = 2; + */ + com.google.protobuf.ByteString + getUserTokenBytes(); + + /** + *
+     *接受者用户的tokens,给多人发送使用
+     * 
+ * + * repeated string user_tokens = 3; + */ + java.util.List + getUserTokensList(); + /** + *
+     *接受者用户的tokens,给多人发送使用
+     * 
+ * + * repeated string user_tokens = 3; + */ + int getUserTokensCount(); + /** + *
+     *接受者用户的tokens,给多人发送使用
+     * 
+ * + * repeated string user_tokens = 3; + */ + java.lang.String getUserTokens(int index); + /** + *
+     *接受者用户的tokens,给多人发送使用
+     * 
+ * + * repeated string user_tokens = 3; + */ + com.google.protobuf.ByteString + getUserTokensBytes(int index); + } + /** + * Protobuf type {@code core.PushToUser} + */ + public static final class PushToUser extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.PushToUser) + PushToUserOrBuilder { + private static final long serialVersionUID = 0L; + // Use PushToUser.newBuilder() to construct. + private PushToUser(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PushToUser() { + globalUserId_ = ""; + userToken_ = ""; + userTokens_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PushToUser( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + globalUserId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + userToken_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + userTokens_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + userTokens_.add(s); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + userTokens_ = userTokens_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.PushProto.internal_static_core_PushToUser_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.PushProto.internal_static_core_PushToUser_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.PushProto.PushToUser.class, com.akaxin.proto.core.PushProto.PushToUser.Builder.class); + } + + private int bitField0_; + public static final int GLOBAL_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object globalUserId_; + /** + *
+     *接受者:globalUserID,
+     * 
+ * + * string global_user_id = 1; + */ + public java.lang.String getGlobalUserId() { + java.lang.Object ref = globalUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + globalUserId_ = s; + return s; + } + } + /** + *
+     *接受者:globalUserID,
+     * 
+ * + * string global_user_id = 1; + */ + public com.google.protobuf.ByteString + getGlobalUserIdBytes() { + java.lang.Object ref = globalUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + globalUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object userToken_; + /** + *
+     *接受者:单人用户的token
+     * 
+ * + * string user_token = 2; + */ + public java.lang.String getUserToken() { + java.lang.Object ref = userToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userToken_ = s; + return s; + } + } + /** + *
+     *接受者:单人用户的token
+     * 
+ * + * string user_token = 2; + */ + public com.google.protobuf.ByteString + getUserTokenBytes() { + java.lang.Object ref = userToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_TOKENS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList userTokens_; + /** + *
+     *接受者用户的tokens,给多人发送使用
+     * 
+ * + * repeated string user_tokens = 3; + */ + public com.google.protobuf.ProtocolStringList + getUserTokensList() { + return userTokens_; + } + /** + *
+     *接受者用户的tokens,给多人发送使用
+     * 
+ * + * repeated string user_tokens = 3; + */ + public int getUserTokensCount() { + return userTokens_.size(); + } + /** + *
+     *接受者用户的tokens,给多人发送使用
+     * 
+ * + * repeated string user_tokens = 3; + */ + public java.lang.String getUserTokens(int index) { + return userTokens_.get(index); + } + /** + *
+     *接受者用户的tokens,给多人发送使用
+     * 
+ * + * repeated string user_tokens = 3; + */ + public com.google.protobuf.ByteString + getUserTokensBytes(int index) { + return userTokens_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGlobalUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, globalUserId_); + } + if (!getUserTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userToken_); + } + for (int i = 0; i < userTokens_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userTokens_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGlobalUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, globalUserId_); + } + if (!getUserTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, userToken_); + } + { + int dataSize = 0; + for (int i = 0; i < userTokens_.size(); i++) { + dataSize += computeStringSizeNoTag(userTokens_.getRaw(i)); + } + size += dataSize; + size += 1 * getUserTokensList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.PushProto.PushToUser)) { + return super.equals(obj); + } + com.akaxin.proto.core.PushProto.PushToUser other = (com.akaxin.proto.core.PushProto.PushToUser) obj; + + boolean result = true; + result = result && getGlobalUserId() + .equals(other.getGlobalUserId()); + result = result && getUserToken() + .equals(other.getUserToken()); + result = result && getUserTokensList() + .equals(other.getUserTokensList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GLOBAL_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getGlobalUserId().hashCode(); + hash = (37 * hash) + USER_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getUserToken().hashCode(); + if (getUserTokensCount() > 0) { + hash = (37 * hash) + USER_TOKENS_FIELD_NUMBER; + hash = (53 * hash) + getUserTokensList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.PushProto.PushToUser parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.PushProto.PushToUser parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.PushToUser parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.PushProto.PushToUser parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.PushToUser parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.PushProto.PushToUser parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.PushToUser parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.PushProto.PushToUser parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.PushToUser parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.PushProto.PushToUser parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.PushProto.PushToUser parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.PushProto.PushToUser parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.PushProto.PushToUser prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code core.PushToUser} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.PushToUser) + com.akaxin.proto.core.PushProto.PushToUserOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.PushProto.internal_static_core_PushToUser_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.PushProto.internal_static_core_PushToUser_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.PushProto.PushToUser.class, com.akaxin.proto.core.PushProto.PushToUser.Builder.class); + } + + // Construct using com.akaxin.proto.core.PushProto.PushToUser.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + globalUserId_ = ""; + + userToken_ = ""; + + userTokens_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.PushProto.internal_static_core_PushToUser_descriptor; + } + + public com.akaxin.proto.core.PushProto.PushToUser getDefaultInstanceForType() { + return com.akaxin.proto.core.PushProto.PushToUser.getDefaultInstance(); + } + + public com.akaxin.proto.core.PushProto.PushToUser build() { + com.akaxin.proto.core.PushProto.PushToUser result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.PushProto.PushToUser buildPartial() { + com.akaxin.proto.core.PushProto.PushToUser result = new com.akaxin.proto.core.PushProto.PushToUser(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.globalUserId_ = globalUserId_; + result.userToken_ = userToken_; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + userTokens_ = userTokens_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.userTokens_ = userTokens_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.PushProto.PushToUser) { + return mergeFrom((com.akaxin.proto.core.PushProto.PushToUser)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.PushProto.PushToUser other) { + if (other == com.akaxin.proto.core.PushProto.PushToUser.getDefaultInstance()) return this; + if (!other.getGlobalUserId().isEmpty()) { + globalUserId_ = other.globalUserId_; + onChanged(); + } + if (!other.getUserToken().isEmpty()) { + userToken_ = other.userToken_; + onChanged(); + } + if (!other.userTokens_.isEmpty()) { + if (userTokens_.isEmpty()) { + userTokens_ = other.userTokens_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUserTokensIsMutable(); + userTokens_.addAll(other.userTokens_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.PushProto.PushToUser parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.PushProto.PushToUser) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object globalUserId_ = ""; + /** + *
+       *接受者:globalUserID,
+       * 
+ * + * string global_user_id = 1; + */ + public java.lang.String getGlobalUserId() { + java.lang.Object ref = globalUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + globalUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *接受者:globalUserID,
+       * 
+ * + * string global_user_id = 1; + */ + public com.google.protobuf.ByteString + getGlobalUserIdBytes() { + java.lang.Object ref = globalUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + globalUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *接受者:globalUserID,
+       * 
+ * + * string global_user_id = 1; + */ + public Builder setGlobalUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + globalUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *接受者:globalUserID,
+       * 
+ * + * string global_user_id = 1; + */ + public Builder clearGlobalUserId() { + + globalUserId_ = getDefaultInstance().getGlobalUserId(); + onChanged(); + return this; + } + /** + *
+       *接受者:globalUserID,
+       * 
+ * + * string global_user_id = 1; + */ + public Builder setGlobalUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + globalUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object userToken_ = ""; + /** + *
+       *接受者:单人用户的token
+       * 
+ * + * string user_token = 2; + */ + public java.lang.String getUserToken() { + java.lang.Object ref = userToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *接受者:单人用户的token
+       * 
+ * + * string user_token = 2; + */ + public com.google.protobuf.ByteString + getUserTokenBytes() { + java.lang.Object ref = userToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *接受者:单人用户的token
+       * 
+ * + * string user_token = 2; + */ + public Builder setUserToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userToken_ = value; + onChanged(); + return this; + } + /** + *
+       *接受者:单人用户的token
+       * 
+ * + * string user_token = 2; + */ + public Builder clearUserToken() { + + userToken_ = getDefaultInstance().getUserToken(); + onChanged(); + return this; + } + /** + *
+       *接受者:单人用户的token
+       * 
+ * + * string user_token = 2; + */ + public Builder setUserTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList userTokens_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUserTokensIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + userTokens_ = new com.google.protobuf.LazyStringArrayList(userTokens_); + bitField0_ |= 0x00000004; + } + } + /** + *
+       *接受者用户的tokens,给多人发送使用
+       * 
+ * + * repeated string user_tokens = 3; + */ + public com.google.protobuf.ProtocolStringList + getUserTokensList() { + return userTokens_.getUnmodifiableView(); + } + /** + *
+       *接受者用户的tokens,给多人发送使用
+       * 
+ * + * repeated string user_tokens = 3; + */ + public int getUserTokensCount() { + return userTokens_.size(); + } + /** + *
+       *接受者用户的tokens,给多人发送使用
+       * 
+ * + * repeated string user_tokens = 3; + */ + public java.lang.String getUserTokens(int index) { + return userTokens_.get(index); + } + /** + *
+       *接受者用户的tokens,给多人发送使用
+       * 
+ * + * repeated string user_tokens = 3; + */ + public com.google.protobuf.ByteString + getUserTokensBytes(int index) { + return userTokens_.getByteString(index); + } + /** + *
+       *接受者用户的tokens,给多人发送使用
+       * 
+ * + * repeated string user_tokens = 3; + */ + public Builder setUserTokens( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserTokensIsMutable(); + userTokens_.set(index, value); + onChanged(); + return this; + } + /** + *
+       *接受者用户的tokens,给多人发送使用
+       * 
+ * + * repeated string user_tokens = 3; + */ + public Builder addUserTokens( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserTokensIsMutable(); + userTokens_.add(value); + onChanged(); + return this; + } + /** + *
+       *接受者用户的tokens,给多人发送使用
+       * 
+ * + * repeated string user_tokens = 3; + */ + public Builder addAllUserTokens( + java.lang.Iterable values) { + ensureUserTokensIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, userTokens_); + onChanged(); + return this; + } + /** + *
+       *接受者用户的tokens,给多人发送使用
+       * 
+ * + * repeated string user_tokens = 3; + */ + public Builder clearUserTokens() { + userTokens_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       *接受者用户的tokens,给多人发送使用
+       * 
+ * + * repeated string user_tokens = 3; + */ + public Builder addUserTokensBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUserTokensIsMutable(); + userTokens_.add(value); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.PushToUser) + } + + // @@protoc_insertion_point(class_scope:core.PushToUser) + private static final com.akaxin.proto.core.PushProto.PushToUser DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.PushProto.PushToUser(); + } + + public static com.akaxin.proto.core.PushProto.PushToUser getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public PushToUser parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PushToUser(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.PushProto.PushToUser getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_Notification_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_Notification_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_Notifications_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_Notifications_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_PushFromUser_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_PushFromUser_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_PushToUser_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_PushToUser_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\017core/push.proto\022\004core\"\356\001\n\014Notification" + + "\022\023\n\013site_server\030\001 \001(\t\022\022\n\npush_title\030\002 \001(" + + "\t\022\022\n\npush_alert\030\003 \001(\t\022\021\n\tpush_goto\030\004 \001(\t" + + "\022\022\n\npush_badge\030\005 \001(\005\022\022\n\npush_sound\030\006 \001(\t" + + "\022\017\n\007user_id\030\007 \001(\t\022\022\n\nuser_token\030\010 \001(\t\022\024\n" + + "\014push_from_id\030\t \001(\t\022\026\n\016push_from_name\030\n " + + "\001(\t\022\023\n\013user_tokens\030\013 \003(\t\"\236\001\n\rNotificatio" + + "ns\022\023\n\013site_server\030\001 \001(\t\022\022\n\npush_title\030\002 " + + "\001(\t\022\025\n\rpush_subtitle\030\003 \001(\t\022\022\n\npush_alert" + + "\030\004 \001(\t\022\021\n\tpush_goto\030\005 \001(\t\022\022\n\npush_badge\030", + "\006 \001(\005\022\022\n\npush_sound\030\007 \001(\t\"T\n\014PushFromUse" + + "r\022\026\n\016global_user_id\030\001 \001(\t\022\024\n\014site_user_i" + + "d\030\002 \001(\t\022\026\n\016push_from_name\030\003 \001(\t\"M\n\nPushT" + + "oUser\022\026\n\016global_user_id\030\001 \001(\t\022\022\n\nuser_to" + + "ken\030\002 \001(\t\022\023\n\013user_tokens\030\003 \003(\t*\352\003\n\010PushT" + + "ype\022\017\n\013PUSH_NOTICE\020\000\022\023\n\017PUSH_MSG_STATUS\020" + + "\001\022\023\n\017PUSH_MSG_FINISH\020\002\022\r\n\tPUSH_TEXT\020\003\022\024\n" + + "\020PUSH_SECRET_TEXT\020\004\022\023\n\017PUSH_GROUP_TEXT\020\005" + + "\022\032\n\026PUSH_GROUP_SECRET_TEXT\020\006\022\016\n\nPUSH_IMA" + + "GE\020\007\022\025\n\021PUSH_SECRET_IMAGE\020\010\022\024\n\020PUSH_GROU", + "P_IMAGE\020\t\022\033\n\027PUSH_GROUP_SECRET_IMAGE\020\n\022\016" + + "\n\nPUSH_VOICE\020\013\022\025\n\021PUSH_SECRET_VOICE\020\014\022\024\n" + + "\020PUSH_GROUP_VOICE\020\r\022\033\n\027PUSH_GROUP_SECRET" + + "_VOICE\020\016\022\014\n\010PUSH_MAP\020\017\022\023\n\017PUSH_SECRET_MA" + + "P\020\020\022\022\n\016PUSH_GROUP_MAP\020\021\022\031\n\025PUSH_GROUP_SE" + + "CRET_MAP\020\022\022\022\n\016PUSH_U2_NOTICE\020\023\022\025\n\021PUSH_G" + + "ROUP_NOTICE\020\024\022\034\n\030PUSH_APPLY_FRIEND_NOTIC" + + "E\020dB\"\n\025com.akaxin.proto.coreB\tPushProtob" + + "\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_core_Notification_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_core_Notification_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_Notification_descriptor, + new java.lang.String[] { "SiteServer", "PushTitle", "PushAlert", "PushGoto", "PushBadge", "PushSound", "UserId", "UserToken", "PushFromId", "PushFromName", "UserTokens", }); + internal_static_core_Notifications_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_core_Notifications_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_Notifications_descriptor, + new java.lang.String[] { "SiteServer", "PushTitle", "PushSubtitle", "PushAlert", "PushGoto", "PushBadge", "PushSound", }); + internal_static_core_PushFromUser_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_core_PushFromUser_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_PushFromUser_descriptor, + new java.lang.String[] { "GlobalUserId", "SiteUserId", "PushFromName", }); + internal_static_core_PushToUser_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_core_PushToUser_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_PushToUser_descriptor, + new java.lang.String[] { "GlobalUserId", "UserToken", "UserTokens", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/core/TokenProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/TokenProto.java new file mode 100755 index 0000000..e0a2284 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/TokenProto.java @@ -0,0 +1,314 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/token.proto + +package com.akaxin.proto.core; + +public final class TokenProto { + private TokenProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + *
+   *token类型
+   * 
+ * + * Protobuf enum {@code core.TokenType} + */ + public enum TokenType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *未知token
+     * 
+ * + * UNKNOW_TOKEN = 0; + */ + UNKNOW_TOKEN(0), + /** + *
+     *用户token
+     * 
+ * + * USER_TOKEN = 1; + */ + USER_TOKEN(1), + /** + *
+     *手机token
+     * 
+ * + * PHONE_TOKEN = 2; + */ + PHONE_TOKEN(2), + /** + *
+     *群组token,用与二维码加群使用
+     * 
+ * + * GROUP_TOKEN = 3; + */ + GROUP_TOKEN(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     *未知token
+     * 
+ * + * UNKNOW_TOKEN = 0; + */ + public static final int UNKNOW_TOKEN_VALUE = 0; + /** + *
+     *用户token
+     * 
+ * + * USER_TOKEN = 1; + */ + public static final int USER_TOKEN_VALUE = 1; + /** + *
+     *手机token
+     * 
+ * + * PHONE_TOKEN = 2; + */ + public static final int PHONE_TOKEN_VALUE = 2; + /** + *
+     *群组token,用与二维码加群使用
+     * 
+ * + * GROUP_TOKEN = 3; + */ + public static final int GROUP_TOKEN_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TokenType valueOf(int value) { + return forNumber(value); + } + + public static TokenType forNumber(int value) { + switch (value) { + case 0: return UNKNOW_TOKEN; + case 1: return USER_TOKEN; + case 2: return PHONE_TOKEN; + case 3: return GROUP_TOKEN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + TokenType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TokenType findValueByNumber(int number) { + return TokenType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.TokenProto.getDescriptor().getEnumTypes().get(0); + } + + private static final TokenType[] VALUES = values(); + + public static TokenType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TokenType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.TokenType) + } + + /** + * Protobuf enum {@code core.GroupTokenStatus} + */ + public enum GroupTokenStatus + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *取消
+     * 
+ * + * GROUP_TOKEN_ABOLISH = 0; + */ + GROUP_TOKEN_ABOLISH(0), + /** + *
+     *所有用户可用
+     * 
+ * + * GROUP_TOKEN_AVAILABLE = 1; + */ + GROUP_TOKEN_AVAILABLE(1), + UNRECOGNIZED(-1), + ; + + /** + *
+     *取消
+     * 
+ * + * GROUP_TOKEN_ABOLISH = 0; + */ + public static final int GROUP_TOKEN_ABOLISH_VALUE = 0; + /** + *
+     *所有用户可用
+     * 
+ * + * GROUP_TOKEN_AVAILABLE = 1; + */ + public static final int GROUP_TOKEN_AVAILABLE_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static GroupTokenStatus valueOf(int value) { + return forNumber(value); + } + + public static GroupTokenStatus forNumber(int value) { + switch (value) { + case 0: return GROUP_TOKEN_ABOLISH; + case 1: return GROUP_TOKEN_AVAILABLE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + GroupTokenStatus> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public GroupTokenStatus findValueByNumber(int number) { + return GroupTokenStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.TokenProto.getDescriptor().getEnumTypes().get(1); + } + + private static final GroupTokenStatus[] VALUES = values(); + + public static GroupTokenStatus valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private GroupTokenStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.GroupTokenStatus) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\020core/token.proto\022\004core*O\n\tTokenType\022\020\n" + + "\014UNKNOW_TOKEN\020\000\022\016\n\nUSER_TOKEN\020\001\022\017\n\013PHONE" + + "_TOKEN\020\002\022\017\n\013GROUP_TOKEN\020\003*F\n\020GroupTokenS" + + "tatus\022\027\n\023GROUP_TOKEN_ABOLISH\020\000\022\031\n\025GROUP_" + + "TOKEN_AVAILABLE\020\001B#\n\025com.akaxin.proto.co" + + "reB\nTokenProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/core/UicProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/UicProto.java new file mode 100755 index 0000000..2634ab1 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/UicProto.java @@ -0,0 +1,1482 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/uic.proto + +package com.akaxin.proto.core; + +public final class UicProto { + private UicProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code core.UicStatus} + */ + public enum UicStatus + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *未使用的的
+     * 
+ * + * UNUSED = 0; + */ + UNUSED(0), + /** + *
+     *已经使用的
+     * 
+ * + * USED = 1; + */ + USED(1), + /** + *
+     *失效的
+     * 
+ * + * INVALIDATION = 2; + */ + INVALIDATION(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     *未使用的的
+     * 
+ * + * UNUSED = 0; + */ + public static final int UNUSED_VALUE = 0; + /** + *
+     *已经使用的
+     * 
+ * + * USED = 1; + */ + public static final int USED_VALUE = 1; + /** + *
+     *失效的
+     * 
+ * + * INVALIDATION = 2; + */ + public static final int INVALIDATION_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static UicStatus valueOf(int value) { + return forNumber(value); + } + + public static UicStatus forNumber(int value) { + switch (value) { + case 0: return UNUSED; + case 1: return USED; + case 2: return INVALIDATION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + UicStatus> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public UicStatus findValueByNumber(int number) { + return UicStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.UicProto.getDescriptor().getEnumTypes().get(0); + } + + private static final UicStatus[] VALUES = values(); + + public static UicStatus valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private UicStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.UicStatus) + } + + public interface UicInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.UicInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *uic_id
+     * 
+ * + * int32 id = 1; + */ + int getId(); + + /** + *
+     *uic
+     * 
+ * + * string uic = 2; + */ + java.lang.String getUic(); + /** + *
+     *uic
+     * 
+ * + * string uic = 2; + */ + com.google.protobuf.ByteString + getUicBytes(); + + /** + *
+     *用户id
+     * 
+ * + * string site_user_id = 3; + */ + java.lang.String getSiteUserId(); + /** + *
+     *用户id
+     * 
+ * + * string site_user_id = 3; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *用户名称
+     * 
+ * + * string user_name = 4; + */ + java.lang.String getUserName(); + /** + *
+     *用户名称
+     * 
+ * + * string user_name = 4; + */ + com.google.protobuf.ByteString + getUserNameBytes(); + + /** + *
+     *是否可用的状态
+     * 
+ * + * .core.UicStatus status = 5; + */ + int getStatusValue(); + /** + *
+     *是否可用的状态
+     * 
+ * + * .core.UicStatus status = 5; + */ + com.akaxin.proto.core.UicProto.UicStatus getStatus(); + + /** + *
+     *生成的时间
+     * 
+ * + * int64 create_time = 6; + */ + long getCreateTime(); + + /** + *
+     *使用的时间
+     * 
+ * + * int64 use_time = 7; + */ + long getUseTime(); + } + /** + *
+   *最简单的用户信息,用于给别人呈现
+   * 
+ * + * Protobuf type {@code core.UicInfo} + */ + public static final class UicInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.UicInfo) + UicInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use UicInfo.newBuilder() to construct. + private UicInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UicInfo() { + id_ = 0; + uic_ = ""; + siteUserId_ = ""; + userName_ = ""; + status_ = 0; + createTime_ = 0L; + useTime_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UicInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + id_ = input.readInt32(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + uic_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + userName_ = s; + break; + } + case 40: { + int rawValue = input.readEnum(); + + status_ = rawValue; + break; + } + case 48: { + + createTime_ = input.readInt64(); + break; + } + case 56: { + + useTime_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.UicProto.internal_static_core_UicInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.UicProto.internal_static_core_UicInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.UicProto.UicInfo.class, com.akaxin.proto.core.UicProto.UicInfo.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private int id_; + /** + *
+     *uic_id
+     * 
+ * + * int32 id = 1; + */ + public int getId() { + return id_; + } + + public static final int UIC_FIELD_NUMBER = 2; + private volatile java.lang.Object uic_; + /** + *
+     *uic
+     * 
+ * + * string uic = 2; + */ + public java.lang.String getUic() { + java.lang.Object ref = uic_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uic_ = s; + return s; + } + } + /** + *
+     *uic
+     * 
+ * + * string uic = 2; + */ + public com.google.protobuf.ByteString + getUicBytes() { + java.lang.Object ref = uic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteUserId_; + /** + *
+     *用户id
+     * 
+ * + * string site_user_id = 3; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *用户id
+     * 
+ * + * string site_user_id = 3; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object userName_; + /** + *
+     *用户名称
+     * 
+ * + * string user_name = 4; + */ + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } + } + /** + *
+     *用户名称
+     * 
+ * + * string user_name = 4; + */ + public com.google.protobuf.ByteString + getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_FIELD_NUMBER = 5; + private int status_; + /** + *
+     *是否可用的状态
+     * 
+ * + * .core.UicStatus status = 5; + */ + public int getStatusValue() { + return status_; + } + /** + *
+     *是否可用的状态
+     * 
+ * + * .core.UicStatus status = 5; + */ + public com.akaxin.proto.core.UicProto.UicStatus getStatus() { + com.akaxin.proto.core.UicProto.UicStatus result = com.akaxin.proto.core.UicProto.UicStatus.valueOf(status_); + return result == null ? com.akaxin.proto.core.UicProto.UicStatus.UNRECOGNIZED : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private long createTime_; + /** + *
+     *生成的时间
+     * 
+ * + * int64 create_time = 6; + */ + public long getCreateTime() { + return createTime_; + } + + public static final int USE_TIME_FIELD_NUMBER = 7; + private long useTime_; + /** + *
+     *使用的时间
+     * 
+ * + * int64 use_time = 7; + */ + public long getUseTime() { + return useTime_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (id_ != 0) { + output.writeInt32(1, id_); + } + if (!getUicBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uic_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteUserId_); + } + if (!getUserNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, userName_); + } + if (status_ != com.akaxin.proto.core.UicProto.UicStatus.UNUSED.getNumber()) { + output.writeEnum(5, status_); + } + if (createTime_ != 0L) { + output.writeInt64(6, createTime_); + } + if (useTime_ != 0L) { + output.writeInt64(7, useTime_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (id_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, id_); + } + if (!getUicBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uic_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteUserId_); + } + if (!getUserNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, userName_); + } + if (status_ != com.akaxin.proto.core.UicProto.UicStatus.UNUSED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, status_); + } + if (createTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, createTime_); + } + if (useTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, useTime_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.UicProto.UicInfo)) { + return super.equals(obj); + } + com.akaxin.proto.core.UicProto.UicInfo other = (com.akaxin.proto.core.UicProto.UicInfo) obj; + + boolean result = true; + result = result && (getId() + == other.getId()); + result = result && getUic() + .equals(other.getUic()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getUserName() + .equals(other.getUserName()); + result = result && status_ == other.status_; + result = result && (getCreateTime() + == other.getCreateTime()); + result = result && (getUseTime() + == other.getUseTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId(); + hash = (37 * hash) + UIC_FIELD_NUMBER; + hash = (53 * hash) + getUic().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + USER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getUserName().hashCode(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCreateTime()); + hash = (37 * hash) + USE_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUseTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.UicProto.UicInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.UicProto.UicInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.UicProto.UicInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.UicProto.UicInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.UicProto.UicInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.UicProto.UicInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.UicProto.UicInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.UicProto.UicInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.UicProto.UicInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.UicProto.UicInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.UicProto.UicInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.UicProto.UicInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.UicProto.UicInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *最简单的用户信息,用于给别人呈现
+     * 
+ * + * Protobuf type {@code core.UicInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.UicInfo) + com.akaxin.proto.core.UicProto.UicInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.UicProto.internal_static_core_UicInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.UicProto.internal_static_core_UicInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.UicProto.UicInfo.class, com.akaxin.proto.core.UicProto.UicInfo.Builder.class); + } + + // Construct using com.akaxin.proto.core.UicProto.UicInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + id_ = 0; + + uic_ = ""; + + siteUserId_ = ""; + + userName_ = ""; + + status_ = 0; + + createTime_ = 0L; + + useTime_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.UicProto.internal_static_core_UicInfo_descriptor; + } + + public com.akaxin.proto.core.UicProto.UicInfo getDefaultInstanceForType() { + return com.akaxin.proto.core.UicProto.UicInfo.getDefaultInstance(); + } + + public com.akaxin.proto.core.UicProto.UicInfo build() { + com.akaxin.proto.core.UicProto.UicInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.UicProto.UicInfo buildPartial() { + com.akaxin.proto.core.UicProto.UicInfo result = new com.akaxin.proto.core.UicProto.UicInfo(this); + result.id_ = id_; + result.uic_ = uic_; + result.siteUserId_ = siteUserId_; + result.userName_ = userName_; + result.status_ = status_; + result.createTime_ = createTime_; + result.useTime_ = useTime_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.UicProto.UicInfo) { + return mergeFrom((com.akaxin.proto.core.UicProto.UicInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.UicProto.UicInfo other) { + if (other == com.akaxin.proto.core.UicProto.UicInfo.getDefaultInstance()) return this; + if (other.getId() != 0) { + setId(other.getId()); + } + if (!other.getUic().isEmpty()) { + uic_ = other.uic_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getUserName().isEmpty()) { + userName_ = other.userName_; + onChanged(); + } + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + if (other.getCreateTime() != 0L) { + setCreateTime(other.getCreateTime()); + } + if (other.getUseTime() != 0L) { + setUseTime(other.getUseTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.UicProto.UicInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.UicProto.UicInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int id_ ; + /** + *
+       *uic_id
+       * 
+ * + * int32 id = 1; + */ + public int getId() { + return id_; + } + /** + *
+       *uic_id
+       * 
+ * + * int32 id = 1; + */ + public Builder setId(int value) { + + id_ = value; + onChanged(); + return this; + } + /** + *
+       *uic_id
+       * 
+ * + * int32 id = 1; + */ + public Builder clearId() { + + id_ = 0; + onChanged(); + return this; + } + + private java.lang.Object uic_ = ""; + /** + *
+       *uic
+       * 
+ * + * string uic = 2; + */ + public java.lang.String getUic() { + java.lang.Object ref = uic_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uic_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *uic
+       * 
+ * + * string uic = 2; + */ + public com.google.protobuf.ByteString + getUicBytes() { + java.lang.Object ref = uic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *uic
+       * 
+ * + * string uic = 2; + */ + public Builder setUic( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uic_ = value; + onChanged(); + return this; + } + /** + *
+       *uic
+       * 
+ * + * string uic = 2; + */ + public Builder clearUic() { + + uic_ = getDefaultInstance().getUic(); + onChanged(); + return this; + } + /** + *
+       *uic
+       * 
+ * + * string uic = 2; + */ + public Builder setUicBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uic_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *用户id
+       * 
+ * + * string site_user_id = 3; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户id
+       * 
+ * + * string site_user_id = 3; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户id
+       * 
+ * + * string site_user_id = 3; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *用户id
+       * 
+ * + * string site_user_id = 3; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *用户id
+       * 
+ * + * string site_user_id = 3; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object userName_ = ""; + /** + *
+       *用户名称
+       * 
+ * + * string user_name = 4; + */ + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户名称
+       * 
+ * + * string user_name = 4; + */ + public com.google.protobuf.ByteString + getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户名称
+       * 
+ * + * string user_name = 4; + */ + public Builder setUserName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userName_ = value; + onChanged(); + return this; + } + /** + *
+       *用户名称
+       * 
+ * + * string user_name = 4; + */ + public Builder clearUserName() { + + userName_ = getDefaultInstance().getUserName(); + onChanged(); + return this; + } + /** + *
+       *用户名称
+       * 
+ * + * string user_name = 4; + */ + public Builder setUserNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userName_ = value; + onChanged(); + return this; + } + + private int status_ = 0; + /** + *
+       *是否可用的状态
+       * 
+ * + * .core.UicStatus status = 5; + */ + public int getStatusValue() { + return status_; + } + /** + *
+       *是否可用的状态
+       * 
+ * + * .core.UicStatus status = 5; + */ + public Builder setStatusValue(int value) { + status_ = value; + onChanged(); + return this; + } + /** + *
+       *是否可用的状态
+       * 
+ * + * .core.UicStatus status = 5; + */ + public com.akaxin.proto.core.UicProto.UicStatus getStatus() { + com.akaxin.proto.core.UicProto.UicStatus result = com.akaxin.proto.core.UicProto.UicStatus.valueOf(status_); + return result == null ? com.akaxin.proto.core.UicProto.UicStatus.UNRECOGNIZED : result; + } + /** + *
+       *是否可用的状态
+       * 
+ * + * .core.UicStatus status = 5; + */ + public Builder setStatus(com.akaxin.proto.core.UicProto.UicStatus value) { + if (value == null) { + throw new NullPointerException(); + } + + status_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       *是否可用的状态
+       * 
+ * + * .core.UicStatus status = 5; + */ + public Builder clearStatus() { + + status_ = 0; + onChanged(); + return this; + } + + private long createTime_ ; + /** + *
+       *生成的时间
+       * 
+ * + * int64 create_time = 6; + */ + public long getCreateTime() { + return createTime_; + } + /** + *
+       *生成的时间
+       * 
+ * + * int64 create_time = 6; + */ + public Builder setCreateTime(long value) { + + createTime_ = value; + onChanged(); + return this; + } + /** + *
+       *生成的时间
+       * 
+ * + * int64 create_time = 6; + */ + public Builder clearCreateTime() { + + createTime_ = 0L; + onChanged(); + return this; + } + + private long useTime_ ; + /** + *
+       *使用的时间
+       * 
+ * + * int64 use_time = 7; + */ + public long getUseTime() { + return useTime_; + } + /** + *
+       *使用的时间
+       * 
+ * + * int64 use_time = 7; + */ + public Builder setUseTime(long value) { + + useTime_ = value; + onChanged(); + return this; + } + /** + *
+       *使用的时间
+       * 
+ * + * int64 use_time = 7; + */ + public Builder clearUseTime() { + + useTime_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.UicInfo) + } + + // @@protoc_insertion_point(class_scope:core.UicInfo) + private static final com.akaxin.proto.core.UicProto.UicInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.UicProto.UicInfo(); + } + + public static com.akaxin.proto.core.UicProto.UicInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public UicInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UicInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.UicProto.UicInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_UicInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_UicInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\016core/uic.proto\022\004core\"\223\001\n\007UicInfo\022\n\n\002id" + + "\030\001 \001(\005\022\013\n\003uic\030\002 \001(\t\022\024\n\014site_user_id\030\003 \001(" + + "\t\022\021\n\tuser_name\030\004 \001(\t\022\037\n\006status\030\005 \001(\0162\017.c" + + "ore.UicStatus\022\023\n\013create_time\030\006 \001(\003\022\020\n\010us" + + "e_time\030\007 \001(\003*3\n\tUicStatus\022\n\n\006UNUSED\020\000\022\010\n" + + "\004USED\020\001\022\020\n\014INVALIDATION\020\002B!\n\025com.akaxin." + + "proto.coreB\010UicProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_core_UicInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_core_UicInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_UicInfo_descriptor, + new java.lang.String[] { "Id", "Uic", "SiteUserId", "UserName", "Status", "CreateTime", "UseTime", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/core/UserProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/UserProto.java new file mode 100755 index 0000000..dcc9f9d --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/core/UserProto.java @@ -0,0 +1,5132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/user.proto + +package com.akaxin.proto.core; + +public final class UserProto { + private UserProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code core.UserStatus} + */ + public enum UserStatus + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *正常用户
+     * 
+ * + * NORMAL = 0; + */ + NORMAL(0), + /** + *
+     *禁封用户
+     * 
+ * + * SEALUP = 1; + */ + SEALUP(1), + UNRECOGNIZED(-1), + ; + + /** + *
+     *正常用户
+     * 
+ * + * NORMAL = 0; + */ + public static final int NORMAL_VALUE = 0; + /** + *
+     *禁封用户
+     * 
+ * + * SEALUP = 1; + */ + public static final int SEALUP_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static UserStatus valueOf(int value) { + return forNumber(value); + } + + public static UserStatus forNumber(int value) { + switch (value) { + case 0: return NORMAL; + case 1: return SEALUP; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + UserStatus> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public UserStatus findValueByNumber(int number) { + return UserStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.UserProto.getDescriptor().getEnumTypes().get(0); + } + + private static final UserStatus[] VALUES = values(); + + public static UserStatus valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private UserStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.UserStatus) + } + + /** + *
+   * 针对当前用户A来说,用户B和A之间的关系
+   * 
+ * + * Protobuf enum {@code core.UserRelation} + */ + public enum UserRelation + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     *用户无关系
+     * 
+ * + * RELATION_NONE = 0; + */ + RELATION_NONE(0), + /** + *
+     *用户之间为好友关系,AB互相为好友
+     * 
+ * + * RELATION_FRIEND = 1; + */ + RELATION_FRIEND(1), + /** + *
+     *A 关注 B(A添加B为好友,待B同意)
+     * 
+ * + * RELATION_CARE = 2; + */ + RELATION_CARE(2), + /** + *
+     *B 关注 A(B添加A为好友,待A同意)
+     * 
+ * + * RELATION_FANS = 3; + */ + RELATION_FANS(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     *用户无关系
+     * 
+ * + * RELATION_NONE = 0; + */ + public static final int RELATION_NONE_VALUE = 0; + /** + *
+     *用户之间为好友关系,AB互相为好友
+     * 
+ * + * RELATION_FRIEND = 1; + */ + public static final int RELATION_FRIEND_VALUE = 1; + /** + *
+     *A 关注 B(A添加B为好友,待B同意)
+     * 
+ * + * RELATION_CARE = 2; + */ + public static final int RELATION_CARE_VALUE = 2; + /** + *
+     *B 关注 A(B添加A为好友,待A同意)
+     * 
+ * + * RELATION_FANS = 3; + */ + public static final int RELATION_FANS_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static UserRelation valueOf(int value) { + return forNumber(value); + } + + public static UserRelation forNumber(int value) { + switch (value) { + case 0: return RELATION_NONE; + case 1: return RELATION_FRIEND; + case 2: return RELATION_CARE; + case 3: return RELATION_FANS; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + UserRelation> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public UserRelation findValueByNumber(int number) { + return UserRelation.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.akaxin.proto.core.UserProto.getDescriptor().getEnumTypes().get(1); + } + + private static final UserRelation[] VALUES = values(); + + public static UserRelation valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private UserRelation(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:core.UserRelation) + } + + public interface UserProfileOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.UserProfile) + com.google.protobuf.MessageOrBuilder { + + /** + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *如果用户有备注,这里使用备注,如果没有使用昵称,修改个人profile昵称,直接把昵称复制这里
+     * 
+ * + * string user_name = 2; + */ + java.lang.String getUserName(); + /** + *
+     *如果用户有备注,这里使用备注,如果没有使用昵称,修改个人profile昵称,直接把昵称复制这里
+     * 
+ * + * string user_name = 2; + */ + com.google.protobuf.ByteString + getUserNameBytes(); + + /** + * string user_photo = 3; + */ + java.lang.String getUserPhoto(); + /** + * string user_photo = 3; + */ + com.google.protobuf.ByteString + getUserPhotoBytes(); + + /** + * string self_introduce = 4; + */ + java.lang.String getSelfIntroduce(); + /** + * string self_introduce = 4; + */ + com.google.protobuf.ByteString + getSelfIntroduceBytes(); + + /** + * .core.UserStatus user_status = 5; + */ + int getUserStatusValue(); + /** + * .core.UserStatus user_status = 5; + */ + com.akaxin.proto.core.UserProto.UserStatus getUserStatus(); + + /** + * int64 register_time = 6; + */ + long getRegisterTime(); + + /** + *
+     *用户唯一登陆名,站点唯一(例如使用:“卡号”表示)
+     * 
+ * + * string site_login_id = 7; + */ + java.lang.String getSiteLoginId(); + /** + *
+     *用户唯一登陆名,站点唯一(例如使用:“卡号”表示)
+     * 
+ * + * string site_login_id = 7; + */ + com.google.protobuf.ByteString + getSiteLoginIdBytes(); + + /** + *
+     *用户个人设置的昵称
+     * 
+ * + * string nick_name = 8; + */ + java.lang.String getNickName(); + /** + *
+     *用户个人设置的昵称
+     * 
+ * + * string nick_name = 8; + */ + com.google.protobuf.ByteString + getNickNameBytes(); + + /** + *
+     *汉字转换拼音
+     * 
+ * + * string username_in_latin = 9; + */ + java.lang.String getUsernameInLatin(); + /** + *
+     *汉字转换拼音
+     * 
+ * + * string username_in_latin = 9; + */ + com.google.protobuf.ByteString + getUsernameInLatinBytes(); + + /** + *
+     *用户公钥 SimpleUserProfile 不需要
+     * 
+ * + * string user_id_pubk = 10; + */ + java.lang.String getUserIdPubk(); + /** + *
+     *用户公钥 SimpleUserProfile 不需要
+     * 
+ * + * string user_id_pubk = 10; + */ + com.google.protobuf.ByteString + getUserIdPubkBytes(); + } + /** + *
+   *获取用户的详细信息
+   * 
+ * + * Protobuf type {@code core.UserProfile} + */ + public static final class UserProfile extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.UserProfile) + UserProfileOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserProfile.newBuilder() to construct. + private UserProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UserProfile() { + siteUserId_ = ""; + userName_ = ""; + userPhoto_ = ""; + selfIntroduce_ = ""; + userStatus_ = 0; + registerTime_ = 0L; + siteLoginId_ = ""; + nickName_ = ""; + usernameInLatin_ = ""; + userIdPubk_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UserProfile( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + userName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + userPhoto_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + selfIntroduce_ = s; + break; + } + case 40: { + int rawValue = input.readEnum(); + + userStatus_ = rawValue; + break; + } + case 48: { + + registerTime_ = input.readInt64(); + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + siteLoginId_ = s; + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + nickName_ = s; + break; + } + case 74: { + java.lang.String s = input.readStringRequireUtf8(); + + usernameInLatin_ = s; + break; + } + case 82: { + java.lang.String s = input.readStringRequireUtf8(); + + userIdPubk_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.UserProto.internal_static_core_UserProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.UserProto.internal_static_core_UserProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.UserProto.UserProfile.class, com.akaxin.proto.core.UserProto.UserProfile.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object userName_; + /** + *
+     *如果用户有备注,这里使用备注,如果没有使用昵称,修改个人profile昵称,直接把昵称复制这里
+     * 
+ * + * string user_name = 2; + */ + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } + } + /** + *
+     *如果用户有备注,这里使用备注,如果没有使用昵称,修改个人profile昵称,直接把昵称复制这里
+     * 
+ * + * string user_name = 2; + */ + public com.google.protobuf.ByteString + getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_PHOTO_FIELD_NUMBER = 3; + private volatile java.lang.Object userPhoto_; + /** + * string user_photo = 3; + */ + public java.lang.String getUserPhoto() { + java.lang.Object ref = userPhoto_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPhoto_ = s; + return s; + } + } + /** + * string user_photo = 3; + */ + public com.google.protobuf.ByteString + getUserPhotoBytes() { + java.lang.Object ref = userPhoto_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userPhoto_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SELF_INTRODUCE_FIELD_NUMBER = 4; + private volatile java.lang.Object selfIntroduce_; + /** + * string self_introduce = 4; + */ + public java.lang.String getSelfIntroduce() { + java.lang.Object ref = selfIntroduce_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selfIntroduce_ = s; + return s; + } + } + /** + * string self_introduce = 4; + */ + public com.google.protobuf.ByteString + getSelfIntroduceBytes() { + java.lang.Object ref = selfIntroduce_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + selfIntroduce_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_STATUS_FIELD_NUMBER = 5; + private int userStatus_; + /** + * .core.UserStatus user_status = 5; + */ + public int getUserStatusValue() { + return userStatus_; + } + /** + * .core.UserStatus user_status = 5; + */ + public com.akaxin.proto.core.UserProto.UserStatus getUserStatus() { + com.akaxin.proto.core.UserProto.UserStatus result = com.akaxin.proto.core.UserProto.UserStatus.valueOf(userStatus_); + return result == null ? com.akaxin.proto.core.UserProto.UserStatus.UNRECOGNIZED : result; + } + + public static final int REGISTER_TIME_FIELD_NUMBER = 6; + private long registerTime_; + /** + * int64 register_time = 6; + */ + public long getRegisterTime() { + return registerTime_; + } + + public static final int SITE_LOGIN_ID_FIELD_NUMBER = 7; + private volatile java.lang.Object siteLoginId_; + /** + *
+     *用户唯一登陆名,站点唯一(例如使用:“卡号”表示)
+     * 
+ * + * string site_login_id = 7; + */ + public java.lang.String getSiteLoginId() { + java.lang.Object ref = siteLoginId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteLoginId_ = s; + return s; + } + } + /** + *
+     *用户唯一登陆名,站点唯一(例如使用:“卡号”表示)
+     * 
+ * + * string site_login_id = 7; + */ + public com.google.protobuf.ByteString + getSiteLoginIdBytes() { + java.lang.Object ref = siteLoginId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteLoginId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NICK_NAME_FIELD_NUMBER = 8; + private volatile java.lang.Object nickName_; + /** + *
+     *用户个人设置的昵称
+     * 
+ * + * string nick_name = 8; + */ + public java.lang.String getNickName() { + java.lang.Object ref = nickName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nickName_ = s; + return s; + } + } + /** + *
+     *用户个人设置的昵称
+     * 
+ * + * string nick_name = 8; + */ + public com.google.protobuf.ByteString + getNickNameBytes() { + java.lang.Object ref = nickName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nickName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERNAME_IN_LATIN_FIELD_NUMBER = 9; + private volatile java.lang.Object usernameInLatin_; + /** + *
+     *汉字转换拼音
+     * 
+ * + * string username_in_latin = 9; + */ + public java.lang.String getUsernameInLatin() { + java.lang.Object ref = usernameInLatin_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + usernameInLatin_ = s; + return s; + } + } + /** + *
+     *汉字转换拼音
+     * 
+ * + * string username_in_latin = 9; + */ + public com.google.protobuf.ByteString + getUsernameInLatinBytes() { + java.lang.Object ref = usernameInLatin_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + usernameInLatin_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_PUBK_FIELD_NUMBER = 10; + private volatile java.lang.Object userIdPubk_; + /** + *
+     *用户公钥 SimpleUserProfile 不需要
+     * 
+ * + * string user_id_pubk = 10; + */ + public java.lang.String getUserIdPubk() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPubk_ = s; + return s; + } + } + /** + *
+     *用户公钥 SimpleUserProfile 不需要
+     * 
+ * + * string user_id_pubk = 10; + */ + public com.google.protobuf.ByteString + getUserIdPubkBytes() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + if (!getUserNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userName_); + } + if (!getUserPhotoBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userPhoto_); + } + if (!getSelfIntroduceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, selfIntroduce_); + } + if (userStatus_ != com.akaxin.proto.core.UserProto.UserStatus.NORMAL.getNumber()) { + output.writeEnum(5, userStatus_); + } + if (registerTime_ != 0L) { + output.writeInt64(6, registerTime_); + } + if (!getSiteLoginIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, siteLoginId_); + } + if (!getNickNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, nickName_); + } + if (!getUsernameInLatinBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, usernameInLatin_); + } + if (!getUserIdPubkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, userIdPubk_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + if (!getUserNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, userName_); + } + if (!getUserPhotoBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userPhoto_); + } + if (!getSelfIntroduceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, selfIntroduce_); + } + if (userStatus_ != com.akaxin.proto.core.UserProto.UserStatus.NORMAL.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, userStatus_); + } + if (registerTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, registerTime_); + } + if (!getSiteLoginIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, siteLoginId_); + } + if (!getNickNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, nickName_); + } + if (!getUsernameInLatinBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, usernameInLatin_); + } + if (!getUserIdPubkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, userIdPubk_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.UserProto.UserProfile)) { + return super.equals(obj); + } + com.akaxin.proto.core.UserProto.UserProfile other = (com.akaxin.proto.core.UserProto.UserProfile) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getUserName() + .equals(other.getUserName()); + result = result && getUserPhoto() + .equals(other.getUserPhoto()); + result = result && getSelfIntroduce() + .equals(other.getSelfIntroduce()); + result = result && userStatus_ == other.userStatus_; + result = result && (getRegisterTime() + == other.getRegisterTime()); + result = result && getSiteLoginId() + .equals(other.getSiteLoginId()); + result = result && getNickName() + .equals(other.getNickName()); + result = result && getUsernameInLatin() + .equals(other.getUsernameInLatin()); + result = result && getUserIdPubk() + .equals(other.getUserIdPubk()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + USER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getUserName().hashCode(); + hash = (37 * hash) + USER_PHOTO_FIELD_NUMBER; + hash = (53 * hash) + getUserPhoto().hashCode(); + hash = (37 * hash) + SELF_INTRODUCE_FIELD_NUMBER; + hash = (53 * hash) + getSelfIntroduce().hashCode(); + hash = (37 * hash) + USER_STATUS_FIELD_NUMBER; + hash = (53 * hash) + userStatus_; + hash = (37 * hash) + REGISTER_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRegisterTime()); + hash = (37 * hash) + SITE_LOGIN_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteLoginId().hashCode(); + hash = (37 * hash) + NICK_NAME_FIELD_NUMBER; + hash = (53 * hash) + getNickName().hashCode(); + hash = (37 * hash) + USERNAME_IN_LATIN_FIELD_NUMBER; + hash = (53 * hash) + getUsernameInLatin().hashCode(); + hash = (37 * hash) + USER_ID_PUBK_FIELD_NUMBER; + hash = (53 * hash) + getUserIdPubk().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.UserProto.UserProfile parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.UserProto.UserProfile parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.UserProfile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.UserProto.UserProfile parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.UserProfile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.UserProto.UserProfile parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.UserProfile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.UserProto.UserProfile parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.UserProfile parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.UserProto.UserProfile parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.UserProfile parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.UserProto.UserProfile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.UserProto.UserProfile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *获取用户的详细信息
+     * 
+ * + * Protobuf type {@code core.UserProfile} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.UserProfile) + com.akaxin.proto.core.UserProto.UserProfileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.UserProto.internal_static_core_UserProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.UserProto.internal_static_core_UserProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.UserProto.UserProfile.class, com.akaxin.proto.core.UserProto.UserProfile.Builder.class); + } + + // Construct using com.akaxin.proto.core.UserProto.UserProfile.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + userName_ = ""; + + userPhoto_ = ""; + + selfIntroduce_ = ""; + + userStatus_ = 0; + + registerTime_ = 0L; + + siteLoginId_ = ""; + + nickName_ = ""; + + usernameInLatin_ = ""; + + userIdPubk_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.UserProto.internal_static_core_UserProfile_descriptor; + } + + public com.akaxin.proto.core.UserProto.UserProfile getDefaultInstanceForType() { + return com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance(); + } + + public com.akaxin.proto.core.UserProto.UserProfile build() { + com.akaxin.proto.core.UserProto.UserProfile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.UserProto.UserProfile buildPartial() { + com.akaxin.proto.core.UserProto.UserProfile result = new com.akaxin.proto.core.UserProto.UserProfile(this); + result.siteUserId_ = siteUserId_; + result.userName_ = userName_; + result.userPhoto_ = userPhoto_; + result.selfIntroduce_ = selfIntroduce_; + result.userStatus_ = userStatus_; + result.registerTime_ = registerTime_; + result.siteLoginId_ = siteLoginId_; + result.nickName_ = nickName_; + result.usernameInLatin_ = usernameInLatin_; + result.userIdPubk_ = userIdPubk_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.UserProto.UserProfile) { + return mergeFrom((com.akaxin.proto.core.UserProto.UserProfile)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.UserProto.UserProfile other) { + if (other == com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getUserName().isEmpty()) { + userName_ = other.userName_; + onChanged(); + } + if (!other.getUserPhoto().isEmpty()) { + userPhoto_ = other.userPhoto_; + onChanged(); + } + if (!other.getSelfIntroduce().isEmpty()) { + selfIntroduce_ = other.selfIntroduce_; + onChanged(); + } + if (other.userStatus_ != 0) { + setUserStatusValue(other.getUserStatusValue()); + } + if (other.getRegisterTime() != 0L) { + setRegisterTime(other.getRegisterTime()); + } + if (!other.getSiteLoginId().isEmpty()) { + siteLoginId_ = other.siteLoginId_; + onChanged(); + } + if (!other.getNickName().isEmpty()) { + nickName_ = other.nickName_; + onChanged(); + } + if (!other.getUsernameInLatin().isEmpty()) { + usernameInLatin_ = other.usernameInLatin_; + onChanged(); + } + if (!other.getUserIdPubk().isEmpty()) { + userIdPubk_ = other.userIdPubk_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.UserProto.UserProfile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.UserProto.UserProfile) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object userName_ = ""; + /** + *
+       *如果用户有备注,这里使用备注,如果没有使用昵称,修改个人profile昵称,直接把昵称复制这里
+       * 
+ * + * string user_name = 2; + */ + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *如果用户有备注,这里使用备注,如果没有使用昵称,修改个人profile昵称,直接把昵称复制这里
+       * 
+ * + * string user_name = 2; + */ + public com.google.protobuf.ByteString + getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *如果用户有备注,这里使用备注,如果没有使用昵称,修改个人profile昵称,直接把昵称复制这里
+       * 
+ * + * string user_name = 2; + */ + public Builder setUserName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userName_ = value; + onChanged(); + return this; + } + /** + *
+       *如果用户有备注,这里使用备注,如果没有使用昵称,修改个人profile昵称,直接把昵称复制这里
+       * 
+ * + * string user_name = 2; + */ + public Builder clearUserName() { + + userName_ = getDefaultInstance().getUserName(); + onChanged(); + return this; + } + /** + *
+       *如果用户有备注,这里使用备注,如果没有使用昵称,修改个人profile昵称,直接把昵称复制这里
+       * 
+ * + * string user_name = 2; + */ + public Builder setUserNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userName_ = value; + onChanged(); + return this; + } + + private java.lang.Object userPhoto_ = ""; + /** + * string user_photo = 3; + */ + public java.lang.String getUserPhoto() { + java.lang.Object ref = userPhoto_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPhoto_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string user_photo = 3; + */ + public com.google.protobuf.ByteString + getUserPhotoBytes() { + java.lang.Object ref = userPhoto_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userPhoto_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string user_photo = 3; + */ + public Builder setUserPhoto( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userPhoto_ = value; + onChanged(); + return this; + } + /** + * string user_photo = 3; + */ + public Builder clearUserPhoto() { + + userPhoto_ = getDefaultInstance().getUserPhoto(); + onChanged(); + return this; + } + /** + * string user_photo = 3; + */ + public Builder setUserPhotoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userPhoto_ = value; + onChanged(); + return this; + } + + private java.lang.Object selfIntroduce_ = ""; + /** + * string self_introduce = 4; + */ + public java.lang.String getSelfIntroduce() { + java.lang.Object ref = selfIntroduce_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selfIntroduce_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string self_introduce = 4; + */ + public com.google.protobuf.ByteString + getSelfIntroduceBytes() { + java.lang.Object ref = selfIntroduce_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + selfIntroduce_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string self_introduce = 4; + */ + public Builder setSelfIntroduce( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + selfIntroduce_ = value; + onChanged(); + return this; + } + /** + * string self_introduce = 4; + */ + public Builder clearSelfIntroduce() { + + selfIntroduce_ = getDefaultInstance().getSelfIntroduce(); + onChanged(); + return this; + } + /** + * string self_introduce = 4; + */ + public Builder setSelfIntroduceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + selfIntroduce_ = value; + onChanged(); + return this; + } + + private int userStatus_ = 0; + /** + * .core.UserStatus user_status = 5; + */ + public int getUserStatusValue() { + return userStatus_; + } + /** + * .core.UserStatus user_status = 5; + */ + public Builder setUserStatusValue(int value) { + userStatus_ = value; + onChanged(); + return this; + } + /** + * .core.UserStatus user_status = 5; + */ + public com.akaxin.proto.core.UserProto.UserStatus getUserStatus() { + com.akaxin.proto.core.UserProto.UserStatus result = com.akaxin.proto.core.UserProto.UserStatus.valueOf(userStatus_); + return result == null ? com.akaxin.proto.core.UserProto.UserStatus.UNRECOGNIZED : result; + } + /** + * .core.UserStatus user_status = 5; + */ + public Builder setUserStatus(com.akaxin.proto.core.UserProto.UserStatus value) { + if (value == null) { + throw new NullPointerException(); + } + + userStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .core.UserStatus user_status = 5; + */ + public Builder clearUserStatus() { + + userStatus_ = 0; + onChanged(); + return this; + } + + private long registerTime_ ; + /** + * int64 register_time = 6; + */ + public long getRegisterTime() { + return registerTime_; + } + /** + * int64 register_time = 6; + */ + public Builder setRegisterTime(long value) { + + registerTime_ = value; + onChanged(); + return this; + } + /** + * int64 register_time = 6; + */ + public Builder clearRegisterTime() { + + registerTime_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object siteLoginId_ = ""; + /** + *
+       *用户唯一登陆名,站点唯一(例如使用:“卡号”表示)
+       * 
+ * + * string site_login_id = 7; + */ + public java.lang.String getSiteLoginId() { + java.lang.Object ref = siteLoginId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteLoginId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户唯一登陆名,站点唯一(例如使用:“卡号”表示)
+       * 
+ * + * string site_login_id = 7; + */ + public com.google.protobuf.ByteString + getSiteLoginIdBytes() { + java.lang.Object ref = siteLoginId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteLoginId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户唯一登陆名,站点唯一(例如使用:“卡号”表示)
+       * 
+ * + * string site_login_id = 7; + */ + public Builder setSiteLoginId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteLoginId_ = value; + onChanged(); + return this; + } + /** + *
+       *用户唯一登陆名,站点唯一(例如使用:“卡号”表示)
+       * 
+ * + * string site_login_id = 7; + */ + public Builder clearSiteLoginId() { + + siteLoginId_ = getDefaultInstance().getSiteLoginId(); + onChanged(); + return this; + } + /** + *
+       *用户唯一登陆名,站点唯一(例如使用:“卡号”表示)
+       * 
+ * + * string site_login_id = 7; + */ + public Builder setSiteLoginIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteLoginId_ = value; + onChanged(); + return this; + } + + private java.lang.Object nickName_ = ""; + /** + *
+       *用户个人设置的昵称
+       * 
+ * + * string nick_name = 8; + */ + public java.lang.String getNickName() { + java.lang.Object ref = nickName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nickName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户个人设置的昵称
+       * 
+ * + * string nick_name = 8; + */ + public com.google.protobuf.ByteString + getNickNameBytes() { + java.lang.Object ref = nickName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nickName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户个人设置的昵称
+       * 
+ * + * string nick_name = 8; + */ + public Builder setNickName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nickName_ = value; + onChanged(); + return this; + } + /** + *
+       *用户个人设置的昵称
+       * 
+ * + * string nick_name = 8; + */ + public Builder clearNickName() { + + nickName_ = getDefaultInstance().getNickName(); + onChanged(); + return this; + } + /** + *
+       *用户个人设置的昵称
+       * 
+ * + * string nick_name = 8; + */ + public Builder setNickNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nickName_ = value; + onChanged(); + return this; + } + + private java.lang.Object usernameInLatin_ = ""; + /** + *
+       *汉字转换拼音
+       * 
+ * + * string username_in_latin = 9; + */ + public java.lang.String getUsernameInLatin() { + java.lang.Object ref = usernameInLatin_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + usernameInLatin_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *汉字转换拼音
+       * 
+ * + * string username_in_latin = 9; + */ + public com.google.protobuf.ByteString + getUsernameInLatinBytes() { + java.lang.Object ref = usernameInLatin_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + usernameInLatin_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *汉字转换拼音
+       * 
+ * + * string username_in_latin = 9; + */ + public Builder setUsernameInLatin( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + usernameInLatin_ = value; + onChanged(); + return this; + } + /** + *
+       *汉字转换拼音
+       * 
+ * + * string username_in_latin = 9; + */ + public Builder clearUsernameInLatin() { + + usernameInLatin_ = getDefaultInstance().getUsernameInLatin(); + onChanged(); + return this; + } + /** + *
+       *汉字转换拼音
+       * 
+ * + * string username_in_latin = 9; + */ + public Builder setUsernameInLatinBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + usernameInLatin_ = value; + onChanged(); + return this; + } + + private java.lang.Object userIdPubk_ = ""; + /** + *
+       *用户公钥 SimpleUserProfile 不需要
+       * 
+ * + * string user_id_pubk = 10; + */ + public java.lang.String getUserIdPubk() { + java.lang.Object ref = userIdPubk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPubk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户公钥 SimpleUserProfile 不需要
+       * 
+ * + * string user_id_pubk = 10; + */ + public com.google.protobuf.ByteString + getUserIdPubkBytes() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户公钥 SimpleUserProfile 不需要
+       * 
+ * + * string user_id_pubk = 10; + */ + public Builder setUserIdPubk( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userIdPubk_ = value; + onChanged(); + return this; + } + /** + *
+       *用户公钥 SimpleUserProfile 不需要
+       * 
+ * + * string user_id_pubk = 10; + */ + public Builder clearUserIdPubk() { + + userIdPubk_ = getDefaultInstance().getUserIdPubk(); + onChanged(); + return this; + } + /** + *
+       *用户公钥 SimpleUserProfile 不需要
+       * 
+ * + * string user_id_pubk = 10; + */ + public Builder setUserIdPubkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userIdPubk_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.UserProfile) + } + + // @@protoc_insertion_point(class_scope:core.UserProfile) + private static final com.akaxin.proto.core.UserProto.UserProfile DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.UserProto.UserProfile(); + } + + public static com.akaxin.proto.core.UserProto.UserProfile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public UserProfile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UserProfile(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.UserProto.UserProfile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SimpleUserProfileOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.SimpleUserProfile) + com.google.protobuf.MessageOrBuilder { + + /** + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *如果用户有备注,这里使用备注,如果没有使用昵称
+     * 
+ * + * string user_name = 2; + */ + java.lang.String getUserName(); + /** + *
+     *如果用户有备注,这里使用备注,如果没有使用昵称
+     * 
+ * + * string user_name = 2; + */ + com.google.protobuf.ByteString + getUserNameBytes(); + + /** + * string user_photo = 3; + */ + java.lang.String getUserPhoto(); + /** + * string user_photo = 3; + */ + com.google.protobuf.ByteString + getUserPhotoBytes(); + + /** + * .core.UserStatus user_status = 4; + */ + int getUserStatusValue(); + /** + * .core.UserStatus user_status = 4; + */ + com.akaxin.proto.core.UserProto.UserStatus getUserStatus(); + + /** + *
+     *用户唯一登陆名,站点唯一
+     * 
+ * + * string site_login_id = 5; + */ + java.lang.String getSiteLoginId(); + /** + *
+     *用户唯一登陆名,站点唯一
+     * 
+ * + * string site_login_id = 5; + */ + com.google.protobuf.ByteString + getSiteLoginIdBytes(); + + /** + *
+     *用户个人设置的昵称
+     * 
+ * + * string nick_name = 6; + */ + java.lang.String getNickName(); + /** + *
+     *用户个人设置的昵称
+     * 
+ * + * string nick_name = 6; + */ + com.google.protobuf.ByteString + getNickNameBytes(); + + /** + *
+     *张三->  zhangsan
+     * 
+ * + * string username_in_latin = 7; + */ + java.lang.String getUsernameInLatin(); + /** + *
+     *张三->  zhangsan
+     * 
+ * + * string username_in_latin = 7; + */ + com.google.protobuf.ByteString + getUsernameInLatinBytes(); + } + /** + *
+   *获取用户的简单信息,一般用户展示列表等,例如用户好友列表
+   * 
+ * + * Protobuf type {@code core.SimpleUserProfile} + */ + public static final class SimpleUserProfile extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.SimpleUserProfile) + SimpleUserProfileOrBuilder { + private static final long serialVersionUID = 0L; + // Use SimpleUserProfile.newBuilder() to construct. + private SimpleUserProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SimpleUserProfile() { + siteUserId_ = ""; + userName_ = ""; + userPhoto_ = ""; + userStatus_ = 0; + siteLoginId_ = ""; + nickName_ = ""; + usernameInLatin_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SimpleUserProfile( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + userName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + userPhoto_ = s; + break; + } + case 32: { + int rawValue = input.readEnum(); + + userStatus_ = rawValue; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + siteLoginId_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + nickName_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + usernameInLatin_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.UserProto.internal_static_core_SimpleUserProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.UserProto.internal_static_core_SimpleUserProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.UserProto.SimpleUserProfile.class, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object userName_; + /** + *
+     *如果用户有备注,这里使用备注,如果没有使用昵称
+     * 
+ * + * string user_name = 2; + */ + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } + } + /** + *
+     *如果用户有备注,这里使用备注,如果没有使用昵称
+     * 
+ * + * string user_name = 2; + */ + public com.google.protobuf.ByteString + getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_PHOTO_FIELD_NUMBER = 3; + private volatile java.lang.Object userPhoto_; + /** + * string user_photo = 3; + */ + public java.lang.String getUserPhoto() { + java.lang.Object ref = userPhoto_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPhoto_ = s; + return s; + } + } + /** + * string user_photo = 3; + */ + public com.google.protobuf.ByteString + getUserPhotoBytes() { + java.lang.Object ref = userPhoto_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userPhoto_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_STATUS_FIELD_NUMBER = 4; + private int userStatus_; + /** + * .core.UserStatus user_status = 4; + */ + public int getUserStatusValue() { + return userStatus_; + } + /** + * .core.UserStatus user_status = 4; + */ + public com.akaxin.proto.core.UserProto.UserStatus getUserStatus() { + com.akaxin.proto.core.UserProto.UserStatus result = com.akaxin.proto.core.UserProto.UserStatus.valueOf(userStatus_); + return result == null ? com.akaxin.proto.core.UserProto.UserStatus.UNRECOGNIZED : result; + } + + public static final int SITE_LOGIN_ID_FIELD_NUMBER = 5; + private volatile java.lang.Object siteLoginId_; + /** + *
+     *用户唯一登陆名,站点唯一
+     * 
+ * + * string site_login_id = 5; + */ + public java.lang.String getSiteLoginId() { + java.lang.Object ref = siteLoginId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteLoginId_ = s; + return s; + } + } + /** + *
+     *用户唯一登陆名,站点唯一
+     * 
+ * + * string site_login_id = 5; + */ + public com.google.protobuf.ByteString + getSiteLoginIdBytes() { + java.lang.Object ref = siteLoginId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteLoginId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NICK_NAME_FIELD_NUMBER = 6; + private volatile java.lang.Object nickName_; + /** + *
+     *用户个人设置的昵称
+     * 
+ * + * string nick_name = 6; + */ + public java.lang.String getNickName() { + java.lang.Object ref = nickName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nickName_ = s; + return s; + } + } + /** + *
+     *用户个人设置的昵称
+     * 
+ * + * string nick_name = 6; + */ + public com.google.protobuf.ByteString + getNickNameBytes() { + java.lang.Object ref = nickName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nickName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERNAME_IN_LATIN_FIELD_NUMBER = 7; + private volatile java.lang.Object usernameInLatin_; + /** + *
+     *张三->  zhangsan
+     * 
+ * + * string username_in_latin = 7; + */ + public java.lang.String getUsernameInLatin() { + java.lang.Object ref = usernameInLatin_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + usernameInLatin_ = s; + return s; + } + } + /** + *
+     *张三->  zhangsan
+     * 
+ * + * string username_in_latin = 7; + */ + public com.google.protobuf.ByteString + getUsernameInLatinBytes() { + java.lang.Object ref = usernameInLatin_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + usernameInLatin_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + if (!getUserNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userName_); + } + if (!getUserPhotoBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userPhoto_); + } + if (userStatus_ != com.akaxin.proto.core.UserProto.UserStatus.NORMAL.getNumber()) { + output.writeEnum(4, userStatus_); + } + if (!getSiteLoginIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, siteLoginId_); + } + if (!getNickNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, nickName_); + } + if (!getUsernameInLatinBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, usernameInLatin_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + if (!getUserNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, userName_); + } + if (!getUserPhotoBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userPhoto_); + } + if (userStatus_ != com.akaxin.proto.core.UserProto.UserStatus.NORMAL.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, userStatus_); + } + if (!getSiteLoginIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, siteLoginId_); + } + if (!getNickNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, nickName_); + } + if (!getUsernameInLatinBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, usernameInLatin_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.UserProto.SimpleUserProfile)) { + return super.equals(obj); + } + com.akaxin.proto.core.UserProto.SimpleUserProfile other = (com.akaxin.proto.core.UserProto.SimpleUserProfile) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getUserName() + .equals(other.getUserName()); + result = result && getUserPhoto() + .equals(other.getUserPhoto()); + result = result && userStatus_ == other.userStatus_; + result = result && getSiteLoginId() + .equals(other.getSiteLoginId()); + result = result && getNickName() + .equals(other.getNickName()); + result = result && getUsernameInLatin() + .equals(other.getUsernameInLatin()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + USER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getUserName().hashCode(); + hash = (37 * hash) + USER_PHOTO_FIELD_NUMBER; + hash = (53 * hash) + getUserPhoto().hashCode(); + hash = (37 * hash) + USER_STATUS_FIELD_NUMBER; + hash = (53 * hash) + userStatus_; + hash = (37 * hash) + SITE_LOGIN_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteLoginId().hashCode(); + hash = (37 * hash) + NICK_NAME_FIELD_NUMBER; + hash = (53 * hash) + getNickName().hashCode(); + hash = (37 * hash) + USERNAME_IN_LATIN_FIELD_NUMBER; + hash = (53 * hash) + getUsernameInLatin().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.UserProto.SimpleUserProfile parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.UserProto.SimpleUserProfile parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.SimpleUserProfile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.UserProto.SimpleUserProfile parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.SimpleUserProfile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.UserProto.SimpleUserProfile parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.SimpleUserProfile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.UserProto.SimpleUserProfile parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.SimpleUserProfile parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.UserProto.SimpleUserProfile parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.SimpleUserProfile parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.UserProto.SimpleUserProfile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.UserProto.SimpleUserProfile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *获取用户的简单信息,一般用户展示列表等,例如用户好友列表
+     * 
+ * + * Protobuf type {@code core.SimpleUserProfile} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.SimpleUserProfile) + com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.UserProto.internal_static_core_SimpleUserProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.UserProto.internal_static_core_SimpleUserProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.UserProto.SimpleUserProfile.class, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder.class); + } + + // Construct using com.akaxin.proto.core.UserProto.SimpleUserProfile.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + userName_ = ""; + + userPhoto_ = ""; + + userStatus_ = 0; + + siteLoginId_ = ""; + + nickName_ = ""; + + usernameInLatin_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.UserProto.internal_static_core_SimpleUserProfile_descriptor; + } + + public com.akaxin.proto.core.UserProto.SimpleUserProfile getDefaultInstanceForType() { + return com.akaxin.proto.core.UserProto.SimpleUserProfile.getDefaultInstance(); + } + + public com.akaxin.proto.core.UserProto.SimpleUserProfile build() { + com.akaxin.proto.core.UserProto.SimpleUserProfile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.UserProto.SimpleUserProfile buildPartial() { + com.akaxin.proto.core.UserProto.SimpleUserProfile result = new com.akaxin.proto.core.UserProto.SimpleUserProfile(this); + result.siteUserId_ = siteUserId_; + result.userName_ = userName_; + result.userPhoto_ = userPhoto_; + result.userStatus_ = userStatus_; + result.siteLoginId_ = siteLoginId_; + result.nickName_ = nickName_; + result.usernameInLatin_ = usernameInLatin_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.UserProto.SimpleUserProfile) { + return mergeFrom((com.akaxin.proto.core.UserProto.SimpleUserProfile)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.UserProto.SimpleUserProfile other) { + if (other == com.akaxin.proto.core.UserProto.SimpleUserProfile.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getUserName().isEmpty()) { + userName_ = other.userName_; + onChanged(); + } + if (!other.getUserPhoto().isEmpty()) { + userPhoto_ = other.userPhoto_; + onChanged(); + } + if (other.userStatus_ != 0) { + setUserStatusValue(other.getUserStatusValue()); + } + if (!other.getSiteLoginId().isEmpty()) { + siteLoginId_ = other.siteLoginId_; + onChanged(); + } + if (!other.getNickName().isEmpty()) { + nickName_ = other.nickName_; + onChanged(); + } + if (!other.getUsernameInLatin().isEmpty()) { + usernameInLatin_ = other.usernameInLatin_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.UserProto.SimpleUserProfile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.UserProto.SimpleUserProfile) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object userName_ = ""; + /** + *
+       *如果用户有备注,这里使用备注,如果没有使用昵称
+       * 
+ * + * string user_name = 2; + */ + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *如果用户有备注,这里使用备注,如果没有使用昵称
+       * 
+ * + * string user_name = 2; + */ + public com.google.protobuf.ByteString + getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *如果用户有备注,这里使用备注,如果没有使用昵称
+       * 
+ * + * string user_name = 2; + */ + public Builder setUserName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userName_ = value; + onChanged(); + return this; + } + /** + *
+       *如果用户有备注,这里使用备注,如果没有使用昵称
+       * 
+ * + * string user_name = 2; + */ + public Builder clearUserName() { + + userName_ = getDefaultInstance().getUserName(); + onChanged(); + return this; + } + /** + *
+       *如果用户有备注,这里使用备注,如果没有使用昵称
+       * 
+ * + * string user_name = 2; + */ + public Builder setUserNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userName_ = value; + onChanged(); + return this; + } + + private java.lang.Object userPhoto_ = ""; + /** + * string user_photo = 3; + */ + public java.lang.String getUserPhoto() { + java.lang.Object ref = userPhoto_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPhoto_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string user_photo = 3; + */ + public com.google.protobuf.ByteString + getUserPhotoBytes() { + java.lang.Object ref = userPhoto_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userPhoto_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string user_photo = 3; + */ + public Builder setUserPhoto( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userPhoto_ = value; + onChanged(); + return this; + } + /** + * string user_photo = 3; + */ + public Builder clearUserPhoto() { + + userPhoto_ = getDefaultInstance().getUserPhoto(); + onChanged(); + return this; + } + /** + * string user_photo = 3; + */ + public Builder setUserPhotoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userPhoto_ = value; + onChanged(); + return this; + } + + private int userStatus_ = 0; + /** + * .core.UserStatus user_status = 4; + */ + public int getUserStatusValue() { + return userStatus_; + } + /** + * .core.UserStatus user_status = 4; + */ + public Builder setUserStatusValue(int value) { + userStatus_ = value; + onChanged(); + return this; + } + /** + * .core.UserStatus user_status = 4; + */ + public com.akaxin.proto.core.UserProto.UserStatus getUserStatus() { + com.akaxin.proto.core.UserProto.UserStatus result = com.akaxin.proto.core.UserProto.UserStatus.valueOf(userStatus_); + return result == null ? com.akaxin.proto.core.UserProto.UserStatus.UNRECOGNIZED : result; + } + /** + * .core.UserStatus user_status = 4; + */ + public Builder setUserStatus(com.akaxin.proto.core.UserProto.UserStatus value) { + if (value == null) { + throw new NullPointerException(); + } + + userStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .core.UserStatus user_status = 4; + */ + public Builder clearUserStatus() { + + userStatus_ = 0; + onChanged(); + return this; + } + + private java.lang.Object siteLoginId_ = ""; + /** + *
+       *用户唯一登陆名,站点唯一
+       * 
+ * + * string site_login_id = 5; + */ + public java.lang.String getSiteLoginId() { + java.lang.Object ref = siteLoginId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteLoginId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户唯一登陆名,站点唯一
+       * 
+ * + * string site_login_id = 5; + */ + public com.google.protobuf.ByteString + getSiteLoginIdBytes() { + java.lang.Object ref = siteLoginId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteLoginId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户唯一登陆名,站点唯一
+       * 
+ * + * string site_login_id = 5; + */ + public Builder setSiteLoginId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteLoginId_ = value; + onChanged(); + return this; + } + /** + *
+       *用户唯一登陆名,站点唯一
+       * 
+ * + * string site_login_id = 5; + */ + public Builder clearSiteLoginId() { + + siteLoginId_ = getDefaultInstance().getSiteLoginId(); + onChanged(); + return this; + } + /** + *
+       *用户唯一登陆名,站点唯一
+       * 
+ * + * string site_login_id = 5; + */ + public Builder setSiteLoginIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteLoginId_ = value; + onChanged(); + return this; + } + + private java.lang.Object nickName_ = ""; + /** + *
+       *用户个人设置的昵称
+       * 
+ * + * string nick_name = 6; + */ + public java.lang.String getNickName() { + java.lang.Object ref = nickName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nickName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户个人设置的昵称
+       * 
+ * + * string nick_name = 6; + */ + public com.google.protobuf.ByteString + getNickNameBytes() { + java.lang.Object ref = nickName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nickName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户个人设置的昵称
+       * 
+ * + * string nick_name = 6; + */ + public Builder setNickName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nickName_ = value; + onChanged(); + return this; + } + /** + *
+       *用户个人设置的昵称
+       * 
+ * + * string nick_name = 6; + */ + public Builder clearNickName() { + + nickName_ = getDefaultInstance().getNickName(); + onChanged(); + return this; + } + /** + *
+       *用户个人设置的昵称
+       * 
+ * + * string nick_name = 6; + */ + public Builder setNickNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nickName_ = value; + onChanged(); + return this; + } + + private java.lang.Object usernameInLatin_ = ""; + /** + *
+       *张三->  zhangsan
+       * 
+ * + * string username_in_latin = 7; + */ + public java.lang.String getUsernameInLatin() { + java.lang.Object ref = usernameInLatin_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + usernameInLatin_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *张三->  zhangsan
+       * 
+ * + * string username_in_latin = 7; + */ + public com.google.protobuf.ByteString + getUsernameInLatinBytes() { + java.lang.Object ref = usernameInLatin_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + usernameInLatin_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *张三->  zhangsan
+       * 
+ * + * string username_in_latin = 7; + */ + public Builder setUsernameInLatin( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + usernameInLatin_ = value; + onChanged(); + return this; + } + /** + *
+       *张三->  zhangsan
+       * 
+ * + * string username_in_latin = 7; + */ + public Builder clearUsernameInLatin() { + + usernameInLatin_ = getDefaultInstance().getUsernameInLatin(); + onChanged(); + return this; + } + /** + *
+       *张三->  zhangsan
+       * 
+ * + * string username_in_latin = 7; + */ + public Builder setUsernameInLatinBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + usernameInLatin_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.SimpleUserProfile) + } + + // @@protoc_insertion_point(class_scope:core.SimpleUserProfile) + private static final com.akaxin.proto.core.UserProto.SimpleUserProfile DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.UserProto.SimpleUserProfile(); + } + + public static com.akaxin.proto.core.UserProto.SimpleUserProfile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public SimpleUserProfile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SimpleUserProfile(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.UserProto.SimpleUserProfile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApplyUserProfileOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.ApplyUserProfile) + com.google.protobuf.MessageOrBuilder { + + /** + * .core.UserProfile applyUser = 1; + */ + boolean hasApplyUser(); + /** + * .core.UserProfile applyUser = 1; + */ + com.akaxin.proto.core.UserProto.UserProfile getApplyUser(); + /** + * .core.UserProfile applyUser = 1; + */ + com.akaxin.proto.core.UserProto.UserProfileOrBuilder getApplyUserOrBuilder(); + + /** + * string applyReason = 2; + */ + java.lang.String getApplyReason(); + /** + * string applyReason = 2; + */ + com.google.protobuf.ByteString + getApplyReasonBytes(); + } + /** + * Protobuf type {@code core.ApplyUserProfile} + */ + public static final class ApplyUserProfile extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.ApplyUserProfile) + ApplyUserProfileOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApplyUserProfile.newBuilder() to construct. + private ApplyUserProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApplyUserProfile() { + applyReason_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApplyUserProfile( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.UserProto.UserProfile.Builder subBuilder = null; + if (applyUser_ != null) { + subBuilder = applyUser_.toBuilder(); + } + applyUser_ = input.readMessage(com.akaxin.proto.core.UserProto.UserProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(applyUser_); + applyUser_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + applyReason_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.UserProto.internal_static_core_ApplyUserProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.UserProto.internal_static_core_ApplyUserProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.UserProto.ApplyUserProfile.class, com.akaxin.proto.core.UserProto.ApplyUserProfile.Builder.class); + } + + public static final int APPLYUSER_FIELD_NUMBER = 1; + private com.akaxin.proto.core.UserProto.UserProfile applyUser_; + /** + * .core.UserProfile applyUser = 1; + */ + public boolean hasApplyUser() { + return applyUser_ != null; + } + /** + * .core.UserProfile applyUser = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile getApplyUser() { + return applyUser_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : applyUser_; + } + /** + * .core.UserProfile applyUser = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getApplyUserOrBuilder() { + return getApplyUser(); + } + + public static final int APPLYREASON_FIELD_NUMBER = 2; + private volatile java.lang.Object applyReason_; + /** + * string applyReason = 2; + */ + public java.lang.String getApplyReason() { + java.lang.Object ref = applyReason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applyReason_ = s; + return s; + } + } + /** + * string applyReason = 2; + */ + public com.google.protobuf.ByteString + getApplyReasonBytes() { + java.lang.Object ref = applyReason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + applyReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (applyUser_ != null) { + output.writeMessage(1, getApplyUser()); + } + if (!getApplyReasonBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, applyReason_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (applyUser_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getApplyUser()); + } + if (!getApplyReasonBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, applyReason_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.UserProto.ApplyUserProfile)) { + return super.equals(obj); + } + com.akaxin.proto.core.UserProto.ApplyUserProfile other = (com.akaxin.proto.core.UserProto.ApplyUserProfile) obj; + + boolean result = true; + result = result && (hasApplyUser() == other.hasApplyUser()); + if (hasApplyUser()) { + result = result && getApplyUser() + .equals(other.getApplyUser()); + } + result = result && getApplyReason() + .equals(other.getApplyReason()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasApplyUser()) { + hash = (37 * hash) + APPLYUSER_FIELD_NUMBER; + hash = (53 * hash) + getApplyUser().hashCode(); + } + hash = (37 * hash) + APPLYREASON_FIELD_NUMBER; + hash = (53 * hash) + getApplyReason().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.UserProto.ApplyUserProfile parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.UserProto.ApplyUserProfile parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.ApplyUserProfile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.UserProto.ApplyUserProfile parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.ApplyUserProfile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.UserProto.ApplyUserProfile parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.ApplyUserProfile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.UserProto.ApplyUserProfile parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.ApplyUserProfile parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.UserProto.ApplyUserProfile parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.ApplyUserProfile parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.UserProto.ApplyUserProfile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.UserProto.ApplyUserProfile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code core.ApplyUserProfile} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.ApplyUserProfile) + com.akaxin.proto.core.UserProto.ApplyUserProfileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.UserProto.internal_static_core_ApplyUserProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.UserProto.internal_static_core_ApplyUserProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.UserProto.ApplyUserProfile.class, com.akaxin.proto.core.UserProto.ApplyUserProfile.Builder.class); + } + + // Construct using com.akaxin.proto.core.UserProto.ApplyUserProfile.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (applyUserBuilder_ == null) { + applyUser_ = null; + } else { + applyUser_ = null; + applyUserBuilder_ = null; + } + applyReason_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.UserProto.internal_static_core_ApplyUserProfile_descriptor; + } + + public com.akaxin.proto.core.UserProto.ApplyUserProfile getDefaultInstanceForType() { + return com.akaxin.proto.core.UserProto.ApplyUserProfile.getDefaultInstance(); + } + + public com.akaxin.proto.core.UserProto.ApplyUserProfile build() { + com.akaxin.proto.core.UserProto.ApplyUserProfile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.UserProto.ApplyUserProfile buildPartial() { + com.akaxin.proto.core.UserProto.ApplyUserProfile result = new com.akaxin.proto.core.UserProto.ApplyUserProfile(this); + if (applyUserBuilder_ == null) { + result.applyUser_ = applyUser_; + } else { + result.applyUser_ = applyUserBuilder_.build(); + } + result.applyReason_ = applyReason_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.UserProto.ApplyUserProfile) { + return mergeFrom((com.akaxin.proto.core.UserProto.ApplyUserProfile)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.UserProto.ApplyUserProfile other) { + if (other == com.akaxin.proto.core.UserProto.ApplyUserProfile.getDefaultInstance()) return this; + if (other.hasApplyUser()) { + mergeApplyUser(other.getApplyUser()); + } + if (!other.getApplyReason().isEmpty()) { + applyReason_ = other.applyReason_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.UserProto.ApplyUserProfile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.UserProto.ApplyUserProfile) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.core.UserProto.UserProfile applyUser_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> applyUserBuilder_; + /** + * .core.UserProfile applyUser = 1; + */ + public boolean hasApplyUser() { + return applyUserBuilder_ != null || applyUser_ != null; + } + /** + * .core.UserProfile applyUser = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile getApplyUser() { + if (applyUserBuilder_ == null) { + return applyUser_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : applyUser_; + } else { + return applyUserBuilder_.getMessage(); + } + } + /** + * .core.UserProfile applyUser = 1; + */ + public Builder setApplyUser(com.akaxin.proto.core.UserProto.UserProfile value) { + if (applyUserBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + applyUser_ = value; + onChanged(); + } else { + applyUserBuilder_.setMessage(value); + } + + return this; + } + /** + * .core.UserProfile applyUser = 1; + */ + public Builder setApplyUser( + com.akaxin.proto.core.UserProto.UserProfile.Builder builderForValue) { + if (applyUserBuilder_ == null) { + applyUser_ = builderForValue.build(); + onChanged(); + } else { + applyUserBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .core.UserProfile applyUser = 1; + */ + public Builder mergeApplyUser(com.akaxin.proto.core.UserProto.UserProfile value) { + if (applyUserBuilder_ == null) { + if (applyUser_ != null) { + applyUser_ = + com.akaxin.proto.core.UserProto.UserProfile.newBuilder(applyUser_).mergeFrom(value).buildPartial(); + } else { + applyUser_ = value; + } + onChanged(); + } else { + applyUserBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .core.UserProfile applyUser = 1; + */ + public Builder clearApplyUser() { + if (applyUserBuilder_ == null) { + applyUser_ = null; + onChanged(); + } else { + applyUser_ = null; + applyUserBuilder_ = null; + } + + return this; + } + /** + * .core.UserProfile applyUser = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile.Builder getApplyUserBuilder() { + + onChanged(); + return getApplyUserFieldBuilder().getBuilder(); + } + /** + * .core.UserProfile applyUser = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getApplyUserOrBuilder() { + if (applyUserBuilder_ != null) { + return applyUserBuilder_.getMessageOrBuilder(); + } else { + return applyUser_ == null ? + com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : applyUser_; + } + } + /** + * .core.UserProfile applyUser = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> + getApplyUserFieldBuilder() { + if (applyUserBuilder_ == null) { + applyUserBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder>( + getApplyUser(), + getParentForChildren(), + isClean()); + applyUser_ = null; + } + return applyUserBuilder_; + } + + private java.lang.Object applyReason_ = ""; + /** + * string applyReason = 2; + */ + public java.lang.String getApplyReason() { + java.lang.Object ref = applyReason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applyReason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string applyReason = 2; + */ + public com.google.protobuf.ByteString + getApplyReasonBytes() { + java.lang.Object ref = applyReason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + applyReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string applyReason = 2; + */ + public Builder setApplyReason( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + applyReason_ = value; + onChanged(); + return this; + } + /** + * string applyReason = 2; + */ + public Builder clearApplyReason() { + + applyReason_ = getDefaultInstance().getApplyReason(); + onChanged(); + return this; + } + /** + * string applyReason = 2; + */ + public Builder setApplyReasonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + applyReason_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.ApplyUserProfile) + } + + // @@protoc_insertion_point(class_scope:core.ApplyUserProfile) + private static final com.akaxin.proto.core.UserProto.ApplyUserProfile DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.UserProto.ApplyUserProfile(); + } + + public static com.akaxin.proto.core.UserProto.ApplyUserProfile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApplyUserProfile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApplyUserProfile(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.UserProto.ApplyUserProfile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UserRelationProfileOrBuilder extends + // @@protoc_insertion_point(interface_extends:core.UserRelationProfile) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户的个人资料
+     * 
+ * + * .core.SimpleUserProfile profile = 1; + */ + boolean hasProfile(); + /** + *
+     *用户的个人资料
+     * 
+ * + * .core.SimpleUserProfile profile = 1; + */ + com.akaxin.proto.core.UserProto.SimpleUserProfile getProfile(); + /** + *
+     *用户的个人资料
+     * 
+ * + * .core.SimpleUserProfile profile = 1; + */ + com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder getProfileOrBuilder(); + + /** + *
+     *用户A与B的关系
+     * 
+ * + * .core.UserRelation relation = 2; + */ + int getRelationValue(); + /** + *
+     *用户A与B的关系
+     * 
+ * + * .core.UserRelation relation = 2; + */ + com.akaxin.proto.core.UserProto.UserRelation getRelation(); + } + /** + * Protobuf type {@code core.UserRelationProfile} + */ + public static final class UserRelationProfile extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:core.UserRelationProfile) + UserRelationProfileOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserRelationProfile.newBuilder() to construct. + private UserRelationProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UserRelationProfile() { + relation_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UserRelationProfile( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder subBuilder = null; + if (profile_ != null) { + subBuilder = profile_.toBuilder(); + } + profile_ = input.readMessage(com.akaxin.proto.core.UserProto.SimpleUserProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(profile_); + profile_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + int rawValue = input.readEnum(); + + relation_ = rawValue; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.UserProto.internal_static_core_UserRelationProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.UserProto.internal_static_core_UserRelationProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.UserProto.UserRelationProfile.class, com.akaxin.proto.core.UserProto.UserRelationProfile.Builder.class); + } + + public static final int PROFILE_FIELD_NUMBER = 1; + private com.akaxin.proto.core.UserProto.SimpleUserProfile profile_; + /** + *
+     *用户的个人资料
+     * 
+ * + * .core.SimpleUserProfile profile = 1; + */ + public boolean hasProfile() { + return profile_ != null; + } + /** + *
+     *用户的个人资料
+     * 
+ * + * .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile getProfile() { + return profile_ == null ? com.akaxin.proto.core.UserProto.SimpleUserProfile.getDefaultInstance() : profile_; + } + /** + *
+     *用户的个人资料
+     * 
+ * + * .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder getProfileOrBuilder() { + return getProfile(); + } + + public static final int RELATION_FIELD_NUMBER = 2; + private int relation_; + /** + *
+     *用户A与B的关系
+     * 
+ * + * .core.UserRelation relation = 2; + */ + public int getRelationValue() { + return relation_; + } + /** + *
+     *用户A与B的关系
+     * 
+ * + * .core.UserRelation relation = 2; + */ + public com.akaxin.proto.core.UserProto.UserRelation getRelation() { + com.akaxin.proto.core.UserProto.UserRelation result = com.akaxin.proto.core.UserProto.UserRelation.valueOf(relation_); + return result == null ? com.akaxin.proto.core.UserProto.UserRelation.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (profile_ != null) { + output.writeMessage(1, getProfile()); + } + if (relation_ != com.akaxin.proto.core.UserProto.UserRelation.RELATION_NONE.getNumber()) { + output.writeEnum(2, relation_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (profile_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProfile()); + } + if (relation_ != com.akaxin.proto.core.UserProto.UserRelation.RELATION_NONE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, relation_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.core.UserProto.UserRelationProfile)) { + return super.equals(obj); + } + com.akaxin.proto.core.UserProto.UserRelationProfile other = (com.akaxin.proto.core.UserProto.UserRelationProfile) obj; + + boolean result = true; + result = result && (hasProfile() == other.hasProfile()); + if (hasProfile()) { + result = result && getProfile() + .equals(other.getProfile()); + } + result = result && relation_ == other.relation_; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProfile()) { + hash = (37 * hash) + PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getProfile().hashCode(); + } + hash = (37 * hash) + RELATION_FIELD_NUMBER; + hash = (53 * hash) + relation_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.core.UserProto.UserRelationProfile parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.UserProto.UserRelationProfile parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.UserRelationProfile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.UserProto.UserRelationProfile parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.UserRelationProfile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.core.UserProto.UserRelationProfile parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.UserRelationProfile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.UserProto.UserRelationProfile parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.UserRelationProfile parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.UserProto.UserRelationProfile parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.core.UserProto.UserRelationProfile parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.core.UserProto.UserRelationProfile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.core.UserProto.UserRelationProfile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code core.UserRelationProfile} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:core.UserRelationProfile) + com.akaxin.proto.core.UserProto.UserRelationProfileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.core.UserProto.internal_static_core_UserRelationProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.core.UserProto.internal_static_core_UserRelationProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.core.UserProto.UserRelationProfile.class, com.akaxin.proto.core.UserProto.UserRelationProfile.Builder.class); + } + + // Construct using com.akaxin.proto.core.UserProto.UserRelationProfile.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (profileBuilder_ == null) { + profile_ = null; + } else { + profile_ = null; + profileBuilder_ = null; + } + relation_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.core.UserProto.internal_static_core_UserRelationProfile_descriptor; + } + + public com.akaxin.proto.core.UserProto.UserRelationProfile getDefaultInstanceForType() { + return com.akaxin.proto.core.UserProto.UserRelationProfile.getDefaultInstance(); + } + + public com.akaxin.proto.core.UserProto.UserRelationProfile build() { + com.akaxin.proto.core.UserProto.UserRelationProfile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.core.UserProto.UserRelationProfile buildPartial() { + com.akaxin.proto.core.UserProto.UserRelationProfile result = new com.akaxin.proto.core.UserProto.UserRelationProfile(this); + if (profileBuilder_ == null) { + result.profile_ = profile_; + } else { + result.profile_ = profileBuilder_.build(); + } + result.relation_ = relation_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.core.UserProto.UserRelationProfile) { + return mergeFrom((com.akaxin.proto.core.UserProto.UserRelationProfile)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.core.UserProto.UserRelationProfile other) { + if (other == com.akaxin.proto.core.UserProto.UserRelationProfile.getDefaultInstance()) return this; + if (other.hasProfile()) { + mergeProfile(other.getProfile()); + } + if (other.relation_ != 0) { + setRelationValue(other.getRelationValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.core.UserProto.UserRelationProfile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.core.UserProto.UserRelationProfile) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.core.UserProto.SimpleUserProfile profile_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.SimpleUserProfile, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder, com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder> profileBuilder_; + /** + *
+       *用户的个人资料
+       * 
+ * + * .core.SimpleUserProfile profile = 1; + */ + public boolean hasProfile() { + return profileBuilder_ != null || profile_ != null; + } + /** + *
+       *用户的个人资料
+       * 
+ * + * .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile getProfile() { + if (profileBuilder_ == null) { + return profile_ == null ? com.akaxin.proto.core.UserProto.SimpleUserProfile.getDefaultInstance() : profile_; + } else { + return profileBuilder_.getMessage(); + } + } + /** + *
+       *用户的个人资料
+       * 
+ * + * .core.SimpleUserProfile profile = 1; + */ + public Builder setProfile(com.akaxin.proto.core.UserProto.SimpleUserProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profile_ = value; + onChanged(); + } else { + profileBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *用户的个人资料
+       * 
+ * + * .core.SimpleUserProfile profile = 1; + */ + public Builder setProfile( + com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + profile_ = builderForValue.build(); + onChanged(); + } else { + profileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *用户的个人资料
+       * 
+ * + * .core.SimpleUserProfile profile = 1; + */ + public Builder mergeProfile(com.akaxin.proto.core.UserProto.SimpleUserProfile value) { + if (profileBuilder_ == null) { + if (profile_ != null) { + profile_ = + com.akaxin.proto.core.UserProto.SimpleUserProfile.newBuilder(profile_).mergeFrom(value).buildPartial(); + } else { + profile_ = value; + } + onChanged(); + } else { + profileBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *用户的个人资料
+       * 
+ * + * .core.SimpleUserProfile profile = 1; + */ + public Builder clearProfile() { + if (profileBuilder_ == null) { + profile_ = null; + onChanged(); + } else { + profile_ = null; + profileBuilder_ = null; + } + + return this; + } + /** + *
+       *用户的个人资料
+       * 
+ * + * .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder getProfileBuilder() { + + onChanged(); + return getProfileFieldBuilder().getBuilder(); + } + /** + *
+       *用户的个人资料
+       * 
+ * + * .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder getProfileOrBuilder() { + if (profileBuilder_ != null) { + return profileBuilder_.getMessageOrBuilder(); + } else { + return profile_ == null ? + com.akaxin.proto.core.UserProto.SimpleUserProfile.getDefaultInstance() : profile_; + } + } + /** + *
+       *用户的个人资料
+       * 
+ * + * .core.SimpleUserProfile profile = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.SimpleUserProfile, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder, com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder> + getProfileFieldBuilder() { + if (profileBuilder_ == null) { + profileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.SimpleUserProfile, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder, com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder>( + getProfile(), + getParentForChildren(), + isClean()); + profile_ = null; + } + return profileBuilder_; + } + + private int relation_ = 0; + /** + *
+       *用户A与B的关系
+       * 
+ * + * .core.UserRelation relation = 2; + */ + public int getRelationValue() { + return relation_; + } + /** + *
+       *用户A与B的关系
+       * 
+ * + * .core.UserRelation relation = 2; + */ + public Builder setRelationValue(int value) { + relation_ = value; + onChanged(); + return this; + } + /** + *
+       *用户A与B的关系
+       * 
+ * + * .core.UserRelation relation = 2; + */ + public com.akaxin.proto.core.UserProto.UserRelation getRelation() { + com.akaxin.proto.core.UserProto.UserRelation result = com.akaxin.proto.core.UserProto.UserRelation.valueOf(relation_); + return result == null ? com.akaxin.proto.core.UserProto.UserRelation.UNRECOGNIZED : result; + } + /** + *
+       *用户A与B的关系
+       * 
+ * + * .core.UserRelation relation = 2; + */ + public Builder setRelation(com.akaxin.proto.core.UserProto.UserRelation value) { + if (value == null) { + throw new NullPointerException(); + } + + relation_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       *用户A与B的关系
+       * 
+ * + * .core.UserRelation relation = 2; + */ + public Builder clearRelation() { + + relation_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:core.UserRelationProfile) + } + + // @@protoc_insertion_point(class_scope:core.UserRelationProfile) + private static final com.akaxin.proto.core.UserProto.UserRelationProfile DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.core.UserProto.UserRelationProfile(); + } + + public static com.akaxin.proto.core.UserProto.UserRelationProfile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public UserRelationProfile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UserRelationProfile(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.core.UserProto.UserRelationProfile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_UserProfile_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_UserProfile_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_SimpleUserProfile_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_SimpleUserProfile_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_ApplyUserProfile_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_ApplyUserProfile_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_core_UserRelationProfile_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_core_UserRelationProfile_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\017core/user.proto\022\004core\"\373\001\n\013UserProfile\022" + + "\024\n\014site_user_id\030\001 \001(\t\022\021\n\tuser_name\030\002 \001(\t" + + "\022\022\n\nuser_photo\030\003 \001(\t\022\026\n\016self_introduce\030\004" + + " \001(\t\022%\n\013user_status\030\005 \001(\0162\020.core.UserSta" + + "tus\022\025\n\rregister_time\030\006 \001(\003\022\025\n\rsite_login" + + "_id\030\007 \001(\t\022\021\n\tnick_name\030\010 \001(\t\022\031\n\021username" + + "_in_latin\030\t \001(\t\022\024\n\014user_id_pubk\030\n \001(\t\"\274\001" + + "\n\021SimpleUserProfile\022\024\n\014site_user_id\030\001 \001(" + + "\t\022\021\n\tuser_name\030\002 \001(\t\022\022\n\nuser_photo\030\003 \001(\t" + + "\022%\n\013user_status\030\004 \001(\0162\020.core.UserStatus\022", + "\025\n\rsite_login_id\030\005 \001(\t\022\021\n\tnick_name\030\006 \001(" + + "\t\022\031\n\021username_in_latin\030\007 \001(\t\"M\n\020ApplyUse" + + "rProfile\022$\n\tapplyUser\030\001 \001(\0132\021.core.UserP" + + "rofile\022\023\n\013applyReason\030\002 \001(\t\"e\n\023UserRelat" + + "ionProfile\022(\n\007profile\030\001 \001(\0132\027.core.Simpl" + + "eUserProfile\022$\n\010relation\030\002 \001(\0162\022.core.Us" + + "erRelation*$\n\nUserStatus\022\n\n\006NORMAL\020\000\022\n\n\006" + + "SEALUP\020\001*\\\n\014UserRelation\022\021\n\rRELATION_NON" + + "E\020\000\022\023\n\017RELATION_FRIEND\020\001\022\021\n\rRELATION_CAR" + + "E\020\002\022\021\n\rRELATION_FANS\020\003B\"\n\025com.akaxin.pro", + "to.coreB\tUserProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_core_UserProfile_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_core_UserProfile_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_UserProfile_descriptor, + new java.lang.String[] { "SiteUserId", "UserName", "UserPhoto", "SelfIntroduce", "UserStatus", "RegisterTime", "SiteLoginId", "NickName", "UsernameInLatin", "UserIdPubk", }); + internal_static_core_SimpleUserProfile_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_core_SimpleUserProfile_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_SimpleUserProfile_descriptor, + new java.lang.String[] { "SiteUserId", "UserName", "UserPhoto", "UserStatus", "SiteLoginId", "NickName", "UsernameInLatin", }); + internal_static_core_ApplyUserProfile_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_core_ApplyUserProfile_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_ApplyUserProfile_descriptor, + new java.lang.String[] { "ApplyUser", "ApplyReason", }); + internal_static_core_UserRelationProfile_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_core_UserRelationProfile_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_core_UserRelationProfile_descriptor, + new java.lang.String[] { "Profile", "Relation", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/platform/ApiPhoneConfirmTokenProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/platform/ApiPhoneConfirmTokenProto.java new file mode 100755 index 0000000..997f754 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/platform/ApiPhoneConfirmTokenProto.java @@ -0,0 +1,1710 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: platform/api_phone_confirmToken.proto + +package com.akaxin.proto.platform; + +public final class ApiPhoneConfirmTokenProto { + private ApiPhoneConfirmTokenProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiPhoneConfirmTokenRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:platform.ApiPhoneConfirmTokenRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *平台允许站点获取手机号的token
+     * 
+ * + * string phone_token = 1; + */ + java.lang.String getPhoneToken(); + /** + *
+     *平台允许站点获取手机号的token
+     * 
+ * + * string phone_token = 1; + */ + com.google.protobuf.ByteString + getPhoneTokenBytes(); + + /** + *
+     *当前站点地址demo.akaxin.com:2021
+     * 
+ * + * string site_address = 2; + */ + java.lang.String getSiteAddress(); + /** + *
+     *当前站点地址demo.akaxin.com:2021
+     * 
+ * + * string site_address = 2; + */ + com.google.protobuf.ByteString + getSiteAddressBytes(); + } + /** + * Protobuf type {@code platform.ApiPhoneConfirmTokenRequest} + */ + public static final class ApiPhoneConfirmTokenRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:platform.ApiPhoneConfirmTokenRequest) + ApiPhoneConfirmTokenRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiPhoneConfirmTokenRequest.newBuilder() to construct. + private ApiPhoneConfirmTokenRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiPhoneConfirmTokenRequest() { + phoneToken_ = ""; + siteAddress_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiPhoneConfirmTokenRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + phoneToken_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteAddress_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.internal_static_platform_ApiPhoneConfirmTokenRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.internal_static_platform_ApiPhoneConfirmTokenRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest.class, com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest.Builder.class); + } + + public static final int PHONE_TOKEN_FIELD_NUMBER = 1; + private volatile java.lang.Object phoneToken_; + /** + *
+     *平台允许站点获取手机号的token
+     * 
+ * + * string phone_token = 1; + */ + public java.lang.String getPhoneToken() { + java.lang.Object ref = phoneToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phoneToken_ = s; + return s; + } + } + /** + *
+     *平台允许站点获取手机号的token
+     * 
+ * + * string phone_token = 1; + */ + public com.google.protobuf.ByteString + getPhoneTokenBytes() { + java.lang.Object ref = phoneToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + phoneToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_ADDRESS_FIELD_NUMBER = 2; + private volatile java.lang.Object siteAddress_; + /** + *
+     *当前站点地址demo.akaxin.com:2021
+     * 
+ * + * string site_address = 2; + */ + public java.lang.String getSiteAddress() { + java.lang.Object ref = siteAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteAddress_ = s; + return s; + } + } + /** + *
+     *当前站点地址demo.akaxin.com:2021
+     * 
+ * + * string site_address = 2; + */ + public com.google.protobuf.ByteString + getSiteAddressBytes() { + java.lang.Object ref = siteAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getPhoneTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, phoneToken_); + } + if (!getSiteAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteAddress_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPhoneTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, phoneToken_); + } + if (!getSiteAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteAddress_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest)) { + return super.equals(obj); + } + com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest other = (com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest) obj; + + boolean result = true; + result = result && getPhoneToken() + .equals(other.getPhoneToken()); + result = result && getSiteAddress() + .equals(other.getSiteAddress()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PHONE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPhoneToken().hashCode(); + hash = (37 * hash) + SITE_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getSiteAddress().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code platform.ApiPhoneConfirmTokenRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:platform.ApiPhoneConfirmTokenRequest) + com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.internal_static_platform_ApiPhoneConfirmTokenRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.internal_static_platform_ApiPhoneConfirmTokenRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest.class, com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest.Builder.class); + } + + // Construct using com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + phoneToken_ = ""; + + siteAddress_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.internal_static_platform_ApiPhoneConfirmTokenRequest_descriptor; + } + + public com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest getDefaultInstanceForType() { + return com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest.getDefaultInstance(); + } + + public com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest build() { + com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest buildPartial() { + com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest result = new com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest(this); + result.phoneToken_ = phoneToken_; + result.siteAddress_ = siteAddress_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest) { + return mergeFrom((com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest other) { + if (other == com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest.getDefaultInstance()) return this; + if (!other.getPhoneToken().isEmpty()) { + phoneToken_ = other.phoneToken_; + onChanged(); + } + if (!other.getSiteAddress().isEmpty()) { + siteAddress_ = other.siteAddress_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object phoneToken_ = ""; + /** + *
+       *平台允许站点获取手机号的token
+       * 
+ * + * string phone_token = 1; + */ + public java.lang.String getPhoneToken() { + java.lang.Object ref = phoneToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phoneToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *平台允许站点获取手机号的token
+       * 
+ * + * string phone_token = 1; + */ + public com.google.protobuf.ByteString + getPhoneTokenBytes() { + java.lang.Object ref = phoneToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + phoneToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *平台允许站点获取手机号的token
+       * 
+ * + * string phone_token = 1; + */ + public Builder setPhoneToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + phoneToken_ = value; + onChanged(); + return this; + } + /** + *
+       *平台允许站点获取手机号的token
+       * 
+ * + * string phone_token = 1; + */ + public Builder clearPhoneToken() { + + phoneToken_ = getDefaultInstance().getPhoneToken(); + onChanged(); + return this; + } + /** + *
+       *平台允许站点获取手机号的token
+       * 
+ * + * string phone_token = 1; + */ + public Builder setPhoneTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + phoneToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteAddress_ = ""; + /** + *
+       *当前站点地址demo.akaxin.com:2021
+       * 
+ * + * string site_address = 2; + */ + public java.lang.String getSiteAddress() { + java.lang.Object ref = siteAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *当前站点地址demo.akaxin.com:2021
+       * 
+ * + * string site_address = 2; + */ + public com.google.protobuf.ByteString + getSiteAddressBytes() { + java.lang.Object ref = siteAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *当前站点地址demo.akaxin.com:2021
+       * 
+ * + * string site_address = 2; + */ + public Builder setSiteAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteAddress_ = value; + onChanged(); + return this; + } + /** + *
+       *当前站点地址demo.akaxin.com:2021
+       * 
+ * + * string site_address = 2; + */ + public Builder clearSiteAddress() { + + siteAddress_ = getDefaultInstance().getSiteAddress(); + onChanged(); + return this; + } + /** + *
+       *当前站点地址demo.akaxin.com:2021
+       * 
+ * + * string site_address = 2; + */ + public Builder setSiteAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteAddress_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:platform.ApiPhoneConfirmTokenRequest) + } + + // @@protoc_insertion_point(class_scope:platform.ApiPhoneConfirmTokenRequest) + private static final com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest(); + } + + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiPhoneConfirmTokenRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiPhoneConfirmTokenRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiPhoneConfirmTokenResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:platform.ApiPhoneConfirmTokenResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *手机号码
+     * 
+ * + * string phone_id = 1; + */ + java.lang.String getPhoneId(); + /** + *
+     *手机号码
+     * 
+ * + * string phone_id = 1; + */ + com.google.protobuf.ByteString + getPhoneIdBytes(); + + /** + *
+     *+86
+     * 
+ * + * string country_code = 2; + */ + java.lang.String getCountryCode(); + /** + *
+     *+86
+     * 
+ * + * string country_code = 2; + */ + com.google.protobuf.ByteString + getCountryCodeBytes(); + + /** + *
+     *用户公钥
+     * 
+ * + * string user_id_pubk = 3; + */ + java.lang.String getUserIdPubk(); + /** + *
+     *用户公钥
+     * 
+ * + * string user_id_pubk = 3; + */ + com.google.protobuf.ByteString + getUserIdPubkBytes(); + } + /** + * Protobuf type {@code platform.ApiPhoneConfirmTokenResponse} + */ + public static final class ApiPhoneConfirmTokenResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:platform.ApiPhoneConfirmTokenResponse) + ApiPhoneConfirmTokenResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiPhoneConfirmTokenResponse.newBuilder() to construct. + private ApiPhoneConfirmTokenResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiPhoneConfirmTokenResponse() { + phoneId_ = ""; + countryCode_ = ""; + userIdPubk_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiPhoneConfirmTokenResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + phoneId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + countryCode_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + userIdPubk_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.internal_static_platform_ApiPhoneConfirmTokenResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.internal_static_platform_ApiPhoneConfirmTokenResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse.class, com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse.Builder.class); + } + + public static final int PHONE_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object phoneId_; + /** + *
+     *手机号码
+     * 
+ * + * string phone_id = 1; + */ + public java.lang.String getPhoneId() { + java.lang.Object ref = phoneId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phoneId_ = s; + return s; + } + } + /** + *
+     *手机号码
+     * 
+ * + * string phone_id = 1; + */ + public com.google.protobuf.ByteString + getPhoneIdBytes() { + java.lang.Object ref = phoneId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + phoneId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COUNTRY_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object countryCode_; + /** + *
+     *+86
+     * 
+ * + * string country_code = 2; + */ + public java.lang.String getCountryCode() { + java.lang.Object ref = countryCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + countryCode_ = s; + return s; + } + } + /** + *
+     *+86
+     * 
+ * + * string country_code = 2; + */ + public com.google.protobuf.ByteString + getCountryCodeBytes() { + java.lang.Object ref = countryCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + countryCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_PUBK_FIELD_NUMBER = 3; + private volatile java.lang.Object userIdPubk_; + /** + *
+     *用户公钥
+     * 
+ * + * string user_id_pubk = 3; + */ + public java.lang.String getUserIdPubk() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPubk_ = s; + return s; + } + } + /** + *
+     *用户公钥
+     * 
+ * + * string user_id_pubk = 3; + */ + public com.google.protobuf.ByteString + getUserIdPubkBytes() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getPhoneIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, phoneId_); + } + if (!getCountryCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, countryCode_); + } + if (!getUserIdPubkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userIdPubk_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPhoneIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, phoneId_); + } + if (!getCountryCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, countryCode_); + } + if (!getUserIdPubkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userIdPubk_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse)) { + return super.equals(obj); + } + com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse other = (com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse) obj; + + boolean result = true; + result = result && getPhoneId() + .equals(other.getPhoneId()); + result = result && getCountryCode() + .equals(other.getCountryCode()); + result = result && getUserIdPubk() + .equals(other.getUserIdPubk()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PHONE_ID_FIELD_NUMBER; + hash = (53 * hash) + getPhoneId().hashCode(); + hash = (37 * hash) + COUNTRY_CODE_FIELD_NUMBER; + hash = (53 * hash) + getCountryCode().hashCode(); + hash = (37 * hash) + USER_ID_PUBK_FIELD_NUMBER; + hash = (53 * hash) + getUserIdPubk().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code platform.ApiPhoneConfirmTokenResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:platform.ApiPhoneConfirmTokenResponse) + com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.internal_static_platform_ApiPhoneConfirmTokenResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.internal_static_platform_ApiPhoneConfirmTokenResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse.class, com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse.Builder.class); + } + + // Construct using com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + phoneId_ = ""; + + countryCode_ = ""; + + userIdPubk_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.internal_static_platform_ApiPhoneConfirmTokenResponse_descriptor; + } + + public com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse getDefaultInstanceForType() { + return com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse.getDefaultInstance(); + } + + public com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse build() { + com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse buildPartial() { + com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse result = new com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse(this); + result.phoneId_ = phoneId_; + result.countryCode_ = countryCode_; + result.userIdPubk_ = userIdPubk_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse) { + return mergeFrom((com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse other) { + if (other == com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse.getDefaultInstance()) return this; + if (!other.getPhoneId().isEmpty()) { + phoneId_ = other.phoneId_; + onChanged(); + } + if (!other.getCountryCode().isEmpty()) { + countryCode_ = other.countryCode_; + onChanged(); + } + if (!other.getUserIdPubk().isEmpty()) { + userIdPubk_ = other.userIdPubk_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object phoneId_ = ""; + /** + *
+       *手机号码
+       * 
+ * + * string phone_id = 1; + */ + public java.lang.String getPhoneId() { + java.lang.Object ref = phoneId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phoneId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *手机号码
+       * 
+ * + * string phone_id = 1; + */ + public com.google.protobuf.ByteString + getPhoneIdBytes() { + java.lang.Object ref = phoneId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + phoneId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *手机号码
+       * 
+ * + * string phone_id = 1; + */ + public Builder setPhoneId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + phoneId_ = value; + onChanged(); + return this; + } + /** + *
+       *手机号码
+       * 
+ * + * string phone_id = 1; + */ + public Builder clearPhoneId() { + + phoneId_ = getDefaultInstance().getPhoneId(); + onChanged(); + return this; + } + /** + *
+       *手机号码
+       * 
+ * + * string phone_id = 1; + */ + public Builder setPhoneIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + phoneId_ = value; + onChanged(); + return this; + } + + private java.lang.Object countryCode_ = ""; + /** + *
+       *+86
+       * 
+ * + * string country_code = 2; + */ + public java.lang.String getCountryCode() { + java.lang.Object ref = countryCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + countryCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *+86
+       * 
+ * + * string country_code = 2; + */ + public com.google.protobuf.ByteString + getCountryCodeBytes() { + java.lang.Object ref = countryCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + countryCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *+86
+       * 
+ * + * string country_code = 2; + */ + public Builder setCountryCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + countryCode_ = value; + onChanged(); + return this; + } + /** + *
+       *+86
+       * 
+ * + * string country_code = 2; + */ + public Builder clearCountryCode() { + + countryCode_ = getDefaultInstance().getCountryCode(); + onChanged(); + return this; + } + /** + *
+       *+86
+       * 
+ * + * string country_code = 2; + */ + public Builder setCountryCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + countryCode_ = value; + onChanged(); + return this; + } + + private java.lang.Object userIdPubk_ = ""; + /** + *
+       *用户公钥
+       * 
+ * + * string user_id_pubk = 3; + */ + public java.lang.String getUserIdPubk() { + java.lang.Object ref = userIdPubk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPubk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户公钥
+       * 
+ * + * string user_id_pubk = 3; + */ + public com.google.protobuf.ByteString + getUserIdPubkBytes() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户公钥
+       * 
+ * + * string user_id_pubk = 3; + */ + public Builder setUserIdPubk( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userIdPubk_ = value; + onChanged(); + return this; + } + /** + *
+       *用户公钥
+       * 
+ * + * string user_id_pubk = 3; + */ + public Builder clearUserIdPubk() { + + userIdPubk_ = getDefaultInstance().getUserIdPubk(); + onChanged(); + return this; + } + /** + *
+       *用户公钥
+       * 
+ * + * string user_id_pubk = 3; + */ + public Builder setUserIdPubkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userIdPubk_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:platform.ApiPhoneConfirmTokenResponse) + } + + // @@protoc_insertion_point(class_scope:platform.ApiPhoneConfirmTokenResponse) + private static final com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse(); + } + + public static com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiPhoneConfirmTokenResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiPhoneConfirmTokenResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.platform.ApiPhoneConfirmTokenProto.ApiPhoneConfirmTokenResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_platform_ApiPhoneConfirmTokenRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_platform_ApiPhoneConfirmTokenRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_platform_ApiPhoneConfirmTokenResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_platform_ApiPhoneConfirmTokenResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n%platform/api_phone_confirmToken.proto\022" + + "\010platform\"H\n\033ApiPhoneConfirmTokenRequest" + + "\022\023\n\013phone_token\030\001 \001(\t\022\024\n\014site_address\030\002 " + + "\001(\t\"\\\n\034ApiPhoneConfirmTokenResponse\022\020\n\010p" + + "hone_id\030\001 \001(\t\022\024\n\014country_code\030\002 \001(\t\022\024\n\014u" + + "ser_id_pubk\030\003 \001(\t2|\n\033ApiPhoneConfirmToke" + + "nService\022]\n\014confirmToken\022%.platform.ApiP" + + "honeConfirmTokenRequest\032&.platform.ApiPh" + + "oneConfirmTokenResponseB6\n\031com.akaxin.pr" + + "oto.platformB\031ApiPhoneConfirmTokenProtob", + "\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_platform_ApiPhoneConfirmTokenRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_platform_ApiPhoneConfirmTokenRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_platform_ApiPhoneConfirmTokenRequest_descriptor, + new java.lang.String[] { "PhoneToken", "SiteAddress", }); + internal_static_platform_ApiPhoneConfirmTokenResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_platform_ApiPhoneConfirmTokenResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_platform_ApiPhoneConfirmTokenResponse_descriptor, + new java.lang.String[] { "PhoneId", "CountryCode", "UserIdPubk", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/platform/ApiPushNotificationProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/platform/ApiPushNotificationProto.java new file mode 100755 index 0000000..2f04aea --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/platform/ApiPushNotificationProto.java @@ -0,0 +1,797 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: platform/api_push_notification.proto + +package com.akaxin.proto.platform; + +public final class ApiPushNotificationProto { + private ApiPushNotificationProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiPushNotificationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:platform.ApiPushNotificationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .core.PushType push_type = 1; + */ + int getPushTypeValue(); + /** + * .core.PushType push_type = 1; + */ + com.akaxin.proto.core.PushProto.PushType getPushType(); + + /** + *
+     *通知消息
+     * 
+ * + * .core.Notification notification = 2; + */ + boolean hasNotification(); + /** + *
+     *通知消息
+     * 
+ * + * .core.Notification notification = 2; + */ + com.akaxin.proto.core.PushProto.Notification getNotification(); + /** + *
+     *通知消息
+     * 
+ * + * .core.Notification notification = 2; + */ + com.akaxin.proto.core.PushProto.NotificationOrBuilder getNotificationOrBuilder(); + } + /** + * Protobuf type {@code platform.ApiPushNotificationRequest} + */ + public static final class ApiPushNotificationRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:platform.ApiPushNotificationRequest) + ApiPushNotificationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiPushNotificationRequest.newBuilder() to construct. + private ApiPushNotificationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiPushNotificationRequest() { + pushType_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiPushNotificationRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + + pushType_ = rawValue; + break; + } + case 18: { + com.akaxin.proto.core.PushProto.Notification.Builder subBuilder = null; + if (notification_ != null) { + subBuilder = notification_.toBuilder(); + } + notification_ = input.readMessage(com.akaxin.proto.core.PushProto.Notification.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(notification_); + notification_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.platform.ApiPushNotificationProto.internal_static_platform_ApiPushNotificationRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.platform.ApiPushNotificationProto.internal_static_platform_ApiPushNotificationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest.class, com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest.Builder.class); + } + + public static final int PUSH_TYPE_FIELD_NUMBER = 1; + private int pushType_; + /** + * .core.PushType push_type = 1; + */ + public int getPushTypeValue() { + return pushType_; + } + /** + * .core.PushType push_type = 1; + */ + public com.akaxin.proto.core.PushProto.PushType getPushType() { + com.akaxin.proto.core.PushProto.PushType result = com.akaxin.proto.core.PushProto.PushType.valueOf(pushType_); + return result == null ? com.akaxin.proto.core.PushProto.PushType.UNRECOGNIZED : result; + } + + public static final int NOTIFICATION_FIELD_NUMBER = 2; + private com.akaxin.proto.core.PushProto.Notification notification_; + /** + *
+     *通知消息
+     * 
+ * + * .core.Notification notification = 2; + */ + public boolean hasNotification() { + return notification_ != null; + } + /** + *
+     *通知消息
+     * 
+ * + * .core.Notification notification = 2; + */ + public com.akaxin.proto.core.PushProto.Notification getNotification() { + return notification_ == null ? com.akaxin.proto.core.PushProto.Notification.getDefaultInstance() : notification_; + } + /** + *
+     *通知消息
+     * 
+ * + * .core.Notification notification = 2; + */ + public com.akaxin.proto.core.PushProto.NotificationOrBuilder getNotificationOrBuilder() { + return getNotification(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (pushType_ != com.akaxin.proto.core.PushProto.PushType.PUSH_NOTICE.getNumber()) { + output.writeEnum(1, pushType_); + } + if (notification_ != null) { + output.writeMessage(2, getNotification()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pushType_ != com.akaxin.proto.core.PushProto.PushType.PUSH_NOTICE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, pushType_); + } + if (notification_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getNotification()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest)) { + return super.equals(obj); + } + com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest other = (com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest) obj; + + boolean result = true; + result = result && pushType_ == other.pushType_; + result = result && (hasNotification() == other.hasNotification()); + if (hasNotification()) { + result = result && getNotification() + .equals(other.getNotification()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PUSH_TYPE_FIELD_NUMBER; + hash = (53 * hash) + pushType_; + if (hasNotification()) { + hash = (37 * hash) + NOTIFICATION_FIELD_NUMBER; + hash = (53 * hash) + getNotification().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code platform.ApiPushNotificationRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:platform.ApiPushNotificationRequest) + com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.platform.ApiPushNotificationProto.internal_static_platform_ApiPushNotificationRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.platform.ApiPushNotificationProto.internal_static_platform_ApiPushNotificationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest.class, com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest.Builder.class); + } + + // Construct using com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + pushType_ = 0; + + if (notificationBuilder_ == null) { + notification_ = null; + } else { + notification_ = null; + notificationBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.platform.ApiPushNotificationProto.internal_static_platform_ApiPushNotificationRequest_descriptor; + } + + public com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest getDefaultInstanceForType() { + return com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest.getDefaultInstance(); + } + + public com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest build() { + com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest buildPartial() { + com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest result = new com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest(this); + result.pushType_ = pushType_; + if (notificationBuilder_ == null) { + result.notification_ = notification_; + } else { + result.notification_ = notificationBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest) { + return mergeFrom((com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest other) { + if (other == com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest.getDefaultInstance()) return this; + if (other.pushType_ != 0) { + setPushTypeValue(other.getPushTypeValue()); + } + if (other.hasNotification()) { + mergeNotification(other.getNotification()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int pushType_ = 0; + /** + * .core.PushType push_type = 1; + */ + public int getPushTypeValue() { + return pushType_; + } + /** + * .core.PushType push_type = 1; + */ + public Builder setPushTypeValue(int value) { + pushType_ = value; + onChanged(); + return this; + } + /** + * .core.PushType push_type = 1; + */ + public com.akaxin.proto.core.PushProto.PushType getPushType() { + com.akaxin.proto.core.PushProto.PushType result = com.akaxin.proto.core.PushProto.PushType.valueOf(pushType_); + return result == null ? com.akaxin.proto.core.PushProto.PushType.UNRECOGNIZED : result; + } + /** + * .core.PushType push_type = 1; + */ + public Builder setPushType(com.akaxin.proto.core.PushProto.PushType value) { + if (value == null) { + throw new NullPointerException(); + } + + pushType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .core.PushType push_type = 1; + */ + public Builder clearPushType() { + + pushType_ = 0; + onChanged(); + return this; + } + + private com.akaxin.proto.core.PushProto.Notification notification_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.PushProto.Notification, com.akaxin.proto.core.PushProto.Notification.Builder, com.akaxin.proto.core.PushProto.NotificationOrBuilder> notificationBuilder_; + /** + *
+       *通知消息
+       * 
+ * + * .core.Notification notification = 2; + */ + public boolean hasNotification() { + return notificationBuilder_ != null || notification_ != null; + } + /** + *
+       *通知消息
+       * 
+ * + * .core.Notification notification = 2; + */ + public com.akaxin.proto.core.PushProto.Notification getNotification() { + if (notificationBuilder_ == null) { + return notification_ == null ? com.akaxin.proto.core.PushProto.Notification.getDefaultInstance() : notification_; + } else { + return notificationBuilder_.getMessage(); + } + } + /** + *
+       *通知消息
+       * 
+ * + * .core.Notification notification = 2; + */ + public Builder setNotification(com.akaxin.proto.core.PushProto.Notification value) { + if (notificationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + notification_ = value; + onChanged(); + } else { + notificationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *通知消息
+       * 
+ * + * .core.Notification notification = 2; + */ + public Builder setNotification( + com.akaxin.proto.core.PushProto.Notification.Builder builderForValue) { + if (notificationBuilder_ == null) { + notification_ = builderForValue.build(); + onChanged(); + } else { + notificationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *通知消息
+       * 
+ * + * .core.Notification notification = 2; + */ + public Builder mergeNotification(com.akaxin.proto.core.PushProto.Notification value) { + if (notificationBuilder_ == null) { + if (notification_ != null) { + notification_ = + com.akaxin.proto.core.PushProto.Notification.newBuilder(notification_).mergeFrom(value).buildPartial(); + } else { + notification_ = value; + } + onChanged(); + } else { + notificationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *通知消息
+       * 
+ * + * .core.Notification notification = 2; + */ + public Builder clearNotification() { + if (notificationBuilder_ == null) { + notification_ = null; + onChanged(); + } else { + notification_ = null; + notificationBuilder_ = null; + } + + return this; + } + /** + *
+       *通知消息
+       * 
+ * + * .core.Notification notification = 2; + */ + public com.akaxin.proto.core.PushProto.Notification.Builder getNotificationBuilder() { + + onChanged(); + return getNotificationFieldBuilder().getBuilder(); + } + /** + *
+       *通知消息
+       * 
+ * + * .core.Notification notification = 2; + */ + public com.akaxin.proto.core.PushProto.NotificationOrBuilder getNotificationOrBuilder() { + if (notificationBuilder_ != null) { + return notificationBuilder_.getMessageOrBuilder(); + } else { + return notification_ == null ? + com.akaxin.proto.core.PushProto.Notification.getDefaultInstance() : notification_; + } + } + /** + *
+       *通知消息
+       * 
+ * + * .core.Notification notification = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.PushProto.Notification, com.akaxin.proto.core.PushProto.Notification.Builder, com.akaxin.proto.core.PushProto.NotificationOrBuilder> + getNotificationFieldBuilder() { + if (notificationBuilder_ == null) { + notificationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.PushProto.Notification, com.akaxin.proto.core.PushProto.Notification.Builder, com.akaxin.proto.core.PushProto.NotificationOrBuilder>( + getNotification(), + getParentForChildren(), + isClean()); + notification_ = null; + } + return notificationBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:platform.ApiPushNotificationRequest) + } + + // @@protoc_insertion_point(class_scope:platform.ApiPushNotificationRequest) + private static final com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest(); + } + + public static com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiPushNotificationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiPushNotificationRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.platform.ApiPushNotificationProto.ApiPushNotificationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_platform_ApiPushNotificationRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_platform_ApiPushNotificationRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n$platform/api_push_notification.proto\022\010" + + "platform\032\017core/core.proto\032\017core/push.pro" + + "to\"i\n\032ApiPushNotificationRequest\022!\n\tpush" + + "_type\030\001 \001(\0162\016.core.PushType\022(\n\014notificat" + + "ion\030\002 \001(\0132\022.core.Notification2f\n\032ApiPush" + + "NotificationService\022H\n\014notification\022$.pl" + + "atform.ApiPushNotificationRequest\032\022.core" + + ".NoneResponseB5\n\031com.akaxin.proto.platfo" + + "rmB\030ApiPushNotificationProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.CoreProto.getDescriptor(), + com.akaxin.proto.core.PushProto.getDescriptor(), + }, assigner); + internal_static_platform_ApiPushNotificationRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_platform_ApiPushNotificationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_platform_ApiPushNotificationRequest_descriptor, + new java.lang.String[] { "PushType", "Notification", }); + com.akaxin.proto.core.CoreProto.getDescriptor(); + com.akaxin.proto.core.PushProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/platform/ApiPushNotificationsProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/platform/ApiPushNotificationsProto.java new file mode 100755 index 0000000..3b5d4ff --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/platform/ApiPushNotificationsProto.java @@ -0,0 +1,1574 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: platform/api_push_notifications.proto + +package com.akaxin.proto.platform; + +public final class ApiPushNotificationsProto { + private ApiPushNotificationsProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiPushNotificationsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:platform.ApiPushNotificationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *push通知的类型
+     * 
+ * + * .core.PushType push_type = 1; + */ + int getPushTypeValue(); + /** + *
+     *push通知的类型
+     * 
+ * + * .core.PushType push_type = 1; + */ + com.akaxin.proto.core.PushProto.PushType getPushType(); + + /** + *
+     *批量发送的通知消息
+     * 
+ * + * .core.Notifications notifications = 2; + */ + boolean hasNotifications(); + /** + *
+     *批量发送的通知消息
+     * 
+ * + * .core.Notifications notifications = 2; + */ + com.akaxin.proto.core.PushProto.Notifications getNotifications(); + /** + *
+     *批量发送的通知消息
+     * 
+ * + * .core.Notifications notifications = 2; + */ + com.akaxin.proto.core.PushProto.NotificationsOrBuilder getNotificationsOrBuilder(); + + /** + *
+     *通知发送放
+     * 
+ * + * .core.PushFromUser push_from_user = 3; + */ + boolean hasPushFromUser(); + /** + *
+     *通知发送放
+     * 
+ * + * .core.PushFromUser push_from_user = 3; + */ + com.akaxin.proto.core.PushProto.PushFromUser getPushFromUser(); + /** + *
+     *通知发送放
+     * 
+ * + * .core.PushFromUser push_from_user = 3; + */ + com.akaxin.proto.core.PushProto.PushFromUserOrBuilder getPushFromUserOrBuilder(); + + /** + *
+     *通知接受者
+     * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + java.util.List + getPushToUserList(); + /** + *
+     *通知接受者
+     * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + com.akaxin.proto.core.PushProto.PushToUser getPushToUser(int index); + /** + *
+     *通知接受者
+     * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + int getPushToUserCount(); + /** + *
+     *通知接受者
+     * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + java.util.List + getPushToUserOrBuilderList(); + /** + *
+     *通知接受者
+     * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + com.akaxin.proto.core.PushProto.PushToUserOrBuilder getPushToUserOrBuilder( + int index); + } + /** + * Protobuf type {@code platform.ApiPushNotificationsRequest} + */ + public static final class ApiPushNotificationsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:platform.ApiPushNotificationsRequest) + ApiPushNotificationsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiPushNotificationsRequest.newBuilder() to construct. + private ApiPushNotificationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiPushNotificationsRequest() { + pushType_ = 0; + pushToUser_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiPushNotificationsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + + pushType_ = rawValue; + break; + } + case 18: { + com.akaxin.proto.core.PushProto.Notifications.Builder subBuilder = null; + if (notifications_ != null) { + subBuilder = notifications_.toBuilder(); + } + notifications_ = input.readMessage(com.akaxin.proto.core.PushProto.Notifications.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(notifications_); + notifications_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.akaxin.proto.core.PushProto.PushFromUser.Builder subBuilder = null; + if (pushFromUser_ != null) { + subBuilder = pushFromUser_.toBuilder(); + } + pushFromUser_ = input.readMessage(com.akaxin.proto.core.PushProto.PushFromUser.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(pushFromUser_); + pushFromUser_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + pushToUser_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + pushToUser_.add( + input.readMessage(com.akaxin.proto.core.PushProto.PushToUser.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + pushToUser_ = java.util.Collections.unmodifiableList(pushToUser_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.platform.ApiPushNotificationsProto.internal_static_platform_ApiPushNotificationsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.platform.ApiPushNotificationsProto.internal_static_platform_ApiPushNotificationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest.class, com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest.Builder.class); + } + + private int bitField0_; + public static final int PUSH_TYPE_FIELD_NUMBER = 1; + private int pushType_; + /** + *
+     *push通知的类型
+     * 
+ * + * .core.PushType push_type = 1; + */ + public int getPushTypeValue() { + return pushType_; + } + /** + *
+     *push通知的类型
+     * 
+ * + * .core.PushType push_type = 1; + */ + public com.akaxin.proto.core.PushProto.PushType getPushType() { + com.akaxin.proto.core.PushProto.PushType result = com.akaxin.proto.core.PushProto.PushType.valueOf(pushType_); + return result == null ? com.akaxin.proto.core.PushProto.PushType.UNRECOGNIZED : result; + } + + public static final int NOTIFICATIONS_FIELD_NUMBER = 2; + private com.akaxin.proto.core.PushProto.Notifications notifications_; + /** + *
+     *批量发送的通知消息
+     * 
+ * + * .core.Notifications notifications = 2; + */ + public boolean hasNotifications() { + return notifications_ != null; + } + /** + *
+     *批量发送的通知消息
+     * 
+ * + * .core.Notifications notifications = 2; + */ + public com.akaxin.proto.core.PushProto.Notifications getNotifications() { + return notifications_ == null ? com.akaxin.proto.core.PushProto.Notifications.getDefaultInstance() : notifications_; + } + /** + *
+     *批量发送的通知消息
+     * 
+ * + * .core.Notifications notifications = 2; + */ + public com.akaxin.proto.core.PushProto.NotificationsOrBuilder getNotificationsOrBuilder() { + return getNotifications(); + } + + public static final int PUSH_FROM_USER_FIELD_NUMBER = 3; + private com.akaxin.proto.core.PushProto.PushFromUser pushFromUser_; + /** + *
+     *通知发送放
+     * 
+ * + * .core.PushFromUser push_from_user = 3; + */ + public boolean hasPushFromUser() { + return pushFromUser_ != null; + } + /** + *
+     *通知发送放
+     * 
+ * + * .core.PushFromUser push_from_user = 3; + */ + public com.akaxin.proto.core.PushProto.PushFromUser getPushFromUser() { + return pushFromUser_ == null ? com.akaxin.proto.core.PushProto.PushFromUser.getDefaultInstance() : pushFromUser_; + } + /** + *
+     *通知发送放
+     * 
+ * + * .core.PushFromUser push_from_user = 3; + */ + public com.akaxin.proto.core.PushProto.PushFromUserOrBuilder getPushFromUserOrBuilder() { + return getPushFromUser(); + } + + public static final int PUSH_TO_USER_FIELD_NUMBER = 4; + private java.util.List pushToUser_; + /** + *
+     *通知接受者
+     * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public java.util.List getPushToUserList() { + return pushToUser_; + } + /** + *
+     *通知接受者
+     * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public java.util.List + getPushToUserOrBuilderList() { + return pushToUser_; + } + /** + *
+     *通知接受者
+     * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public int getPushToUserCount() { + return pushToUser_.size(); + } + /** + *
+     *通知接受者
+     * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public com.akaxin.proto.core.PushProto.PushToUser getPushToUser(int index) { + return pushToUser_.get(index); + } + /** + *
+     *通知接受者
+     * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public com.akaxin.proto.core.PushProto.PushToUserOrBuilder getPushToUserOrBuilder( + int index) { + return pushToUser_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (pushType_ != com.akaxin.proto.core.PushProto.PushType.PUSH_NOTICE.getNumber()) { + output.writeEnum(1, pushType_); + } + if (notifications_ != null) { + output.writeMessage(2, getNotifications()); + } + if (pushFromUser_ != null) { + output.writeMessage(3, getPushFromUser()); + } + for (int i = 0; i < pushToUser_.size(); i++) { + output.writeMessage(4, pushToUser_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pushType_ != com.akaxin.proto.core.PushProto.PushType.PUSH_NOTICE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, pushType_); + } + if (notifications_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getNotifications()); + } + if (pushFromUser_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getPushFromUser()); + } + for (int i = 0; i < pushToUser_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, pushToUser_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest)) { + return super.equals(obj); + } + com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest other = (com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest) obj; + + boolean result = true; + result = result && pushType_ == other.pushType_; + result = result && (hasNotifications() == other.hasNotifications()); + if (hasNotifications()) { + result = result && getNotifications() + .equals(other.getNotifications()); + } + result = result && (hasPushFromUser() == other.hasPushFromUser()); + if (hasPushFromUser()) { + result = result && getPushFromUser() + .equals(other.getPushFromUser()); + } + result = result && getPushToUserList() + .equals(other.getPushToUserList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PUSH_TYPE_FIELD_NUMBER; + hash = (53 * hash) + pushType_; + if (hasNotifications()) { + hash = (37 * hash) + NOTIFICATIONS_FIELD_NUMBER; + hash = (53 * hash) + getNotifications().hashCode(); + } + if (hasPushFromUser()) { + hash = (37 * hash) + PUSH_FROM_USER_FIELD_NUMBER; + hash = (53 * hash) + getPushFromUser().hashCode(); + } + if (getPushToUserCount() > 0) { + hash = (37 * hash) + PUSH_TO_USER_FIELD_NUMBER; + hash = (53 * hash) + getPushToUserList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code platform.ApiPushNotificationsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:platform.ApiPushNotificationsRequest) + com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.platform.ApiPushNotificationsProto.internal_static_platform_ApiPushNotificationsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.platform.ApiPushNotificationsProto.internal_static_platform_ApiPushNotificationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest.class, com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest.Builder.class); + } + + // Construct using com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPushToUserFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + pushType_ = 0; + + if (notificationsBuilder_ == null) { + notifications_ = null; + } else { + notifications_ = null; + notificationsBuilder_ = null; + } + if (pushFromUserBuilder_ == null) { + pushFromUser_ = null; + } else { + pushFromUser_ = null; + pushFromUserBuilder_ = null; + } + if (pushToUserBuilder_ == null) { + pushToUser_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + pushToUserBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.platform.ApiPushNotificationsProto.internal_static_platform_ApiPushNotificationsRequest_descriptor; + } + + public com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest getDefaultInstanceForType() { + return com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest.getDefaultInstance(); + } + + public com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest build() { + com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest buildPartial() { + com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest result = new com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.pushType_ = pushType_; + if (notificationsBuilder_ == null) { + result.notifications_ = notifications_; + } else { + result.notifications_ = notificationsBuilder_.build(); + } + if (pushFromUserBuilder_ == null) { + result.pushFromUser_ = pushFromUser_; + } else { + result.pushFromUser_ = pushFromUserBuilder_.build(); + } + if (pushToUserBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + pushToUser_ = java.util.Collections.unmodifiableList(pushToUser_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.pushToUser_ = pushToUser_; + } else { + result.pushToUser_ = pushToUserBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest) { + return mergeFrom((com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest other) { + if (other == com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest.getDefaultInstance()) return this; + if (other.pushType_ != 0) { + setPushTypeValue(other.getPushTypeValue()); + } + if (other.hasNotifications()) { + mergeNotifications(other.getNotifications()); + } + if (other.hasPushFromUser()) { + mergePushFromUser(other.getPushFromUser()); + } + if (pushToUserBuilder_ == null) { + if (!other.pushToUser_.isEmpty()) { + if (pushToUser_.isEmpty()) { + pushToUser_ = other.pushToUser_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePushToUserIsMutable(); + pushToUser_.addAll(other.pushToUser_); + } + onChanged(); + } + } else { + if (!other.pushToUser_.isEmpty()) { + if (pushToUserBuilder_.isEmpty()) { + pushToUserBuilder_.dispose(); + pushToUserBuilder_ = null; + pushToUser_ = other.pushToUser_; + bitField0_ = (bitField0_ & ~0x00000008); + pushToUserBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPushToUserFieldBuilder() : null; + } else { + pushToUserBuilder_.addAllMessages(other.pushToUser_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int pushType_ = 0; + /** + *
+       *push通知的类型
+       * 
+ * + * .core.PushType push_type = 1; + */ + public int getPushTypeValue() { + return pushType_; + } + /** + *
+       *push通知的类型
+       * 
+ * + * .core.PushType push_type = 1; + */ + public Builder setPushTypeValue(int value) { + pushType_ = value; + onChanged(); + return this; + } + /** + *
+       *push通知的类型
+       * 
+ * + * .core.PushType push_type = 1; + */ + public com.akaxin.proto.core.PushProto.PushType getPushType() { + com.akaxin.proto.core.PushProto.PushType result = com.akaxin.proto.core.PushProto.PushType.valueOf(pushType_); + return result == null ? com.akaxin.proto.core.PushProto.PushType.UNRECOGNIZED : result; + } + /** + *
+       *push通知的类型
+       * 
+ * + * .core.PushType push_type = 1; + */ + public Builder setPushType(com.akaxin.proto.core.PushProto.PushType value) { + if (value == null) { + throw new NullPointerException(); + } + + pushType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       *push通知的类型
+       * 
+ * + * .core.PushType push_type = 1; + */ + public Builder clearPushType() { + + pushType_ = 0; + onChanged(); + return this; + } + + private com.akaxin.proto.core.PushProto.Notifications notifications_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.PushProto.Notifications, com.akaxin.proto.core.PushProto.Notifications.Builder, com.akaxin.proto.core.PushProto.NotificationsOrBuilder> notificationsBuilder_; + /** + *
+       *批量发送的通知消息
+       * 
+ * + * .core.Notifications notifications = 2; + */ + public boolean hasNotifications() { + return notificationsBuilder_ != null || notifications_ != null; + } + /** + *
+       *批量发送的通知消息
+       * 
+ * + * .core.Notifications notifications = 2; + */ + public com.akaxin.proto.core.PushProto.Notifications getNotifications() { + if (notificationsBuilder_ == null) { + return notifications_ == null ? com.akaxin.proto.core.PushProto.Notifications.getDefaultInstance() : notifications_; + } else { + return notificationsBuilder_.getMessage(); + } + } + /** + *
+       *批量发送的通知消息
+       * 
+ * + * .core.Notifications notifications = 2; + */ + public Builder setNotifications(com.akaxin.proto.core.PushProto.Notifications value) { + if (notificationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + notifications_ = value; + onChanged(); + } else { + notificationsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *批量发送的通知消息
+       * 
+ * + * .core.Notifications notifications = 2; + */ + public Builder setNotifications( + com.akaxin.proto.core.PushProto.Notifications.Builder builderForValue) { + if (notificationsBuilder_ == null) { + notifications_ = builderForValue.build(); + onChanged(); + } else { + notificationsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *批量发送的通知消息
+       * 
+ * + * .core.Notifications notifications = 2; + */ + public Builder mergeNotifications(com.akaxin.proto.core.PushProto.Notifications value) { + if (notificationsBuilder_ == null) { + if (notifications_ != null) { + notifications_ = + com.akaxin.proto.core.PushProto.Notifications.newBuilder(notifications_).mergeFrom(value).buildPartial(); + } else { + notifications_ = value; + } + onChanged(); + } else { + notificationsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *批量发送的通知消息
+       * 
+ * + * .core.Notifications notifications = 2; + */ + public Builder clearNotifications() { + if (notificationsBuilder_ == null) { + notifications_ = null; + onChanged(); + } else { + notifications_ = null; + notificationsBuilder_ = null; + } + + return this; + } + /** + *
+       *批量发送的通知消息
+       * 
+ * + * .core.Notifications notifications = 2; + */ + public com.akaxin.proto.core.PushProto.Notifications.Builder getNotificationsBuilder() { + + onChanged(); + return getNotificationsFieldBuilder().getBuilder(); + } + /** + *
+       *批量发送的通知消息
+       * 
+ * + * .core.Notifications notifications = 2; + */ + public com.akaxin.proto.core.PushProto.NotificationsOrBuilder getNotificationsOrBuilder() { + if (notificationsBuilder_ != null) { + return notificationsBuilder_.getMessageOrBuilder(); + } else { + return notifications_ == null ? + com.akaxin.proto.core.PushProto.Notifications.getDefaultInstance() : notifications_; + } + } + /** + *
+       *批量发送的通知消息
+       * 
+ * + * .core.Notifications notifications = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.PushProto.Notifications, com.akaxin.proto.core.PushProto.Notifications.Builder, com.akaxin.proto.core.PushProto.NotificationsOrBuilder> + getNotificationsFieldBuilder() { + if (notificationsBuilder_ == null) { + notificationsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.PushProto.Notifications, com.akaxin.proto.core.PushProto.Notifications.Builder, com.akaxin.proto.core.PushProto.NotificationsOrBuilder>( + getNotifications(), + getParentForChildren(), + isClean()); + notifications_ = null; + } + return notificationsBuilder_; + } + + private com.akaxin.proto.core.PushProto.PushFromUser pushFromUser_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.PushProto.PushFromUser, com.akaxin.proto.core.PushProto.PushFromUser.Builder, com.akaxin.proto.core.PushProto.PushFromUserOrBuilder> pushFromUserBuilder_; + /** + *
+       *通知发送放
+       * 
+ * + * .core.PushFromUser push_from_user = 3; + */ + public boolean hasPushFromUser() { + return pushFromUserBuilder_ != null || pushFromUser_ != null; + } + /** + *
+       *通知发送放
+       * 
+ * + * .core.PushFromUser push_from_user = 3; + */ + public com.akaxin.proto.core.PushProto.PushFromUser getPushFromUser() { + if (pushFromUserBuilder_ == null) { + return pushFromUser_ == null ? com.akaxin.proto.core.PushProto.PushFromUser.getDefaultInstance() : pushFromUser_; + } else { + return pushFromUserBuilder_.getMessage(); + } + } + /** + *
+       *通知发送放
+       * 
+ * + * .core.PushFromUser push_from_user = 3; + */ + public Builder setPushFromUser(com.akaxin.proto.core.PushProto.PushFromUser value) { + if (pushFromUserBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pushFromUser_ = value; + onChanged(); + } else { + pushFromUserBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *通知发送放
+       * 
+ * + * .core.PushFromUser push_from_user = 3; + */ + public Builder setPushFromUser( + com.akaxin.proto.core.PushProto.PushFromUser.Builder builderForValue) { + if (pushFromUserBuilder_ == null) { + pushFromUser_ = builderForValue.build(); + onChanged(); + } else { + pushFromUserBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *通知发送放
+       * 
+ * + * .core.PushFromUser push_from_user = 3; + */ + public Builder mergePushFromUser(com.akaxin.proto.core.PushProto.PushFromUser value) { + if (pushFromUserBuilder_ == null) { + if (pushFromUser_ != null) { + pushFromUser_ = + com.akaxin.proto.core.PushProto.PushFromUser.newBuilder(pushFromUser_).mergeFrom(value).buildPartial(); + } else { + pushFromUser_ = value; + } + onChanged(); + } else { + pushFromUserBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *通知发送放
+       * 
+ * + * .core.PushFromUser push_from_user = 3; + */ + public Builder clearPushFromUser() { + if (pushFromUserBuilder_ == null) { + pushFromUser_ = null; + onChanged(); + } else { + pushFromUser_ = null; + pushFromUserBuilder_ = null; + } + + return this; + } + /** + *
+       *通知发送放
+       * 
+ * + * .core.PushFromUser push_from_user = 3; + */ + public com.akaxin.proto.core.PushProto.PushFromUser.Builder getPushFromUserBuilder() { + + onChanged(); + return getPushFromUserFieldBuilder().getBuilder(); + } + /** + *
+       *通知发送放
+       * 
+ * + * .core.PushFromUser push_from_user = 3; + */ + public com.akaxin.proto.core.PushProto.PushFromUserOrBuilder getPushFromUserOrBuilder() { + if (pushFromUserBuilder_ != null) { + return pushFromUserBuilder_.getMessageOrBuilder(); + } else { + return pushFromUser_ == null ? + com.akaxin.proto.core.PushProto.PushFromUser.getDefaultInstance() : pushFromUser_; + } + } + /** + *
+       *通知发送放
+       * 
+ * + * .core.PushFromUser push_from_user = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.PushProto.PushFromUser, com.akaxin.proto.core.PushProto.PushFromUser.Builder, com.akaxin.proto.core.PushProto.PushFromUserOrBuilder> + getPushFromUserFieldBuilder() { + if (pushFromUserBuilder_ == null) { + pushFromUserBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.PushProto.PushFromUser, com.akaxin.proto.core.PushProto.PushFromUser.Builder, com.akaxin.proto.core.PushProto.PushFromUserOrBuilder>( + getPushFromUser(), + getParentForChildren(), + isClean()); + pushFromUser_ = null; + } + return pushFromUserBuilder_; + } + + private java.util.List pushToUser_ = + java.util.Collections.emptyList(); + private void ensurePushToUserIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + pushToUser_ = new java.util.ArrayList(pushToUser_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.PushProto.PushToUser, com.akaxin.proto.core.PushProto.PushToUser.Builder, com.akaxin.proto.core.PushProto.PushToUserOrBuilder> pushToUserBuilder_; + + /** + *
+       *通知接受者
+       * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public java.util.List getPushToUserList() { + if (pushToUserBuilder_ == null) { + return java.util.Collections.unmodifiableList(pushToUser_); + } else { + return pushToUserBuilder_.getMessageList(); + } + } + /** + *
+       *通知接受者
+       * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public int getPushToUserCount() { + if (pushToUserBuilder_ == null) { + return pushToUser_.size(); + } else { + return pushToUserBuilder_.getCount(); + } + } + /** + *
+       *通知接受者
+       * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public com.akaxin.proto.core.PushProto.PushToUser getPushToUser(int index) { + if (pushToUserBuilder_ == null) { + return pushToUser_.get(index); + } else { + return pushToUserBuilder_.getMessage(index); + } + } + /** + *
+       *通知接受者
+       * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public Builder setPushToUser( + int index, com.akaxin.proto.core.PushProto.PushToUser value) { + if (pushToUserBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePushToUserIsMutable(); + pushToUser_.set(index, value); + onChanged(); + } else { + pushToUserBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *通知接受者
+       * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public Builder setPushToUser( + int index, com.akaxin.proto.core.PushProto.PushToUser.Builder builderForValue) { + if (pushToUserBuilder_ == null) { + ensurePushToUserIsMutable(); + pushToUser_.set(index, builderForValue.build()); + onChanged(); + } else { + pushToUserBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *通知接受者
+       * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public Builder addPushToUser(com.akaxin.proto.core.PushProto.PushToUser value) { + if (pushToUserBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePushToUserIsMutable(); + pushToUser_.add(value); + onChanged(); + } else { + pushToUserBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *通知接受者
+       * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public Builder addPushToUser( + int index, com.akaxin.proto.core.PushProto.PushToUser value) { + if (pushToUserBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePushToUserIsMutable(); + pushToUser_.add(index, value); + onChanged(); + } else { + pushToUserBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *通知接受者
+       * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public Builder addPushToUser( + com.akaxin.proto.core.PushProto.PushToUser.Builder builderForValue) { + if (pushToUserBuilder_ == null) { + ensurePushToUserIsMutable(); + pushToUser_.add(builderForValue.build()); + onChanged(); + } else { + pushToUserBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *通知接受者
+       * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public Builder addPushToUser( + int index, com.akaxin.proto.core.PushProto.PushToUser.Builder builderForValue) { + if (pushToUserBuilder_ == null) { + ensurePushToUserIsMutable(); + pushToUser_.add(index, builderForValue.build()); + onChanged(); + } else { + pushToUserBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *通知接受者
+       * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public Builder addAllPushToUser( + java.lang.Iterable values) { + if (pushToUserBuilder_ == null) { + ensurePushToUserIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pushToUser_); + onChanged(); + } else { + pushToUserBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *通知接受者
+       * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public Builder clearPushToUser() { + if (pushToUserBuilder_ == null) { + pushToUser_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + pushToUserBuilder_.clear(); + } + return this; + } + /** + *
+       *通知接受者
+       * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public Builder removePushToUser(int index) { + if (pushToUserBuilder_ == null) { + ensurePushToUserIsMutable(); + pushToUser_.remove(index); + onChanged(); + } else { + pushToUserBuilder_.remove(index); + } + return this; + } + /** + *
+       *通知接受者
+       * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public com.akaxin.proto.core.PushProto.PushToUser.Builder getPushToUserBuilder( + int index) { + return getPushToUserFieldBuilder().getBuilder(index); + } + /** + *
+       *通知接受者
+       * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public com.akaxin.proto.core.PushProto.PushToUserOrBuilder getPushToUserOrBuilder( + int index) { + if (pushToUserBuilder_ == null) { + return pushToUser_.get(index); } else { + return pushToUserBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *通知接受者
+       * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public java.util.List + getPushToUserOrBuilderList() { + if (pushToUserBuilder_ != null) { + return pushToUserBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pushToUser_); + } + } + /** + *
+       *通知接受者
+       * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public com.akaxin.proto.core.PushProto.PushToUser.Builder addPushToUserBuilder() { + return getPushToUserFieldBuilder().addBuilder( + com.akaxin.proto.core.PushProto.PushToUser.getDefaultInstance()); + } + /** + *
+       *通知接受者
+       * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public com.akaxin.proto.core.PushProto.PushToUser.Builder addPushToUserBuilder( + int index) { + return getPushToUserFieldBuilder().addBuilder( + index, com.akaxin.proto.core.PushProto.PushToUser.getDefaultInstance()); + } + /** + *
+       *通知接受者
+       * 
+ * + * repeated .core.PushToUser push_to_user = 4; + */ + public java.util.List + getPushToUserBuilderList() { + return getPushToUserFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.PushProto.PushToUser, com.akaxin.proto.core.PushProto.PushToUser.Builder, com.akaxin.proto.core.PushProto.PushToUserOrBuilder> + getPushToUserFieldBuilder() { + if (pushToUserBuilder_ == null) { + pushToUserBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.PushProto.PushToUser, com.akaxin.proto.core.PushProto.PushToUser.Builder, com.akaxin.proto.core.PushProto.PushToUserOrBuilder>( + pushToUser_, + ((bitField0_ & 0x00000008) == 0x00000008), + getParentForChildren(), + isClean()); + pushToUser_ = null; + } + return pushToUserBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:platform.ApiPushNotificationsRequest) + } + + // @@protoc_insertion_point(class_scope:platform.ApiPushNotificationsRequest) + private static final com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest(); + } + + public static com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiPushNotificationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiPushNotificationsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.platform.ApiPushNotificationsProto.ApiPushNotificationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_platform_ApiPushNotificationsRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_platform_ApiPushNotificationsRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n%platform/api_push_notifications.proto\022" + + "\010platform\032\017core/core.proto\032\017core/push.pr" + + "oto\"\300\001\n\033ApiPushNotificationsRequest\022!\n\tp" + + "ush_type\030\001 \001(\0162\016.core.PushType\022*\n\rnotifi" + + "cations\030\002 \001(\0132\023.core.Notifications\022*\n\016pu" + + "sh_from_user\030\003 \001(\0132\022.core.PushFromUser\022&" + + "\n\014push_to_user\030\004 \003(\0132\020.core.PushToUser2i" + + "\n\033ApiPushNotificationsService\022J\n\rnotific" + + "ations\022%.platform.ApiPushNotificationsRe" + + "quest\032\022.core.NoneResponseB6\n\031com.akaxin.", + "proto.platformB\031ApiPushNotificationsProt" + + "ob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.CoreProto.getDescriptor(), + com.akaxin.proto.core.PushProto.getDescriptor(), + }, assigner); + internal_static_platform_ApiPushNotificationsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_platform_ApiPushNotificationsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_platform_ApiPushNotificationsRequest_descriptor, + new java.lang.String[] { "PushType", "Notifications", "PushFromUser", "PushToUser", }); + com.akaxin.proto.core.CoreProto.getDescriptor(); + com.akaxin.proto.core.PushProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiFriendAddProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiFriendAddProto.java new file mode 100755 index 0000000..6da96a7 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiFriendAddProto.java @@ -0,0 +1,1206 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_friend_add.proto + +package com.akaxin.proto.plugin; + +public final class HaiFriendAddProto { + private HaiFriendAddProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiFriendAddRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiFriendAddRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 用户1
+     * 
+ * + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + *
+     * 用户1
+     * 
+ * + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     * 用户2
+     * 
+ * + * string friend_site_user_id = 2; + */ + java.lang.String getFriendSiteUserId(); + /** + *
+     * 用户2
+     * 
+ * + * string friend_site_user_id = 2; + */ + com.google.protobuf.ByteString + getFriendSiteUserIdBytes(); + } + /** + *
+   *### 功能
+   *添加A、B两人为好友
+   *### 接口名
+   * /hai/friend/add
+   *### 错误码
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiFriendAddRequest} + */ + public static final class HaiFriendAddRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiFriendAddRequest) + HaiFriendAddRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiFriendAddRequest.newBuilder() to construct. + private HaiFriendAddRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiFriendAddRequest() { + siteUserId_ = ""; + friendSiteUserId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiFriendAddRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + friendSiteUserId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiFriendAddProto.internal_static_plugin_HaiFriendAddRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiFriendAddProto.internal_static_plugin_HaiFriendAddRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest.class, com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + *
+     * 用户1
+     * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     * 用户1
+     * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FRIEND_SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object friendSiteUserId_; + /** + *
+     * 用户2
+     * 
+ * + * string friend_site_user_id = 2; + */ + public java.lang.String getFriendSiteUserId() { + java.lang.Object ref = friendSiteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + friendSiteUserId_ = s; + return s; + } + } + /** + *
+     * 用户2
+     * 
+ * + * string friend_site_user_id = 2; + */ + public com.google.protobuf.ByteString + getFriendSiteUserIdBytes() { + java.lang.Object ref = friendSiteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + friendSiteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + if (!getFriendSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, friendSiteUserId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + if (!getFriendSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, friendSiteUserId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest other = (com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getFriendSiteUserId() + .equals(other.getFriendSiteUserId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + FRIEND_SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getFriendSiteUserId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *### 功能
+     *添加A、B两人为好友
+     *### 接口名
+     * /hai/friend/add
+     *### 错误码
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiFriendAddRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiFriendAddRequest) + com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiFriendAddProto.internal_static_plugin_HaiFriendAddRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiFriendAddProto.internal_static_plugin_HaiFriendAddRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest.class, com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + friendSiteUserId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiFriendAddProto.internal_static_plugin_HaiFriendAddRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest build() { + com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest buildPartial() { + com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest result = new com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest(this); + result.siteUserId_ = siteUserId_; + result.friendSiteUserId_ = friendSiteUserId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest other) { + if (other == com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getFriendSiteUserId().isEmpty()) { + friendSiteUserId_ = other.friendSiteUserId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       * 用户1
+       * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * 用户1
+       * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * 用户1
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       * 用户1
+       * 
+ * + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       * 用户1
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object friendSiteUserId_ = ""; + /** + *
+       * 用户2
+       * 
+ * + * string friend_site_user_id = 2; + */ + public java.lang.String getFriendSiteUserId() { + java.lang.Object ref = friendSiteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + friendSiteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * 用户2
+       * 
+ * + * string friend_site_user_id = 2; + */ + public com.google.protobuf.ByteString + getFriendSiteUserIdBytes() { + java.lang.Object ref = friendSiteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + friendSiteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * 用户2
+       * 
+ * + * string friend_site_user_id = 2; + */ + public Builder setFriendSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + friendSiteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       * 用户2
+       * 
+ * + * string friend_site_user_id = 2; + */ + public Builder clearFriendSiteUserId() { + + friendSiteUserId_ = getDefaultInstance().getFriendSiteUserId(); + onChanged(); + return this; + } + /** + *
+       * 用户2
+       * 
+ * + * string friend_site_user_id = 2; + */ + public Builder setFriendSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + friendSiteUserId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiFriendAddRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiFriendAddRequest) + private static final com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest(); + } + + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiFriendAddRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiFriendAddRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiFriendAddResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiFriendAddResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code plugin.HaiFriendAddResponse} + */ + public static final class HaiFriendAddResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiFriendAddResponse) + HaiFriendAddResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiFriendAddResponse.newBuilder() to construct. + private HaiFriendAddResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiFriendAddResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiFriendAddResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiFriendAddProto.internal_static_plugin_HaiFriendAddResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiFriendAddProto.internal_static_plugin_HaiFriendAddResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse.class, com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse other = (com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiFriendAddResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiFriendAddResponse) + com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiFriendAddProto.internal_static_plugin_HaiFriendAddResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiFriendAddProto.internal_static_plugin_HaiFriendAddResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse.class, com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiFriendAddProto.internal_static_plugin_HaiFriendAddResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse build() { + com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse buildPartial() { + com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse result = new com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse other) { + if (other == com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiFriendAddResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiFriendAddResponse) + private static final com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse(); + } + + public static com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiFriendAddResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiFriendAddResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiFriendAddProto.HaiFriendAddResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiFriendAddRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiFriendAddRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiFriendAddResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiFriendAddResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033plugin/hai_friend_add.proto\022\006plugin\"H\n" + + "\023HaiFriendAddRequest\022\024\n\014site_user_id\030\001 \001" + + "(\t\022\033\n\023friend_site_user_id\030\002 \001(\t\"\026\n\024HaiFr" + + "iendAddResponse2W\n\023HaiFriendAddService\022@" + + "\n\003add\022\033.plugin.HaiFriendAddRequest\032\034.plu" + + "gin.HaiFriendAddResponseB,\n\027com.akaxin.p" + + "roto.pluginB\021HaiFriendAddProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_plugin_HaiFriendAddRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiFriendAddRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiFriendAddRequest_descriptor, + new java.lang.String[] { "SiteUserId", "FriendSiteUserId", }); + internal_static_plugin_HaiFriendAddResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiFriendAddResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiFriendAddResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiFriendApplyProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiFriendApplyProto.java new file mode 100755 index 0000000..3eb2c71 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiFriendApplyProto.java @@ -0,0 +1,1386 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_friend_apply.proto + +package com.akaxin.proto.plugin; + +public final class HaiFriendApplyProto { + private HaiFriendApplyProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiFriendApplyRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiFriendApplyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 发起好友请求的用户
+     * 
+ * + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + *
+     * 发起好友请求的用户
+     * 
+ * + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     * 目标用户
+     * 
+ * + * string friend_site_user_id = 2; + */ + java.lang.String getFriendSiteUserId(); + /** + *
+     * 目标用户
+     * 
+ * + * string friend_site_user_id = 2; + */ + com.google.protobuf.ByteString + getFriendSiteUserIdBytes(); + + /** + *
+     * 申请理由
+     * 
+ * + * string apply_reason = 3; + */ + java.lang.String getApplyReason(); + /** + *
+     * 申请理由
+     * 
+ * + * string apply_reason = 3; + */ + com.google.protobuf.ByteString + getApplyReasonBytes(); + } + /** + *
+   **
+   *A->B 发送好友请求
+   *----
+   *接口名
+   *----
+   * /hai/friend/apply
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiFriendApplyRequest} + */ + public static final class HaiFriendApplyRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiFriendApplyRequest) + HaiFriendApplyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiFriendApplyRequest.newBuilder() to construct. + private HaiFriendApplyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiFriendApplyRequest() { + siteUserId_ = ""; + friendSiteUserId_ = ""; + applyReason_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiFriendApplyRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + friendSiteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + applyReason_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiFriendApplyProto.internal_static_plugin_HaiFriendApplyRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiFriendApplyProto.internal_static_plugin_HaiFriendApplyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest.class, com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + *
+     * 发起好友请求的用户
+     * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     * 发起好友请求的用户
+     * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FRIEND_SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object friendSiteUserId_; + /** + *
+     * 目标用户
+     * 
+ * + * string friend_site_user_id = 2; + */ + public java.lang.String getFriendSiteUserId() { + java.lang.Object ref = friendSiteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + friendSiteUserId_ = s; + return s; + } + } + /** + *
+     * 目标用户
+     * 
+ * + * string friend_site_user_id = 2; + */ + public com.google.protobuf.ByteString + getFriendSiteUserIdBytes() { + java.lang.Object ref = friendSiteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + friendSiteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLY_REASON_FIELD_NUMBER = 3; + private volatile java.lang.Object applyReason_; + /** + *
+     * 申请理由
+     * 
+ * + * string apply_reason = 3; + */ + public java.lang.String getApplyReason() { + java.lang.Object ref = applyReason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applyReason_ = s; + return s; + } + } + /** + *
+     * 申请理由
+     * 
+ * + * string apply_reason = 3; + */ + public com.google.protobuf.ByteString + getApplyReasonBytes() { + java.lang.Object ref = applyReason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + applyReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + if (!getFriendSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, friendSiteUserId_); + } + if (!getApplyReasonBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, applyReason_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + if (!getFriendSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, friendSiteUserId_); + } + if (!getApplyReasonBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, applyReason_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest other = (com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getFriendSiteUserId() + .equals(other.getFriendSiteUserId()); + result = result && getApplyReason() + .equals(other.getApplyReason()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + FRIEND_SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getFriendSiteUserId().hashCode(); + hash = (37 * hash) + APPLY_REASON_FIELD_NUMBER; + hash = (53 * hash) + getApplyReason().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *A->B 发送好友请求
+     *----
+     *接口名
+     *----
+     * /hai/friend/apply
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiFriendApplyRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiFriendApplyRequest) + com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiFriendApplyProto.internal_static_plugin_HaiFriendApplyRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiFriendApplyProto.internal_static_plugin_HaiFriendApplyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest.class, com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + friendSiteUserId_ = ""; + + applyReason_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiFriendApplyProto.internal_static_plugin_HaiFriendApplyRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest build() { + com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest buildPartial() { + com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest result = new com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest(this); + result.siteUserId_ = siteUserId_; + result.friendSiteUserId_ = friendSiteUserId_; + result.applyReason_ = applyReason_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest other) { + if (other == com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getFriendSiteUserId().isEmpty()) { + friendSiteUserId_ = other.friendSiteUserId_; + onChanged(); + } + if (!other.getApplyReason().isEmpty()) { + applyReason_ = other.applyReason_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       * 发起好友请求的用户
+       * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * 发起好友请求的用户
+       * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * 发起好友请求的用户
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       * 发起好友请求的用户
+       * 
+ * + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       * 发起好友请求的用户
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object friendSiteUserId_ = ""; + /** + *
+       * 目标用户
+       * 
+ * + * string friend_site_user_id = 2; + */ + public java.lang.String getFriendSiteUserId() { + java.lang.Object ref = friendSiteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + friendSiteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * 目标用户
+       * 
+ * + * string friend_site_user_id = 2; + */ + public com.google.protobuf.ByteString + getFriendSiteUserIdBytes() { + java.lang.Object ref = friendSiteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + friendSiteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * 目标用户
+       * 
+ * + * string friend_site_user_id = 2; + */ + public Builder setFriendSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + friendSiteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       * 目标用户
+       * 
+ * + * string friend_site_user_id = 2; + */ + public Builder clearFriendSiteUserId() { + + friendSiteUserId_ = getDefaultInstance().getFriendSiteUserId(); + onChanged(); + return this; + } + /** + *
+       * 目标用户
+       * 
+ * + * string friend_site_user_id = 2; + */ + public Builder setFriendSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + friendSiteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object applyReason_ = ""; + /** + *
+       * 申请理由
+       * 
+ * + * string apply_reason = 3; + */ + public java.lang.String getApplyReason() { + java.lang.Object ref = applyReason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applyReason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * 申请理由
+       * 
+ * + * string apply_reason = 3; + */ + public com.google.protobuf.ByteString + getApplyReasonBytes() { + java.lang.Object ref = applyReason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + applyReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * 申请理由
+       * 
+ * + * string apply_reason = 3; + */ + public Builder setApplyReason( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + applyReason_ = value; + onChanged(); + return this; + } + /** + *
+       * 申请理由
+       * 
+ * + * string apply_reason = 3; + */ + public Builder clearApplyReason() { + + applyReason_ = getDefaultInstance().getApplyReason(); + onChanged(); + return this; + } + /** + *
+       * 申请理由
+       * 
+ * + * string apply_reason = 3; + */ + public Builder setApplyReasonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + applyReason_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiFriendApplyRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiFriendApplyRequest) + private static final com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest(); + } + + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiFriendApplyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiFriendApplyRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiFriendApplyResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiFriendApplyResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code plugin.HaiFriendApplyResponse} + */ + public static final class HaiFriendApplyResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiFriendApplyResponse) + HaiFriendApplyResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiFriendApplyResponse.newBuilder() to construct. + private HaiFriendApplyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiFriendApplyResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiFriendApplyResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiFriendApplyProto.internal_static_plugin_HaiFriendApplyResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiFriendApplyProto.internal_static_plugin_HaiFriendApplyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse.class, com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse other = (com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiFriendApplyResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiFriendApplyResponse) + com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiFriendApplyProto.internal_static_plugin_HaiFriendApplyResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiFriendApplyProto.internal_static_plugin_HaiFriendApplyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse.class, com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiFriendApplyProto.internal_static_plugin_HaiFriendApplyResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse build() { + com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse buildPartial() { + com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse result = new com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse other) { + if (other == com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiFriendApplyResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiFriendApplyResponse) + private static final com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse(); + } + + public static com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiFriendApplyResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiFriendApplyResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiFriendApplyProto.HaiFriendApplyResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiFriendApplyRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiFriendApplyRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiFriendApplyResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiFriendApplyResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\035plugin/hai_friend_apply.proto\022\006plugin\"" + + "`\n\025HaiFriendApplyRequest\022\024\n\014site_user_id" + + "\030\001 \001(\t\022\033\n\023friend_site_user_id\030\002 \001(\t\022\024\n\014a" + + "pply_reason\030\003 \001(\t\"\030\n\026HaiFriendApplyRespo" + + "nse2_\n\025HaiFriendApplyService\022F\n\005apply\022\035." + + "plugin.HaiFriendApplyRequest\032\036.plugin.Ha" + + "iFriendApplyResponseB.\n\027com.akaxin.proto" + + ".pluginB\023HaiFriendApplyProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_plugin_HaiFriendApplyRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiFriendApplyRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiFriendApplyRequest_descriptor, + new java.lang.String[] { "SiteUserId", "FriendSiteUserId", "ApplyReason", }); + internal_static_plugin_HaiFriendApplyResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiFriendApplyResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiFriendApplyResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiFriendRelationsProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiFriendRelationsProto.java new file mode 100755 index 0000000..38df36d --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiFriendRelationsProto.java @@ -0,0 +1,1752 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_friend_relations.proto + +package com.akaxin.proto.plugin; + +public final class HaiFriendRelationsProto { + private HaiFriendRelationsProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiFriendRelationsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiFriendRelationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *需要查询关系的用户ID
+     * 
+ * + * repeated string target_site_user_id = 2; + */ + java.util.List + getTargetSiteUserIdList(); + /** + *
+     *需要查询关系的用户ID
+     * 
+ * + * repeated string target_site_user_id = 2; + */ + int getTargetSiteUserIdCount(); + /** + *
+     *需要查询关系的用户ID
+     * 
+ * + * repeated string target_site_user_id = 2; + */ + java.lang.String getTargetSiteUserId(int index); + /** + *
+     *需要查询关系的用户ID
+     * 
+ * + * repeated string target_site_user_id = 2; + */ + com.google.protobuf.ByteString + getTargetSiteUserIdBytes(int index); + } + /** + *
+   **
+   *获取某用户与其他用户的好友关系
+   *----
+   *接口名
+   *----
+   * /hai/friend/relations
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiFriendRelationsRequest} + */ + public static final class HaiFriendRelationsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiFriendRelationsRequest) + HaiFriendRelationsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiFriendRelationsRequest.newBuilder() to construct. + private HaiFriendRelationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiFriendRelationsRequest() { + siteUserId_ = ""; + targetSiteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiFriendRelationsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + targetSiteUserId_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + targetSiteUserId_.add(s); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + targetSiteUserId_ = targetSiteUserId_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiFriendRelationsProto.internal_static_plugin_HaiFriendRelationsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiFriendRelationsProto.internal_static_plugin_HaiFriendRelationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest.class, com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest.Builder.class); + } + + private int bitField0_; + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_SITE_USER_ID_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList targetSiteUserId_; + /** + *
+     *需要查询关系的用户ID
+     * 
+ * + * repeated string target_site_user_id = 2; + */ + public com.google.protobuf.ProtocolStringList + getTargetSiteUserIdList() { + return targetSiteUserId_; + } + /** + *
+     *需要查询关系的用户ID
+     * 
+ * + * repeated string target_site_user_id = 2; + */ + public int getTargetSiteUserIdCount() { + return targetSiteUserId_.size(); + } + /** + *
+     *需要查询关系的用户ID
+     * 
+ * + * repeated string target_site_user_id = 2; + */ + public java.lang.String getTargetSiteUserId(int index) { + return targetSiteUserId_.get(index); + } + /** + *
+     *需要查询关系的用户ID
+     * 
+ * + * repeated string target_site_user_id = 2; + */ + public com.google.protobuf.ByteString + getTargetSiteUserIdBytes(int index) { + return targetSiteUserId_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + for (int i = 0; i < targetSiteUserId_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetSiteUserId_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + { + int dataSize = 0; + for (int i = 0; i < targetSiteUserId_.size(); i++) { + dataSize += computeStringSizeNoTag(targetSiteUserId_.getRaw(i)); + } + size += dataSize; + size += 1 * getTargetSiteUserIdList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest other = (com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getTargetSiteUserIdList() + .equals(other.getTargetSiteUserIdList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + if (getTargetSiteUserIdCount() > 0) { + hash = (37 * hash) + TARGET_SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getTargetSiteUserIdList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *获取某用户与其他用户的好友关系
+     *----
+     *接口名
+     *----
+     * /hai/friend/relations
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiFriendRelationsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiFriendRelationsRequest) + com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiFriendRelationsProto.internal_static_plugin_HaiFriendRelationsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiFriendRelationsProto.internal_static_plugin_HaiFriendRelationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest.class, com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + targetSiteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiFriendRelationsProto.internal_static_plugin_HaiFriendRelationsRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest build() { + com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest buildPartial() { + com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest result = new com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.siteUserId_ = siteUserId_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + targetSiteUserId_ = targetSiteUserId_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.targetSiteUserId_ = targetSiteUserId_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest other) { + if (other == com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.targetSiteUserId_.isEmpty()) { + if (targetSiteUserId_.isEmpty()) { + targetSiteUserId_ = other.targetSiteUserId_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTargetSiteUserIdIsMutable(); + targetSiteUserId_.addAll(other.targetSiteUserId_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object siteUserId_ = ""; + /** + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList targetSiteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTargetSiteUserIdIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + targetSiteUserId_ = new com.google.protobuf.LazyStringArrayList(targetSiteUserId_); + bitField0_ |= 0x00000002; + } + } + /** + *
+       *需要查询关系的用户ID
+       * 
+ * + * repeated string target_site_user_id = 2; + */ + public com.google.protobuf.ProtocolStringList + getTargetSiteUserIdList() { + return targetSiteUserId_.getUnmodifiableView(); + } + /** + *
+       *需要查询关系的用户ID
+       * 
+ * + * repeated string target_site_user_id = 2; + */ + public int getTargetSiteUserIdCount() { + return targetSiteUserId_.size(); + } + /** + *
+       *需要查询关系的用户ID
+       * 
+ * + * repeated string target_site_user_id = 2; + */ + public java.lang.String getTargetSiteUserId(int index) { + return targetSiteUserId_.get(index); + } + /** + *
+       *需要查询关系的用户ID
+       * 
+ * + * repeated string target_site_user_id = 2; + */ + public com.google.protobuf.ByteString + getTargetSiteUserIdBytes(int index) { + return targetSiteUserId_.getByteString(index); + } + /** + *
+       *需要查询关系的用户ID
+       * 
+ * + * repeated string target_site_user_id = 2; + */ + public Builder setTargetSiteUserId( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetSiteUserIdIsMutable(); + targetSiteUserId_.set(index, value); + onChanged(); + return this; + } + /** + *
+       *需要查询关系的用户ID
+       * 
+ * + * repeated string target_site_user_id = 2; + */ + public Builder addTargetSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetSiteUserIdIsMutable(); + targetSiteUserId_.add(value); + onChanged(); + return this; + } + /** + *
+       *需要查询关系的用户ID
+       * 
+ * + * repeated string target_site_user_id = 2; + */ + public Builder addAllTargetSiteUserId( + java.lang.Iterable values) { + ensureTargetSiteUserIdIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, targetSiteUserId_); + onChanged(); + return this; + } + /** + *
+       *需要查询关系的用户ID
+       * 
+ * + * repeated string target_site_user_id = 2; + */ + public Builder clearTargetSiteUserId() { + targetSiteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       *需要查询关系的用户ID
+       * 
+ * + * repeated string target_site_user_id = 2; + */ + public Builder addTargetSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTargetSiteUserIdIsMutable(); + targetSiteUserId_.add(value); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiFriendRelationsRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiFriendRelationsRequest) + private static final com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest(); + } + + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiFriendRelationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiFriendRelationsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiFriendRelationsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiFriendRelationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + java.util.List + getUserProfileList(); + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + com.akaxin.proto.core.UserProto.UserRelationProfile getUserProfile(int index); + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + int getUserProfileCount(); + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + java.util.List + getUserProfileOrBuilderList(); + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + com.akaxin.proto.core.UserProto.UserRelationProfileOrBuilder getUserProfileOrBuilder( + int index); + } + /** + * Protobuf type {@code plugin.HaiFriendRelationsResponse} + */ + public static final class HaiFriendRelationsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiFriendRelationsResponse) + HaiFriendRelationsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiFriendRelationsResponse.newBuilder() to construct. + private HaiFriendRelationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiFriendRelationsResponse() { + userProfile_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiFriendRelationsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + userProfile_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + userProfile_.add( + input.readMessage(com.akaxin.proto.core.UserProto.UserRelationProfile.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + userProfile_ = java.util.Collections.unmodifiableList(userProfile_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiFriendRelationsProto.internal_static_plugin_HaiFriendRelationsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiFriendRelationsProto.internal_static_plugin_HaiFriendRelationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse.class, com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse.Builder.class); + } + + public static final int USER_PROFILE_FIELD_NUMBER = 1; + private java.util.List userProfile_; + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public java.util.List getUserProfileList() { + return userProfile_; + } + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public java.util.List + getUserProfileOrBuilderList() { + return userProfile_; + } + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public int getUserProfileCount() { + return userProfile_.size(); + } + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserRelationProfile getUserProfile(int index) { + return userProfile_.get(index); + } + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserRelationProfileOrBuilder getUserProfileOrBuilder( + int index) { + return userProfile_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < userProfile_.size(); i++) { + output.writeMessage(1, userProfile_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < userProfile_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, userProfile_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse other = (com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse) obj; + + boolean result = true; + result = result && getUserProfileList() + .equals(other.getUserProfileList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getUserProfileCount() > 0) { + hash = (37 * hash) + USER_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getUserProfileList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiFriendRelationsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiFriendRelationsResponse) + com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiFriendRelationsProto.internal_static_plugin_HaiFriendRelationsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiFriendRelationsProto.internal_static_plugin_HaiFriendRelationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse.class, com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getUserProfileFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (userProfileBuilder_ == null) { + userProfile_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + userProfileBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiFriendRelationsProto.internal_static_plugin_HaiFriendRelationsResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse build() { + com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse buildPartial() { + com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse result = new com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse(this); + int from_bitField0_ = bitField0_; + if (userProfileBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + userProfile_ = java.util.Collections.unmodifiableList(userProfile_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.userProfile_ = userProfile_; + } else { + result.userProfile_ = userProfileBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse other) { + if (other == com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse.getDefaultInstance()) return this; + if (userProfileBuilder_ == null) { + if (!other.userProfile_.isEmpty()) { + if (userProfile_.isEmpty()) { + userProfile_ = other.userProfile_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUserProfileIsMutable(); + userProfile_.addAll(other.userProfile_); + } + onChanged(); + } + } else { + if (!other.userProfile_.isEmpty()) { + if (userProfileBuilder_.isEmpty()) { + userProfileBuilder_.dispose(); + userProfileBuilder_ = null; + userProfile_ = other.userProfile_; + bitField0_ = (bitField0_ & ~0x00000001); + userProfileBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getUserProfileFieldBuilder() : null; + } else { + userProfileBuilder_.addAllMessages(other.userProfile_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List userProfile_ = + java.util.Collections.emptyList(); + private void ensureUserProfileIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + userProfile_ = new java.util.ArrayList(userProfile_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserRelationProfile, com.akaxin.proto.core.UserProto.UserRelationProfile.Builder, com.akaxin.proto.core.UserProto.UserRelationProfileOrBuilder> userProfileBuilder_; + + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public java.util.List getUserProfileList() { + if (userProfileBuilder_ == null) { + return java.util.Collections.unmodifiableList(userProfile_); + } else { + return userProfileBuilder_.getMessageList(); + } + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public int getUserProfileCount() { + if (userProfileBuilder_ == null) { + return userProfile_.size(); + } else { + return userProfileBuilder_.getCount(); + } + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserRelationProfile getUserProfile(int index) { + if (userProfileBuilder_ == null) { + return userProfile_.get(index); + } else { + return userProfileBuilder_.getMessage(index); + } + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public Builder setUserProfile( + int index, com.akaxin.proto.core.UserProto.UserRelationProfile value) { + if (userProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserProfileIsMutable(); + userProfile_.set(index, value); + onChanged(); + } else { + userProfileBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public Builder setUserProfile( + int index, com.akaxin.proto.core.UserProto.UserRelationProfile.Builder builderForValue) { + if (userProfileBuilder_ == null) { + ensureUserProfileIsMutable(); + userProfile_.set(index, builderForValue.build()); + onChanged(); + } else { + userProfileBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public Builder addUserProfile(com.akaxin.proto.core.UserProto.UserRelationProfile value) { + if (userProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserProfileIsMutable(); + userProfile_.add(value); + onChanged(); + } else { + userProfileBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public Builder addUserProfile( + int index, com.akaxin.proto.core.UserProto.UserRelationProfile value) { + if (userProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserProfileIsMutable(); + userProfile_.add(index, value); + onChanged(); + } else { + userProfileBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public Builder addUserProfile( + com.akaxin.proto.core.UserProto.UserRelationProfile.Builder builderForValue) { + if (userProfileBuilder_ == null) { + ensureUserProfileIsMutable(); + userProfile_.add(builderForValue.build()); + onChanged(); + } else { + userProfileBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public Builder addUserProfile( + int index, com.akaxin.proto.core.UserProto.UserRelationProfile.Builder builderForValue) { + if (userProfileBuilder_ == null) { + ensureUserProfileIsMutable(); + userProfile_.add(index, builderForValue.build()); + onChanged(); + } else { + userProfileBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public Builder addAllUserProfile( + java.lang.Iterable values) { + if (userProfileBuilder_ == null) { + ensureUserProfileIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, userProfile_); + onChanged(); + } else { + userProfileBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public Builder clearUserProfile() { + if (userProfileBuilder_ == null) { + userProfile_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + userProfileBuilder_.clear(); + } + return this; + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public Builder removeUserProfile(int index) { + if (userProfileBuilder_ == null) { + ensureUserProfileIsMutable(); + userProfile_.remove(index); + onChanged(); + } else { + userProfileBuilder_.remove(index); + } + return this; + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserRelationProfile.Builder getUserProfileBuilder( + int index) { + return getUserProfileFieldBuilder().getBuilder(index); + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserRelationProfileOrBuilder getUserProfileOrBuilder( + int index) { + if (userProfileBuilder_ == null) { + return userProfile_.get(index); } else { + return userProfileBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public java.util.List + getUserProfileOrBuilderList() { + if (userProfileBuilder_ != null) { + return userProfileBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(userProfile_); + } + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserRelationProfile.Builder addUserProfileBuilder() { + return getUserProfileFieldBuilder().addBuilder( + com.akaxin.proto.core.UserProto.UserRelationProfile.getDefaultInstance()); + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserRelationProfile.Builder addUserProfileBuilder( + int index) { + return getUserProfileFieldBuilder().addBuilder( + index, com.akaxin.proto.core.UserProto.UserRelationProfile.getDefaultInstance()); + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.UserRelationProfile user_profile = 1; + */ + public java.util.List + getUserProfileBuilderList() { + return getUserProfileFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserRelationProfile, com.akaxin.proto.core.UserProto.UserRelationProfile.Builder, com.akaxin.proto.core.UserProto.UserRelationProfileOrBuilder> + getUserProfileFieldBuilder() { + if (userProfileBuilder_ == null) { + userProfileBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserRelationProfile, com.akaxin.proto.core.UserProto.UserRelationProfile.Builder, com.akaxin.proto.core.UserProto.UserRelationProfileOrBuilder>( + userProfile_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + userProfile_ = null; + } + return userProfileBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiFriendRelationsResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiFriendRelationsResponse) + private static final com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse(); + } + + public static com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiFriendRelationsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiFriendRelationsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiFriendRelationsProto.HaiFriendRelationsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiFriendRelationsRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiFriendRelationsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiFriendRelationsResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiFriendRelationsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n!plugin/hai_friend_relations.proto\022\006plu" + + "gin\032\017core/user.proto\"N\n\031HaiFriendRelatio" + + "nsRequest\022\024\n\014site_user_id\030\001 \001(\t\022\033\n\023targe" + + "t_site_user_id\030\002 \003(\t\"M\n\032HaiFriendRelatio" + + "nsResponse\022/\n\014user_profile\030\001 \003(\0132\031.core." + + "UserRelationProfile2o\n\031HaiFriendRelation" + + "sService\022R\n\trelations\022!.plugin.HaiFriend" + + "RelationsRequest\032\".plugin.HaiFriendRelat" + + "ionsResponseB2\n\027com.akaxin.proto.pluginB" + + "\027HaiFriendRelationsProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.UserProto.getDescriptor(), + }, assigner); + internal_static_plugin_HaiFriendRelationsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiFriendRelationsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiFriendRelationsRequest_descriptor, + new java.lang.String[] { "SiteUserId", "TargetSiteUserId", }); + internal_static_plugin_HaiFriendRelationsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiFriendRelationsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiFriendRelationsResponse_descriptor, + new java.lang.String[] { "UserProfile", }); + com.akaxin.proto.core.UserProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupAddMemberProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupAddMemberProto.java new file mode 100755 index 0000000..d4e1ee5 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupAddMemberProto.java @@ -0,0 +1,1304 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_group_addMember.proto + +package com.akaxin.proto.plugin; + +public final class HaiGroupAddMemberProto { + private HaiGroupAddMemberProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiGroupAddMemberRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiGroupAddMemberRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + java.lang.String getGroupId(); + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+     *群组中需要增加的用户ID
+     * 
+ * + * repeated string member_site_user_id = 2; + */ + java.util.List + getMemberSiteUserIdList(); + /** + *
+     *群组中需要增加的用户ID
+     * 
+ * + * repeated string member_site_user_id = 2; + */ + int getMemberSiteUserIdCount(); + /** + *
+     *群组中需要增加的用户ID
+     * 
+ * + * repeated string member_site_user_id = 2; + */ + java.lang.String getMemberSiteUserId(int index); + /** + *
+     *群组中需要增加的用户ID
+     * 
+ * + * repeated string member_site_user_id = 2; + */ + com.google.protobuf.ByteString + getMemberSiteUserIdBytes(int index); + } + /** + *
+   **
+   *向群里添加群成员
+   *----
+   *> 如果此人已在群里,返回成功而不是失败
+   *接口名
+   *----
+   * /hai/group/addMember
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiGroupAddMemberRequest} + */ + public static final class HaiGroupAddMemberRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiGroupAddMemberRequest) + HaiGroupAddMemberRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiGroupAddMemberRequest.newBuilder() to construct. + private HaiGroupAddMemberRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiGroupAddMemberRequest() { + groupId_ = ""; + memberSiteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiGroupAddMemberRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + groupId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + memberSiteUserId_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + memberSiteUserId_.add(s); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + memberSiteUserId_ = memberSiteUserId_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupAddMemberProto.internal_static_plugin_HaiGroupAddMemberRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupAddMemberProto.internal_static_plugin_HaiGroupAddMemberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest.class, com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest.Builder.class); + } + + private int bitField0_; + public static final int GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object groupId_; + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEMBER_SITE_USER_ID_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList memberSiteUserId_; + /** + *
+     *群组中需要增加的用户ID
+     * 
+ * + * repeated string member_site_user_id = 2; + */ + public com.google.protobuf.ProtocolStringList + getMemberSiteUserIdList() { + return memberSiteUserId_; + } + /** + *
+     *群组中需要增加的用户ID
+     * 
+ * + * repeated string member_site_user_id = 2; + */ + public int getMemberSiteUserIdCount() { + return memberSiteUserId_.size(); + } + /** + *
+     *群组中需要增加的用户ID
+     * 
+ * + * repeated string member_site_user_id = 2; + */ + public java.lang.String getMemberSiteUserId(int index) { + return memberSiteUserId_.get(index); + } + /** + *
+     *群组中需要增加的用户ID
+     * 
+ * + * repeated string member_site_user_id = 2; + */ + public com.google.protobuf.ByteString + getMemberSiteUserIdBytes(int index) { + return memberSiteUserId_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupId_); + } + for (int i = 0; i < memberSiteUserId_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, memberSiteUserId_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupId_); + } + { + int dataSize = 0; + for (int i = 0; i < memberSiteUserId_.size(); i++) { + dataSize += computeStringSizeNoTag(memberSiteUserId_.getRaw(i)); + } + size += dataSize; + size += 1 * getMemberSiteUserIdList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest other = (com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest) obj; + + boolean result = true; + result = result && getGroupId() + .equals(other.getGroupId()); + result = result && getMemberSiteUserIdList() + .equals(other.getMemberSiteUserIdList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + if (getMemberSiteUserIdCount() > 0) { + hash = (37 * hash) + MEMBER_SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getMemberSiteUserIdList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *向群里添加群成员
+     *----
+     *> 如果此人已在群里,返回成功而不是失败
+     *接口名
+     *----
+     * /hai/group/addMember
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiGroupAddMemberRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiGroupAddMemberRequest) + com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupAddMemberProto.internal_static_plugin_HaiGroupAddMemberRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupAddMemberProto.internal_static_plugin_HaiGroupAddMemberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest.class, com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + groupId_ = ""; + + memberSiteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiGroupAddMemberProto.internal_static_plugin_HaiGroupAddMemberRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest build() { + com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest buildPartial() { + com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest result = new com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.groupId_ = groupId_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + memberSiteUserId_ = memberSiteUserId_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.memberSiteUserId_ = memberSiteUserId_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest other) { + if (other == com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + onChanged(); + } + if (!other.memberSiteUserId_.isEmpty()) { + if (memberSiteUserId_.isEmpty()) { + memberSiteUserId_ = other.memberSiteUserId_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMemberSiteUserIdIsMutable(); + memberSiteUserId_.addAll(other.memberSiteUserId_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object groupId_ = ""; + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupId_ = value; + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder clearGroupId() { + + groupId_ = getDefaultInstance().getGroupId(); + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList memberSiteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureMemberSiteUserIdIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + memberSiteUserId_ = new com.google.protobuf.LazyStringArrayList(memberSiteUserId_); + bitField0_ |= 0x00000002; + } + } + /** + *
+       *群组中需要增加的用户ID
+       * 
+ * + * repeated string member_site_user_id = 2; + */ + public com.google.protobuf.ProtocolStringList + getMemberSiteUserIdList() { + return memberSiteUserId_.getUnmodifiableView(); + } + /** + *
+       *群组中需要增加的用户ID
+       * 
+ * + * repeated string member_site_user_id = 2; + */ + public int getMemberSiteUserIdCount() { + return memberSiteUserId_.size(); + } + /** + *
+       *群组中需要增加的用户ID
+       * 
+ * + * repeated string member_site_user_id = 2; + */ + public java.lang.String getMemberSiteUserId(int index) { + return memberSiteUserId_.get(index); + } + /** + *
+       *群组中需要增加的用户ID
+       * 
+ * + * repeated string member_site_user_id = 2; + */ + public com.google.protobuf.ByteString + getMemberSiteUserIdBytes(int index) { + return memberSiteUserId_.getByteString(index); + } + /** + *
+       *群组中需要增加的用户ID
+       * 
+ * + * repeated string member_site_user_id = 2; + */ + public Builder setMemberSiteUserId( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMemberSiteUserIdIsMutable(); + memberSiteUserId_.set(index, value); + onChanged(); + return this; + } + /** + *
+       *群组中需要增加的用户ID
+       * 
+ * + * repeated string member_site_user_id = 2; + */ + public Builder addMemberSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMemberSiteUserIdIsMutable(); + memberSiteUserId_.add(value); + onChanged(); + return this; + } + /** + *
+       *群组中需要增加的用户ID
+       * 
+ * + * repeated string member_site_user_id = 2; + */ + public Builder addAllMemberSiteUserId( + java.lang.Iterable values) { + ensureMemberSiteUserIdIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, memberSiteUserId_); + onChanged(); + return this; + } + /** + *
+       *群组中需要增加的用户ID
+       * 
+ * + * repeated string member_site_user_id = 2; + */ + public Builder clearMemberSiteUserId() { + memberSiteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       *群组中需要增加的用户ID
+       * 
+ * + * repeated string member_site_user_id = 2; + */ + public Builder addMemberSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureMemberSiteUserIdIsMutable(); + memberSiteUserId_.add(value); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiGroupAddMemberRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiGroupAddMemberRequest) + private static final com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest(); + } + + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiGroupAddMemberRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiGroupAddMemberRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiGroupAddMemberResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiGroupAddMemberResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code plugin.HaiGroupAddMemberResponse} + */ + public static final class HaiGroupAddMemberResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiGroupAddMemberResponse) + HaiGroupAddMemberResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiGroupAddMemberResponse.newBuilder() to construct. + private HaiGroupAddMemberResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiGroupAddMemberResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiGroupAddMemberResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupAddMemberProto.internal_static_plugin_HaiGroupAddMemberResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupAddMemberProto.internal_static_plugin_HaiGroupAddMemberResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse.class, com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse other = (com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiGroupAddMemberResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiGroupAddMemberResponse) + com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupAddMemberProto.internal_static_plugin_HaiGroupAddMemberResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupAddMemberProto.internal_static_plugin_HaiGroupAddMemberResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse.class, com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiGroupAddMemberProto.internal_static_plugin_HaiGroupAddMemberResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse build() { + com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse buildPartial() { + com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse result = new com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse other) { + if (other == com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiGroupAddMemberResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiGroupAddMemberResponse) + private static final com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse(); + } + + public static com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiGroupAddMemberResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiGroupAddMemberResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiGroupAddMemberProto.HaiGroupAddMemberResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiGroupAddMemberRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiGroupAddMemberRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiGroupAddMemberResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiGroupAddMemberResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n plugin/hai_group_addMember.proto\022\006plug" + + "in\"I\n\030HaiGroupAddMemberRequest\022\020\n\010group_" + + "id\030\001 \001(\t\022\033\n\023member_site_user_id\030\002 \003(\t\"\033\n" + + "\031HaiGroupAddMemberResponse2l\n\030HaiGroupAd" + + "dMemberService\022P\n\taddMember\022 .plugin.Hai" + + "GroupAddMemberRequest\032!.plugin.HaiGroupA" + + "ddMemberResponseB1\n\027com.akaxin.proto.plu" + + "ginB\026HaiGroupAddMemberProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_plugin_HaiGroupAddMemberRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiGroupAddMemberRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiGroupAddMemberRequest_descriptor, + new java.lang.String[] { "GroupId", "MemberSiteUserId", }); + internal_static_plugin_HaiGroupAddMemberResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiGroupAddMemberResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiGroupAddMemberResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupCheckMemberProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupCheckMemberProto.java new file mode 100755 index 0000000..9814eef --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupCheckMemberProto.java @@ -0,0 +1,1563 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_group_checkMember.proto + +package com.akaxin.proto.plugin; + +public final class HaiGroupCheckMemberProto { + private HaiGroupCheckMemberProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiGroupCheckMemberRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiGroupCheckMemberRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + java.lang.String getGroupId(); + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+     * 待检查的成员id
+     * 
+ * + * repeated string site_user_id = 2; + */ + java.util.List + getSiteUserIdList(); + /** + *
+     * 待检查的成员id
+     * 
+ * + * repeated string site_user_id = 2; + */ + int getSiteUserIdCount(); + /** + *
+     * 待检查的成员id
+     * 
+ * + * repeated string site_user_id = 2; + */ + java.lang.String getSiteUserId(int index); + /** + *
+     * 待检查的成员id
+     * 
+ * + * repeated string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(int index); + } + /** + *
+   **
+   *检查用户是否在某群里
+   *----
+   *接口名
+   *----
+   * /hai/group/checkMember
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiGroupCheckMemberRequest} + */ + public static final class HaiGroupCheckMemberRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiGroupCheckMemberRequest) + HaiGroupCheckMemberRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiGroupCheckMemberRequest.newBuilder() to construct. + private HaiGroupCheckMemberRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiGroupCheckMemberRequest() { + groupId_ = ""; + siteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiGroupCheckMemberRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + groupId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + siteUserId_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + siteUserId_.add(s); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + siteUserId_ = siteUserId_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupCheckMemberProto.internal_static_plugin_HaiGroupCheckMemberRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupCheckMemberProto.internal_static_plugin_HaiGroupCheckMemberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest.class, com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest.Builder.class); + } + + private int bitField0_; + public static final int GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object groupId_; + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList siteUserId_; + /** + *
+     * 待检查的成员id
+     * 
+ * + * repeated string site_user_id = 2; + */ + public com.google.protobuf.ProtocolStringList + getSiteUserIdList() { + return siteUserId_; + } + /** + *
+     * 待检查的成员id
+     * 
+ * + * repeated string site_user_id = 2; + */ + public int getSiteUserIdCount() { + return siteUserId_.size(); + } + /** + *
+     * 待检查的成员id
+     * 
+ * + * repeated string site_user_id = 2; + */ + public java.lang.String getSiteUserId(int index) { + return siteUserId_.get(index); + } + /** + *
+     * 待检查的成员id
+     * 
+ * + * repeated string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes(int index) { + return siteUserId_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupId_); + } + for (int i = 0; i < siteUserId_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupId_); + } + { + int dataSize = 0; + for (int i = 0; i < siteUserId_.size(); i++) { + dataSize += computeStringSizeNoTag(siteUserId_.getRaw(i)); + } + size += dataSize; + size += 1 * getSiteUserIdList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest other = (com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest) obj; + + boolean result = true; + result = result && getGroupId() + .equals(other.getGroupId()); + result = result && getSiteUserIdList() + .equals(other.getSiteUserIdList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + if (getSiteUserIdCount() > 0) { + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserIdList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *检查用户是否在某群里
+     *----
+     *接口名
+     *----
+     * /hai/group/checkMember
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiGroupCheckMemberRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiGroupCheckMemberRequest) + com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupCheckMemberProto.internal_static_plugin_HaiGroupCheckMemberRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupCheckMemberProto.internal_static_plugin_HaiGroupCheckMemberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest.class, com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + groupId_ = ""; + + siteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiGroupCheckMemberProto.internal_static_plugin_HaiGroupCheckMemberRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest build() { + com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest buildPartial() { + com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest result = new com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.groupId_ = groupId_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + siteUserId_ = siteUserId_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.siteUserId_ = siteUserId_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest other) { + if (other == com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + onChanged(); + } + if (!other.siteUserId_.isEmpty()) { + if (siteUserId_.isEmpty()) { + siteUserId_ = other.siteUserId_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSiteUserIdIsMutable(); + siteUserId_.addAll(other.siteUserId_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object groupId_ = ""; + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupId_ = value; + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder clearGroupId() { + + groupId_ = getDefaultInstance().getGroupId(); + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList siteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureSiteUserIdIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + siteUserId_ = new com.google.protobuf.LazyStringArrayList(siteUserId_); + bitField0_ |= 0x00000002; + } + } + /** + *
+       * 待检查的成员id
+       * 
+ * + * repeated string site_user_id = 2; + */ + public com.google.protobuf.ProtocolStringList + getSiteUserIdList() { + return siteUserId_.getUnmodifiableView(); + } + /** + *
+       * 待检查的成员id
+       * 
+ * + * repeated string site_user_id = 2; + */ + public int getSiteUserIdCount() { + return siteUserId_.size(); + } + /** + *
+       * 待检查的成员id
+       * 
+ * + * repeated string site_user_id = 2; + */ + public java.lang.String getSiteUserId(int index) { + return siteUserId_.get(index); + } + /** + *
+       * 待检查的成员id
+       * 
+ * + * repeated string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes(int index) { + return siteUserId_.getByteString(index); + } + /** + *
+       * 待检查的成员id
+       * 
+ * + * repeated string site_user_id = 2; + */ + public Builder setSiteUserId( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSiteUserIdIsMutable(); + siteUserId_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * 待检查的成员id
+       * 
+ * + * repeated string site_user_id = 2; + */ + public Builder addSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSiteUserIdIsMutable(); + siteUserId_.add(value); + onChanged(); + return this; + } + /** + *
+       * 待检查的成员id
+       * 
+ * + * repeated string site_user_id = 2; + */ + public Builder addAllSiteUserId( + java.lang.Iterable values) { + ensureSiteUserIdIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, siteUserId_); + onChanged(); + return this; + } + /** + *
+       * 待检查的成员id
+       * 
+ * + * repeated string site_user_id = 2; + */ + public Builder clearSiteUserId() { + siteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * 待检查的成员id
+       * 
+ * + * repeated string site_user_id = 2; + */ + public Builder addSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSiteUserIdIsMutable(); + siteUserId_.add(value); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiGroupCheckMemberRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiGroupCheckMemberRequest) + private static final com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest(); + } + + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiGroupCheckMemberRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiGroupCheckMemberRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiGroupCheckMemberResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiGroupCheckMemberResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 请求在这个群里的成员( 肯定是request参数的子集 )
+     * 
+ * + * repeated string members_site_user_id = 1; + */ + java.util.List + getMembersSiteUserIdList(); + /** + *
+     * 请求在这个群里的成员( 肯定是request参数的子集 )
+     * 
+ * + * repeated string members_site_user_id = 1; + */ + int getMembersSiteUserIdCount(); + /** + *
+     * 请求在这个群里的成员( 肯定是request参数的子集 )
+     * 
+ * + * repeated string members_site_user_id = 1; + */ + java.lang.String getMembersSiteUserId(int index); + /** + *
+     * 请求在这个群里的成员( 肯定是request参数的子集 )
+     * 
+ * + * repeated string members_site_user_id = 1; + */ + com.google.protobuf.ByteString + getMembersSiteUserIdBytes(int index); + } + /** + * Protobuf type {@code plugin.HaiGroupCheckMemberResponse} + */ + public static final class HaiGroupCheckMemberResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiGroupCheckMemberResponse) + HaiGroupCheckMemberResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiGroupCheckMemberResponse.newBuilder() to construct. + private HaiGroupCheckMemberResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiGroupCheckMemberResponse() { + membersSiteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiGroupCheckMemberResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + membersSiteUserId_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + membersSiteUserId_.add(s); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + membersSiteUserId_ = membersSiteUserId_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupCheckMemberProto.internal_static_plugin_HaiGroupCheckMemberResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupCheckMemberProto.internal_static_plugin_HaiGroupCheckMemberResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse.class, com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse.Builder.class); + } + + public static final int MEMBERS_SITE_USER_ID_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList membersSiteUserId_; + /** + *
+     * 请求在这个群里的成员( 肯定是request参数的子集 )
+     * 
+ * + * repeated string members_site_user_id = 1; + */ + public com.google.protobuf.ProtocolStringList + getMembersSiteUserIdList() { + return membersSiteUserId_; + } + /** + *
+     * 请求在这个群里的成员( 肯定是request参数的子集 )
+     * 
+ * + * repeated string members_site_user_id = 1; + */ + public int getMembersSiteUserIdCount() { + return membersSiteUserId_.size(); + } + /** + *
+     * 请求在这个群里的成员( 肯定是request参数的子集 )
+     * 
+ * + * repeated string members_site_user_id = 1; + */ + public java.lang.String getMembersSiteUserId(int index) { + return membersSiteUserId_.get(index); + } + /** + *
+     * 请求在这个群里的成员( 肯定是request参数的子集 )
+     * 
+ * + * repeated string members_site_user_id = 1; + */ + public com.google.protobuf.ByteString + getMembersSiteUserIdBytes(int index) { + return membersSiteUserId_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < membersSiteUserId_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, membersSiteUserId_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < membersSiteUserId_.size(); i++) { + dataSize += computeStringSizeNoTag(membersSiteUserId_.getRaw(i)); + } + size += dataSize; + size += 1 * getMembersSiteUserIdList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse other = (com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse) obj; + + boolean result = true; + result = result && getMembersSiteUserIdList() + .equals(other.getMembersSiteUserIdList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMembersSiteUserIdCount() > 0) { + hash = (37 * hash) + MEMBERS_SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getMembersSiteUserIdList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiGroupCheckMemberResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiGroupCheckMemberResponse) + com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupCheckMemberProto.internal_static_plugin_HaiGroupCheckMemberResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupCheckMemberProto.internal_static_plugin_HaiGroupCheckMemberResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse.class, com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + membersSiteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiGroupCheckMemberProto.internal_static_plugin_HaiGroupCheckMemberResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse build() { + com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse buildPartial() { + com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse result = new com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + membersSiteUserId_ = membersSiteUserId_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.membersSiteUserId_ = membersSiteUserId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse other) { + if (other == com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse.getDefaultInstance()) return this; + if (!other.membersSiteUserId_.isEmpty()) { + if (membersSiteUserId_.isEmpty()) { + membersSiteUserId_ = other.membersSiteUserId_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMembersSiteUserIdIsMutable(); + membersSiteUserId_.addAll(other.membersSiteUserId_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList membersSiteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureMembersSiteUserIdIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + membersSiteUserId_ = new com.google.protobuf.LazyStringArrayList(membersSiteUserId_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * 请求在这个群里的成员( 肯定是request参数的子集 )
+       * 
+ * + * repeated string members_site_user_id = 1; + */ + public com.google.protobuf.ProtocolStringList + getMembersSiteUserIdList() { + return membersSiteUserId_.getUnmodifiableView(); + } + /** + *
+       * 请求在这个群里的成员( 肯定是request参数的子集 )
+       * 
+ * + * repeated string members_site_user_id = 1; + */ + public int getMembersSiteUserIdCount() { + return membersSiteUserId_.size(); + } + /** + *
+       * 请求在这个群里的成员( 肯定是request参数的子集 )
+       * 
+ * + * repeated string members_site_user_id = 1; + */ + public java.lang.String getMembersSiteUserId(int index) { + return membersSiteUserId_.get(index); + } + /** + *
+       * 请求在这个群里的成员( 肯定是request参数的子集 )
+       * 
+ * + * repeated string members_site_user_id = 1; + */ + public com.google.protobuf.ByteString + getMembersSiteUserIdBytes(int index) { + return membersSiteUserId_.getByteString(index); + } + /** + *
+       * 请求在这个群里的成员( 肯定是request参数的子集 )
+       * 
+ * + * repeated string members_site_user_id = 1; + */ + public Builder setMembersSiteUserId( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMembersSiteUserIdIsMutable(); + membersSiteUserId_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * 请求在这个群里的成员( 肯定是request参数的子集 )
+       * 
+ * + * repeated string members_site_user_id = 1; + */ + public Builder addMembersSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMembersSiteUserIdIsMutable(); + membersSiteUserId_.add(value); + onChanged(); + return this; + } + /** + *
+       * 请求在这个群里的成员( 肯定是request参数的子集 )
+       * 
+ * + * repeated string members_site_user_id = 1; + */ + public Builder addAllMembersSiteUserId( + java.lang.Iterable values) { + ensureMembersSiteUserIdIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, membersSiteUserId_); + onChanged(); + return this; + } + /** + *
+       * 请求在这个群里的成员( 肯定是request参数的子集 )
+       * 
+ * + * repeated string members_site_user_id = 1; + */ + public Builder clearMembersSiteUserId() { + membersSiteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * 请求在这个群里的成员( 肯定是request参数的子集 )
+       * 
+ * + * repeated string members_site_user_id = 1; + */ + public Builder addMembersSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureMembersSiteUserIdIsMutable(); + membersSiteUserId_.add(value); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiGroupCheckMemberResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiGroupCheckMemberResponse) + private static final com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse(); + } + + public static com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiGroupCheckMemberResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiGroupCheckMemberResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiGroupCheckMemberProto.HaiGroupCheckMemberResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiGroupCheckMemberRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiGroupCheckMemberRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiGroupCheckMemberResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiGroupCheckMemberResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\"plugin/hai_group_checkMember.proto\022\006pl" + + "ugin\"D\n\032HaiGroupCheckMemberRequest\022\020\n\010gr" + + "oup_id\030\001 \001(\t\022\024\n\014site_user_id\030\002 \003(\t\";\n\033Ha" + + "iGroupCheckMemberResponse\022\034\n\024members_sit" + + "e_user_id\030\001 \003(\t2t\n\032HaiGroupCheckMemberSe" + + "rvice\022V\n\013checkMember\022\".plugin.HaiGroupCh" + + "eckMemberRequest\032#.plugin.HaiGroupCheckM" + + "emberResponseB3\n\027com.akaxin.proto.plugin" + + "B\030HaiGroupCheckMemberProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_plugin_HaiGroupCheckMemberRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiGroupCheckMemberRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiGroupCheckMemberRequest_descriptor, + new java.lang.String[] { "GroupId", "SiteUserId", }); + internal_static_plugin_HaiGroupCheckMemberResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiGroupCheckMemberResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiGroupCheckMemberResponse_descriptor, + new java.lang.String[] { "MembersSiteUserId", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupDeleteProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupDeleteProto.java new file mode 100755 index 0000000..a37c125 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupDeleteProto.java @@ -0,0 +1,1039 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_group_delete.proto + +package com.akaxin.proto.plugin; + +public final class HaiGroupDeleteProto { + private HaiGroupDeleteProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiGroupDeleteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiGroupDeleteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *删除的群组ID
+     * 
+ * + * string group_id = 1; + */ + java.lang.String getGroupId(); + /** + *
+     *删除的群组ID
+     * 
+ * + * string group_id = 1; + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + } + /** + *
+   **
+   *删除群组
+   *----
+   *接口名
+   *----
+   * /hai/group/delete
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiGroupDeleteRequest} + */ + public static final class HaiGroupDeleteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiGroupDeleteRequest) + HaiGroupDeleteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiGroupDeleteRequest.newBuilder() to construct. + private HaiGroupDeleteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiGroupDeleteRequest() { + groupId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiGroupDeleteRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + groupId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupDeleteProto.internal_static_plugin_HaiGroupDeleteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupDeleteProto.internal_static_plugin_HaiGroupDeleteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest.class, com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object groupId_; + /** + *
+     *删除的群组ID
+     * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+     *删除的群组ID
+     * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest other = (com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest) obj; + + boolean result = true; + result = result && getGroupId() + .equals(other.getGroupId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *删除群组
+     *----
+     *接口名
+     *----
+     * /hai/group/delete
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiGroupDeleteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiGroupDeleteRequest) + com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupDeleteProto.internal_static_plugin_HaiGroupDeleteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupDeleteProto.internal_static_plugin_HaiGroupDeleteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest.class, com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + groupId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiGroupDeleteProto.internal_static_plugin_HaiGroupDeleteRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest build() { + com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest buildPartial() { + com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest result = new com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest(this); + result.groupId_ = groupId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest other) { + if (other == com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object groupId_ = ""; + /** + *
+       *删除的群组ID
+       * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *删除的群组ID
+       * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *删除的群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupId_ = value; + onChanged(); + return this; + } + /** + *
+       *删除的群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder clearGroupId() { + + groupId_ = getDefaultInstance().getGroupId(); + onChanged(); + return this; + } + /** + *
+       *删除的群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiGroupDeleteRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiGroupDeleteRequest) + private static final com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest(); + } + + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiGroupDeleteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiGroupDeleteRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiGroupDeleteResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiGroupDeleteResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code plugin.HaiGroupDeleteResponse} + */ + public static final class HaiGroupDeleteResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiGroupDeleteResponse) + HaiGroupDeleteResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiGroupDeleteResponse.newBuilder() to construct. + private HaiGroupDeleteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiGroupDeleteResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiGroupDeleteResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupDeleteProto.internal_static_plugin_HaiGroupDeleteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupDeleteProto.internal_static_plugin_HaiGroupDeleteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse.class, com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse other = (com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiGroupDeleteResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiGroupDeleteResponse) + com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupDeleteProto.internal_static_plugin_HaiGroupDeleteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupDeleteProto.internal_static_plugin_HaiGroupDeleteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse.class, com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiGroupDeleteProto.internal_static_plugin_HaiGroupDeleteResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse build() { + com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse buildPartial() { + com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse result = new com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse other) { + if (other == com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiGroupDeleteResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiGroupDeleteResponse) + private static final com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse(); + } + + public static com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiGroupDeleteResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiGroupDeleteResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiGroupDeleteProto.HaiGroupDeleteResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiGroupDeleteRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiGroupDeleteRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiGroupDeleteResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiGroupDeleteResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\035plugin/hai_group_delete.proto\022\006plugin\"" + + ")\n\025HaiGroupDeleteRequest\022\020\n\010group_id\030\001 \001" + + "(\t\"\030\n\026HaiGroupDeleteResponse2`\n\025HaiGroup" + + "DeleteService\022G\n\006delete\022\035.plugin.HaiGrou" + + "pDeleteRequest\032\036.plugin.HaiGroupDeleteRe" + + "sponseB.\n\027com.akaxin.proto.pluginB\023HaiGr" + + "oupDeleteProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_plugin_HaiGroupDeleteRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiGroupDeleteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiGroupDeleteRequest_descriptor, + new java.lang.String[] { "GroupId", }); + internal_static_plugin_HaiGroupDeleteResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiGroupDeleteResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiGroupDeleteResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupListProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupListProto.java new file mode 100755 index 0000000..9ff341a --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupListProto.java @@ -0,0 +1,1604 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_group_list.proto + +package com.akaxin.proto.plugin; + +public final class HaiGroupListProto { + private HaiGroupListProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiGroupListRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiGroupListRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *第几页
+     * 
+ * + * int32 page_number = 1; + */ + int getPageNumber(); + + /** + *
+     *每页的条数,默认100
+     * 
+ * + * int32 page_size = 2; + */ + int getPageSize(); + } + /** + *
+   **
+   *获取群组列表
+   *----
+   *接口名
+   *----
+   * /hai/group/list
+   *错误码
+   *----
+   *- success
+   *- error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiGroupListRequest} + */ + public static final class HaiGroupListRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiGroupListRequest) + HaiGroupListRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiGroupListRequest.newBuilder() to construct. + private HaiGroupListRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiGroupListRequest() { + pageNumber_ = 0; + pageSize_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiGroupListRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + pageNumber_ = input.readInt32(); + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupListProto.internal_static_plugin_HaiGroupListRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupListProto.internal_static_plugin_HaiGroupListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest.class, com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest.Builder.class); + } + + public static final int PAGE_NUMBER_FIELD_NUMBER = 1; + private int pageNumber_; + /** + *
+     *第几页
+     * 
+ * + * int32 page_number = 1; + */ + public int getPageNumber() { + return pageNumber_; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+     *每页的条数,默认100
+     * 
+ * + * int32 page_size = 2; + */ + public int getPageSize() { + return pageSize_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (pageNumber_ != 0) { + output.writeInt32(1, pageNumber_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pageNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, pageNumber_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest other = (com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest) obj; + + boolean result = true; + result = result && (getPageNumber() + == other.getPageNumber()); + result = result && (getPageSize() + == other.getPageSize()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getPageNumber(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *获取群组列表
+     *----
+     *接口名
+     *----
+     * /hai/group/list
+     *错误码
+     *----
+     *- success
+     *- error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiGroupListRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiGroupListRequest) + com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupListProto.internal_static_plugin_HaiGroupListRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupListProto.internal_static_plugin_HaiGroupListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest.class, com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + pageNumber_ = 0; + + pageSize_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiGroupListProto.internal_static_plugin_HaiGroupListRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest build() { + com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest buildPartial() { + com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest result = new com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest(this); + result.pageNumber_ = pageNumber_; + result.pageSize_ = pageSize_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest other) { + if (other == com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest.getDefaultInstance()) return this; + if (other.getPageNumber() != 0) { + setPageNumber(other.getPageNumber()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int pageNumber_ ; + /** + *
+       *第几页
+       * 
+ * + * int32 page_number = 1; + */ + public int getPageNumber() { + return pageNumber_; + } + /** + *
+       *第几页
+       * 
+ * + * int32 page_number = 1; + */ + public Builder setPageNumber(int value) { + + pageNumber_ = value; + onChanged(); + return this; + } + /** + *
+       *第几页
+       * 
+ * + * int32 page_number = 1; + */ + public Builder clearPageNumber() { + + pageNumber_ = 0; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+       *每页的条数,默认100
+       * 
+ * + * int32 page_size = 2; + */ + public int getPageSize() { + return pageSize_; + } + /** + *
+       *每页的条数,默认100
+       * 
+ * + * int32 page_size = 2; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+       *每页的条数,默认100
+       * 
+ * + * int32 page_size = 2; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiGroupListRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiGroupListRequest) + private static final com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest(); + } + + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiGroupListRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiGroupListRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiGroupListResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiGroupListResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + java.util.List + getGroupProfileList(); + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + com.akaxin.proto.core.GroupProto.SimpleGroupProfile getGroupProfile(int index); + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + int getGroupProfileCount(); + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + java.util.List + getGroupProfileOrBuilderList(); + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + com.akaxin.proto.core.GroupProto.SimpleGroupProfileOrBuilder getGroupProfileOrBuilder( + int index); + + /** + *
+     * 一共多少页
+     * 
+ * + * int32 page_total_num = 2; + */ + int getPageTotalNum(); + } + /** + * Protobuf type {@code plugin.HaiGroupListResponse} + */ + public static final class HaiGroupListResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiGroupListResponse) + HaiGroupListResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiGroupListResponse.newBuilder() to construct. + private HaiGroupListResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiGroupListResponse() { + groupProfile_ = java.util.Collections.emptyList(); + pageTotalNum_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiGroupListResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + groupProfile_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + groupProfile_.add( + input.readMessage(com.akaxin.proto.core.GroupProto.SimpleGroupProfile.parser(), extensionRegistry)); + break; + } + case 16: { + + pageTotalNum_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + groupProfile_ = java.util.Collections.unmodifiableList(groupProfile_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupListProto.internal_static_plugin_HaiGroupListResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupListProto.internal_static_plugin_HaiGroupListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse.class, com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse.Builder.class); + } + + private int bitField0_; + public static final int GROUP_PROFILE_FIELD_NUMBER = 1; + private java.util.List groupProfile_; + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public java.util.List getGroupProfileList() { + return groupProfile_; + } + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public java.util.List + getGroupProfileOrBuilderList() { + return groupProfile_; + } + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public int getGroupProfileCount() { + return groupProfile_.size(); + } + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public com.akaxin.proto.core.GroupProto.SimpleGroupProfile getGroupProfile(int index) { + return groupProfile_.get(index); + } + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public com.akaxin.proto.core.GroupProto.SimpleGroupProfileOrBuilder getGroupProfileOrBuilder( + int index) { + return groupProfile_.get(index); + } + + public static final int PAGE_TOTAL_NUM_FIELD_NUMBER = 2; + private int pageTotalNum_; + /** + *
+     * 一共多少页
+     * 
+ * + * int32 page_total_num = 2; + */ + public int getPageTotalNum() { + return pageTotalNum_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < groupProfile_.size(); i++) { + output.writeMessage(1, groupProfile_.get(i)); + } + if (pageTotalNum_ != 0) { + output.writeInt32(2, pageTotalNum_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < groupProfile_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, groupProfile_.get(i)); + } + if (pageTotalNum_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageTotalNum_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse other = (com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse) obj; + + boolean result = true; + result = result && getGroupProfileList() + .equals(other.getGroupProfileList()); + result = result && (getPageTotalNum() + == other.getPageTotalNum()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getGroupProfileCount() > 0) { + hash = (37 * hash) + GROUP_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getGroupProfileList().hashCode(); + } + hash = (37 * hash) + PAGE_TOTAL_NUM_FIELD_NUMBER; + hash = (53 * hash) + getPageTotalNum(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiGroupListResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiGroupListResponse) + com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupListProto.internal_static_plugin_HaiGroupListResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupListProto.internal_static_plugin_HaiGroupListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse.class, com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getGroupProfileFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (groupProfileBuilder_ == null) { + groupProfile_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + groupProfileBuilder_.clear(); + } + pageTotalNum_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiGroupListProto.internal_static_plugin_HaiGroupListResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse build() { + com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse buildPartial() { + com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse result = new com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (groupProfileBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + groupProfile_ = java.util.Collections.unmodifiableList(groupProfile_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.groupProfile_ = groupProfile_; + } else { + result.groupProfile_ = groupProfileBuilder_.build(); + } + result.pageTotalNum_ = pageTotalNum_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse other) { + if (other == com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse.getDefaultInstance()) return this; + if (groupProfileBuilder_ == null) { + if (!other.groupProfile_.isEmpty()) { + if (groupProfile_.isEmpty()) { + groupProfile_ = other.groupProfile_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGroupProfileIsMutable(); + groupProfile_.addAll(other.groupProfile_); + } + onChanged(); + } + } else { + if (!other.groupProfile_.isEmpty()) { + if (groupProfileBuilder_.isEmpty()) { + groupProfileBuilder_.dispose(); + groupProfileBuilder_ = null; + groupProfile_ = other.groupProfile_; + bitField0_ = (bitField0_ & ~0x00000001); + groupProfileBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getGroupProfileFieldBuilder() : null; + } else { + groupProfileBuilder_.addAllMessages(other.groupProfile_); + } + } + } + if (other.getPageTotalNum() != 0) { + setPageTotalNum(other.getPageTotalNum()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List groupProfile_ = + java.util.Collections.emptyList(); + private void ensureGroupProfileIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + groupProfile_ = new java.util.ArrayList(groupProfile_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.SimpleGroupProfile, com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder, com.akaxin.proto.core.GroupProto.SimpleGroupProfileOrBuilder> groupProfileBuilder_; + + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public java.util.List getGroupProfileList() { + if (groupProfileBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupProfile_); + } else { + return groupProfileBuilder_.getMessageList(); + } + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public int getGroupProfileCount() { + if (groupProfileBuilder_ == null) { + return groupProfile_.size(); + } else { + return groupProfileBuilder_.getCount(); + } + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public com.akaxin.proto.core.GroupProto.SimpleGroupProfile getGroupProfile(int index) { + if (groupProfileBuilder_ == null) { + return groupProfile_.get(index); + } else { + return groupProfileBuilder_.getMessage(index); + } + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public Builder setGroupProfile( + int index, com.akaxin.proto.core.GroupProto.SimpleGroupProfile value) { + if (groupProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupProfileIsMutable(); + groupProfile_.set(index, value); + onChanged(); + } else { + groupProfileBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public Builder setGroupProfile( + int index, com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder builderForValue) { + if (groupProfileBuilder_ == null) { + ensureGroupProfileIsMutable(); + groupProfile_.set(index, builderForValue.build()); + onChanged(); + } else { + groupProfileBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public Builder addGroupProfile(com.akaxin.proto.core.GroupProto.SimpleGroupProfile value) { + if (groupProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupProfileIsMutable(); + groupProfile_.add(value); + onChanged(); + } else { + groupProfileBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public Builder addGroupProfile( + int index, com.akaxin.proto.core.GroupProto.SimpleGroupProfile value) { + if (groupProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupProfileIsMutable(); + groupProfile_.add(index, value); + onChanged(); + } else { + groupProfileBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public Builder addGroupProfile( + com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder builderForValue) { + if (groupProfileBuilder_ == null) { + ensureGroupProfileIsMutable(); + groupProfile_.add(builderForValue.build()); + onChanged(); + } else { + groupProfileBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public Builder addGroupProfile( + int index, com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder builderForValue) { + if (groupProfileBuilder_ == null) { + ensureGroupProfileIsMutable(); + groupProfile_.add(index, builderForValue.build()); + onChanged(); + } else { + groupProfileBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public Builder addAllGroupProfile( + java.lang.Iterable values) { + if (groupProfileBuilder_ == null) { + ensureGroupProfileIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, groupProfile_); + onChanged(); + } else { + groupProfileBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public Builder clearGroupProfile() { + if (groupProfileBuilder_ == null) { + groupProfile_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + groupProfileBuilder_.clear(); + } + return this; + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public Builder removeGroupProfile(int index) { + if (groupProfileBuilder_ == null) { + ensureGroupProfileIsMutable(); + groupProfile_.remove(index); + onChanged(); + } else { + groupProfileBuilder_.remove(index); + } + return this; + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder getGroupProfileBuilder( + int index) { + return getGroupProfileFieldBuilder().getBuilder(index); + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public com.akaxin.proto.core.GroupProto.SimpleGroupProfileOrBuilder getGroupProfileOrBuilder( + int index) { + if (groupProfileBuilder_ == null) { + return groupProfile_.get(index); } else { + return groupProfileBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public java.util.List + getGroupProfileOrBuilderList() { + if (groupProfileBuilder_ != null) { + return groupProfileBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupProfile_); + } + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder addGroupProfileBuilder() { + return getGroupProfileFieldBuilder().addBuilder( + com.akaxin.proto.core.GroupProto.SimpleGroupProfile.getDefaultInstance()); + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder addGroupProfileBuilder( + int index) { + return getGroupProfileFieldBuilder().addBuilder( + index, com.akaxin.proto.core.GroupProto.SimpleGroupProfile.getDefaultInstance()); + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile group_profile = 1; + */ + public java.util.List + getGroupProfileBuilderList() { + return getGroupProfileFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.SimpleGroupProfile, com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder, com.akaxin.proto.core.GroupProto.SimpleGroupProfileOrBuilder> + getGroupProfileFieldBuilder() { + if (groupProfileBuilder_ == null) { + groupProfileBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.SimpleGroupProfile, com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder, com.akaxin.proto.core.GroupProto.SimpleGroupProfileOrBuilder>( + groupProfile_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + groupProfile_ = null; + } + return groupProfileBuilder_; + } + + private int pageTotalNum_ ; + /** + *
+       * 一共多少页
+       * 
+ * + * int32 page_total_num = 2; + */ + public int getPageTotalNum() { + return pageTotalNum_; + } + /** + *
+       * 一共多少页
+       * 
+ * + * int32 page_total_num = 2; + */ + public Builder setPageTotalNum(int value) { + + pageTotalNum_ = value; + onChanged(); + return this; + } + /** + *
+       * 一共多少页
+       * 
+ * + * int32 page_total_num = 2; + */ + public Builder clearPageTotalNum() { + + pageTotalNum_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiGroupListResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiGroupListResponse) + private static final com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse(); + } + + public static com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiGroupListResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiGroupListResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiGroupListProto.HaiGroupListResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiGroupListRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiGroupListRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiGroupListResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiGroupListResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033plugin/hai_group_list.proto\022\006plugin\032\020c" + + "ore/group.proto\"=\n\023HaiGroupListRequest\022\023" + + "\n\013page_number\030\001 \001(\005\022\021\n\tpage_size\030\002 \001(\005\"_" + + "\n\024HaiGroupListResponse\022/\n\rgroup_profile\030" + + "\001 \003(\0132\030.core.SimpleGroupProfile\022\026\n\016page_" + + "total_num\030\002 \001(\0052X\n\023HaiGroupListService\022A" + + "\n\004list\022\033.plugin.HaiGroupListRequest\032\034.pl" + + "ugin.HaiGroupListResponseB,\n\027com.akaxin." + + "proto.pluginB\021HaiGroupListProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.GroupProto.getDescriptor(), + }, assigner); + internal_static_plugin_HaiGroupListRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiGroupListRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiGroupListRequest_descriptor, + new java.lang.String[] { "PageNumber", "PageSize", }); + internal_static_plugin_HaiGroupListResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiGroupListResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiGroupListResponse_descriptor, + new java.lang.String[] { "GroupProfile", "PageTotalNum", }); + com.akaxin.proto.core.GroupProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupMembersProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupMembersProto.java new file mode 100755 index 0000000..f64f875 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupMembersProto.java @@ -0,0 +1,1778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_group_members.proto + +package com.akaxin.proto.plugin; + +public final class HaiGroupMembersProto { + private HaiGroupMembersProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiGroupMembersRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiGroupMembersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + java.lang.String getGroupId(); + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+     *分页:第几页
+     * 
+ * + * int32 page_number = 2; + */ + int getPageNumber(); + + /** + *
+     *分页:每页条数,默认100
+     * 
+ * + * int32 page_size = 3; + */ + int getPageSize(); + } + /** + *
+   **
+   *获取群成员
+   *----
+   *接口名
+   *----
+   * /hai/group/members
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiGroupMembersRequest} + */ + public static final class HaiGroupMembersRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiGroupMembersRequest) + HaiGroupMembersRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiGroupMembersRequest.newBuilder() to construct. + private HaiGroupMembersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiGroupMembersRequest() { + groupId_ = ""; + pageNumber_ = 0; + pageSize_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiGroupMembersRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + groupId_ = s; + break; + } + case 16: { + + pageNumber_ = input.readInt32(); + break; + } + case 24: { + + pageSize_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupMembersProto.internal_static_plugin_HaiGroupMembersRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupMembersProto.internal_static_plugin_HaiGroupMembersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest.class, com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object groupId_; + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_NUMBER_FIELD_NUMBER = 2; + private int pageNumber_; + /** + *
+     *分页:第几页
+     * 
+ * + * int32 page_number = 2; + */ + public int getPageNumber() { + return pageNumber_; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + *
+     *分页:每页条数,默认100
+     * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupId_); + } + if (pageNumber_ != 0) { + output.writeInt32(2, pageNumber_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupId_); + } + if (pageNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageNumber_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest other = (com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest) obj; + + boolean result = true; + result = result && getGroupId() + .equals(other.getGroupId()); + result = result && (getPageNumber() + == other.getPageNumber()); + result = result && (getPageSize() + == other.getPageSize()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getPageNumber(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *获取群成员
+     *----
+     *接口名
+     *----
+     * /hai/group/members
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiGroupMembersRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiGroupMembersRequest) + com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupMembersProto.internal_static_plugin_HaiGroupMembersRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupMembersProto.internal_static_plugin_HaiGroupMembersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest.class, com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + groupId_ = ""; + + pageNumber_ = 0; + + pageSize_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiGroupMembersProto.internal_static_plugin_HaiGroupMembersRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest build() { + com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest buildPartial() { + com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest result = new com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest(this); + result.groupId_ = groupId_; + result.pageNumber_ = pageNumber_; + result.pageSize_ = pageSize_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest other) { + if (other == com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + onChanged(); + } + if (other.getPageNumber() != 0) { + setPageNumber(other.getPageNumber()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object groupId_ = ""; + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupId_ = value; + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder clearGroupId() { + + groupId_ = getDefaultInstance().getGroupId(); + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupId_ = value; + onChanged(); + return this; + } + + private int pageNumber_ ; + /** + *
+       *分页:第几页
+       * 
+ * + * int32 page_number = 2; + */ + public int getPageNumber() { + return pageNumber_; + } + /** + *
+       *分页:第几页
+       * 
+ * + * int32 page_number = 2; + */ + public Builder setPageNumber(int value) { + + pageNumber_ = value; + onChanged(); + return this; + } + /** + *
+       *分页:第几页
+       * 
+ * + * int32 page_number = 2; + */ + public Builder clearPageNumber() { + + pageNumber_ = 0; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+       *分页:每页条数,默认100
+       * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + /** + *
+       *分页:每页条数,默认100
+       * 
+ * + * int32 page_size = 3; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+       *分页:每页条数,默认100
+       * 
+ * + * int32 page_size = 3; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiGroupMembersRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiGroupMembersRequest) + private static final com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest(); + } + + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiGroupMembersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiGroupMembersRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiGroupMembersResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiGroupMembersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + java.util.List + getGroupMemberList(); + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + com.akaxin.proto.core.GroupProto.GroupMemberProfile getGroupMember(int index); + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + int getGroupMemberCount(); + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + java.util.List + getGroupMemberOrBuilderList(); + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder getGroupMemberOrBuilder( + int index); + + /** + *
+     * 分页总数
+     * 
+ * + * int32 page_total_num = 2; + */ + int getPageTotalNum(); + } + /** + * Protobuf type {@code plugin.HaiGroupMembersResponse} + */ + public static final class HaiGroupMembersResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiGroupMembersResponse) + HaiGroupMembersResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiGroupMembersResponse.newBuilder() to construct. + private HaiGroupMembersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiGroupMembersResponse() { + groupMember_ = java.util.Collections.emptyList(); + pageTotalNum_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiGroupMembersResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + groupMember_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + groupMember_.add( + input.readMessage(com.akaxin.proto.core.GroupProto.GroupMemberProfile.parser(), extensionRegistry)); + break; + } + case 16: { + + pageTotalNum_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + groupMember_ = java.util.Collections.unmodifiableList(groupMember_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupMembersProto.internal_static_plugin_HaiGroupMembersResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupMembersProto.internal_static_plugin_HaiGroupMembersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse.class, com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse.Builder.class); + } + + private int bitField0_; + public static final int GROUP_MEMBER_FIELD_NUMBER = 1; + private java.util.List groupMember_; + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public java.util.List getGroupMemberList() { + return groupMember_; + } + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public java.util.List + getGroupMemberOrBuilderList() { + return groupMember_; + } + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public int getGroupMemberCount() { + return groupMember_.size(); + } + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile getGroupMember(int index) { + return groupMember_.get(index); + } + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder getGroupMemberOrBuilder( + int index) { + return groupMember_.get(index); + } + + public static final int PAGE_TOTAL_NUM_FIELD_NUMBER = 2; + private int pageTotalNum_; + /** + *
+     * 分页总数
+     * 
+ * + * int32 page_total_num = 2; + */ + public int getPageTotalNum() { + return pageTotalNum_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < groupMember_.size(); i++) { + output.writeMessage(1, groupMember_.get(i)); + } + if (pageTotalNum_ != 0) { + output.writeInt32(2, pageTotalNum_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < groupMember_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, groupMember_.get(i)); + } + if (pageTotalNum_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageTotalNum_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse other = (com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse) obj; + + boolean result = true; + result = result && getGroupMemberList() + .equals(other.getGroupMemberList()); + result = result && (getPageTotalNum() + == other.getPageTotalNum()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getGroupMemberCount() > 0) { + hash = (37 * hash) + GROUP_MEMBER_FIELD_NUMBER; + hash = (53 * hash) + getGroupMemberList().hashCode(); + } + hash = (37 * hash) + PAGE_TOTAL_NUM_FIELD_NUMBER; + hash = (53 * hash) + getPageTotalNum(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiGroupMembersResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiGroupMembersResponse) + com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupMembersProto.internal_static_plugin_HaiGroupMembersResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupMembersProto.internal_static_plugin_HaiGroupMembersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse.class, com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getGroupMemberFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (groupMemberBuilder_ == null) { + groupMember_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + groupMemberBuilder_.clear(); + } + pageTotalNum_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiGroupMembersProto.internal_static_plugin_HaiGroupMembersResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse build() { + com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse buildPartial() { + com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse result = new com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (groupMemberBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + groupMember_ = java.util.Collections.unmodifiableList(groupMember_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.groupMember_ = groupMember_; + } else { + result.groupMember_ = groupMemberBuilder_.build(); + } + result.pageTotalNum_ = pageTotalNum_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse other) { + if (other == com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse.getDefaultInstance()) return this; + if (groupMemberBuilder_ == null) { + if (!other.groupMember_.isEmpty()) { + if (groupMember_.isEmpty()) { + groupMember_ = other.groupMember_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGroupMemberIsMutable(); + groupMember_.addAll(other.groupMember_); + } + onChanged(); + } + } else { + if (!other.groupMember_.isEmpty()) { + if (groupMemberBuilder_.isEmpty()) { + groupMemberBuilder_.dispose(); + groupMemberBuilder_ = null; + groupMember_ = other.groupMember_; + bitField0_ = (bitField0_ & ~0x00000001); + groupMemberBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getGroupMemberFieldBuilder() : null; + } else { + groupMemberBuilder_.addAllMessages(other.groupMember_); + } + } + } + if (other.getPageTotalNum() != 0) { + setPageTotalNum(other.getPageTotalNum()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List groupMember_ = + java.util.Collections.emptyList(); + private void ensureGroupMemberIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + groupMember_ = new java.util.ArrayList(groupMember_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupMemberProfile, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder, com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder> groupMemberBuilder_; + + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public java.util.List getGroupMemberList() { + if (groupMemberBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupMember_); + } else { + return groupMemberBuilder_.getMessageList(); + } + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public int getGroupMemberCount() { + if (groupMemberBuilder_ == null) { + return groupMember_.size(); + } else { + return groupMemberBuilder_.getCount(); + } + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile getGroupMember(int index) { + if (groupMemberBuilder_ == null) { + return groupMember_.get(index); + } else { + return groupMemberBuilder_.getMessage(index); + } + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public Builder setGroupMember( + int index, com.akaxin.proto.core.GroupProto.GroupMemberProfile value) { + if (groupMemberBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupMemberIsMutable(); + groupMember_.set(index, value); + onChanged(); + } else { + groupMemberBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public Builder setGroupMember( + int index, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder builderForValue) { + if (groupMemberBuilder_ == null) { + ensureGroupMemberIsMutable(); + groupMember_.set(index, builderForValue.build()); + onChanged(); + } else { + groupMemberBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public Builder addGroupMember(com.akaxin.proto.core.GroupProto.GroupMemberProfile value) { + if (groupMemberBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupMemberIsMutable(); + groupMember_.add(value); + onChanged(); + } else { + groupMemberBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public Builder addGroupMember( + int index, com.akaxin.proto.core.GroupProto.GroupMemberProfile value) { + if (groupMemberBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupMemberIsMutable(); + groupMember_.add(index, value); + onChanged(); + } else { + groupMemberBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public Builder addGroupMember( + com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder builderForValue) { + if (groupMemberBuilder_ == null) { + ensureGroupMemberIsMutable(); + groupMember_.add(builderForValue.build()); + onChanged(); + } else { + groupMemberBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public Builder addGroupMember( + int index, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder builderForValue) { + if (groupMemberBuilder_ == null) { + ensureGroupMemberIsMutable(); + groupMember_.add(index, builderForValue.build()); + onChanged(); + } else { + groupMemberBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public Builder addAllGroupMember( + java.lang.Iterable values) { + if (groupMemberBuilder_ == null) { + ensureGroupMemberIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, groupMember_); + onChanged(); + } else { + groupMemberBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public Builder clearGroupMember() { + if (groupMemberBuilder_ == null) { + groupMember_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + groupMemberBuilder_.clear(); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public Builder removeGroupMember(int index) { + if (groupMemberBuilder_ == null) { + ensureGroupMemberIsMutable(); + groupMember_.remove(index); + onChanged(); + } else { + groupMemberBuilder_.remove(index); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder getGroupMemberBuilder( + int index) { + return getGroupMemberFieldBuilder().getBuilder(index); + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder getGroupMemberOrBuilder( + int index) { + if (groupMemberBuilder_ == null) { + return groupMember_.get(index); } else { + return groupMemberBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public java.util.List + getGroupMemberOrBuilderList() { + if (groupMemberBuilder_ != null) { + return groupMemberBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupMember_); + } + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder addGroupMemberBuilder() { + return getGroupMemberFieldBuilder().addBuilder( + com.akaxin.proto.core.GroupProto.GroupMemberProfile.getDefaultInstance()); + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder addGroupMemberBuilder( + int index) { + return getGroupMemberFieldBuilder().addBuilder( + index, com.akaxin.proto.core.GroupProto.GroupMemberProfile.getDefaultInstance()); + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public java.util.List + getGroupMemberBuilderList() { + return getGroupMemberFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupMemberProfile, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder, com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder> + getGroupMemberFieldBuilder() { + if (groupMemberBuilder_ == null) { + groupMemberBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupMemberProfile, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder, com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder>( + groupMember_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + groupMember_ = null; + } + return groupMemberBuilder_; + } + + private int pageTotalNum_ ; + /** + *
+       * 分页总数
+       * 
+ * + * int32 page_total_num = 2; + */ + public int getPageTotalNum() { + return pageTotalNum_; + } + /** + *
+       * 分页总数
+       * 
+ * + * int32 page_total_num = 2; + */ + public Builder setPageTotalNum(int value) { + + pageTotalNum_ = value; + onChanged(); + return this; + } + /** + *
+       * 分页总数
+       * 
+ * + * int32 page_total_num = 2; + */ + public Builder clearPageTotalNum() { + + pageTotalNum_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiGroupMembersResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiGroupMembersResponse) + private static final com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse(); + } + + public static com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiGroupMembersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiGroupMembersResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiGroupMembersProto.HaiGroupMembersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiGroupMembersRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiGroupMembersRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiGroupMembersResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiGroupMembersResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\036plugin/hai_group_members.proto\022\006plugin" + + "\032\020core/group.proto\"R\n\026HaiGroupMembersReq" + + "uest\022\020\n\010group_id\030\001 \001(\t\022\023\n\013page_number\030\002 " + + "\001(\005\022\021\n\tpage_size\030\003 \001(\005\"a\n\027HaiGroupMember" + + "sResponse\022.\n\014group_member\030\001 \003(\0132\030.core.G" + + "roupMemberProfile\022\026\n\016page_total_num\030\002 \001(" + + "\0052d\n\026HaiGroupMembersService\022J\n\007members\022\036" + + ".plugin.HaiGroupMembersRequest\032\037.plugin." + + "HaiGroupMembersResponseB/\n\027com.akaxin.pr" + + "oto.pluginB\024HaiGroupMembersProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.GroupProto.getDescriptor(), + }, assigner); + internal_static_plugin_HaiGroupMembersRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiGroupMembersRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiGroupMembersRequest_descriptor, + new java.lang.String[] { "GroupId", "PageNumber", "PageSize", }); + internal_static_plugin_HaiGroupMembersResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiGroupMembersResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiGroupMembersResponse_descriptor, + new java.lang.String[] { "GroupMember", "PageTotalNum", }); + com.akaxin.proto.core.GroupProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupNonmembersProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupNonmembersProto.java new file mode 100755 index 0000000..10e1e9b --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupNonmembersProto.java @@ -0,0 +1,1953 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_group_nonmembers.proto + +package com.akaxin.proto.plugin; + +public final class HaiGroupNonmembersProto { + private HaiGroupNonmembersProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiGroupNonmembersRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiGroupNonmembersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 以谁的视角获取这份数据
+     * 
+ * + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + *
+     * 以谁的视角获取这份数据
+     * 
+ * + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 2; + */ + java.lang.String getGroupId(); + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 2; + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+     *分页:第几页
+     * 
+ * + * int32 page_number = 3; + */ + int getPageNumber(); + + /** + *
+     *分页:每页条数,默认100
+     * 
+ * + * int32 page_size = 4; + */ + int getPageSize(); + } + /** + *
+   **
+   *分页获非群成员
+   *----
+   *接口名
+   *----
+   * /hai/group/nonmembers
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiGroupNonmembersRequest} + */ + public static final class HaiGroupNonmembersRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiGroupNonmembersRequest) + HaiGroupNonmembersRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiGroupNonmembersRequest.newBuilder() to construct. + private HaiGroupNonmembersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiGroupNonmembersRequest() { + siteUserId_ = ""; + groupId_ = ""; + pageNumber_ = 0; + pageSize_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiGroupNonmembersRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + groupId_ = s; + break; + } + case 24: { + + pageNumber_ = input.readInt32(); + break; + } + case 32: { + + pageSize_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupNonmembersProto.internal_static_plugin_HaiGroupNonmembersRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupNonmembersProto.internal_static_plugin_HaiGroupNonmembersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest.class, com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + *
+     * 以谁的视角获取这份数据
+     * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     * 以谁的视角获取这份数据
+     * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUP_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object groupId_; + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 2; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 2; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_NUMBER_FIELD_NUMBER = 3; + private int pageNumber_; + /** + *
+     *分页:第几页
+     * 
+ * + * int32 page_number = 3; + */ + public int getPageNumber() { + return pageNumber_; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_; + /** + *
+     *分页:每页条数,默认100
+     * 
+ * + * int32 page_size = 4; + */ + public int getPageSize() { + return pageSize_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + if (!getGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, groupId_); + } + if (pageNumber_ != 0) { + output.writeInt32(3, pageNumber_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + if (!getGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, groupId_); + } + if (pageNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageNumber_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, pageSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest other = (com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getGroupId() + .equals(other.getGroupId()); + result = result && (getPageNumber() + == other.getPageNumber()); + result = result && (getPageSize() + == other.getPageSize()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getPageNumber(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *分页获非群成员
+     *----
+     *接口名
+     *----
+     * /hai/group/nonmembers
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiGroupNonmembersRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiGroupNonmembersRequest) + com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupNonmembersProto.internal_static_plugin_HaiGroupNonmembersRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupNonmembersProto.internal_static_plugin_HaiGroupNonmembersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest.class, com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + groupId_ = ""; + + pageNumber_ = 0; + + pageSize_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiGroupNonmembersProto.internal_static_plugin_HaiGroupNonmembersRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest build() { + com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest buildPartial() { + com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest result = new com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest(this); + result.siteUserId_ = siteUserId_; + result.groupId_ = groupId_; + result.pageNumber_ = pageNumber_; + result.pageSize_ = pageSize_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest other) { + if (other == com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + onChanged(); + } + if (other.getPageNumber() != 0) { + setPageNumber(other.getPageNumber()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       * 以谁的视角获取这份数据
+       * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * 以谁的视角获取这份数据
+       * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * 以谁的视角获取这份数据
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       * 以谁的视角获取这份数据
+       * 
+ * + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       * 以谁的视角获取这份数据
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object groupId_ = ""; + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 2; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 2; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 2; + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupId_ = value; + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 2; + */ + public Builder clearGroupId() { + + groupId_ = getDefaultInstance().getGroupId(); + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 2; + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupId_ = value; + onChanged(); + return this; + } + + private int pageNumber_ ; + /** + *
+       *分页:第几页
+       * 
+ * + * int32 page_number = 3; + */ + public int getPageNumber() { + return pageNumber_; + } + /** + *
+       *分页:第几页
+       * 
+ * + * int32 page_number = 3; + */ + public Builder setPageNumber(int value) { + + pageNumber_ = value; + onChanged(); + return this; + } + /** + *
+       *分页:第几页
+       * 
+ * + * int32 page_number = 3; + */ + public Builder clearPageNumber() { + + pageNumber_ = 0; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+       *分页:每页条数,默认100
+       * 
+ * + * int32 page_size = 4; + */ + public int getPageSize() { + return pageSize_; + } + /** + *
+       *分页:每页条数,默认100
+       * 
+ * + * int32 page_size = 4; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+       *分页:每页条数,默认100
+       * 
+ * + * int32 page_size = 4; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiGroupNonmembersRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiGroupNonmembersRequest) + private static final com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest(); + } + + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiGroupNonmembersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiGroupNonmembersRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiGroupNonmembersResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiGroupNonmembersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + java.util.List + getGroupMemberList(); + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + com.akaxin.proto.core.GroupProto.GroupMemberProfile getGroupMember(int index); + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + int getGroupMemberCount(); + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + java.util.List + getGroupMemberOrBuilderList(); + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder getGroupMemberOrBuilder( + int index); + + /** + *
+     * 分页总数
+     * 
+ * + * int32 page_total_num = 2; + */ + int getPageTotalNum(); + } + /** + * Protobuf type {@code plugin.HaiGroupNonmembersResponse} + */ + public static final class HaiGroupNonmembersResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiGroupNonmembersResponse) + HaiGroupNonmembersResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiGroupNonmembersResponse.newBuilder() to construct. + private HaiGroupNonmembersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiGroupNonmembersResponse() { + groupMember_ = java.util.Collections.emptyList(); + pageTotalNum_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiGroupNonmembersResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + groupMember_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + groupMember_.add( + input.readMessage(com.akaxin.proto.core.GroupProto.GroupMemberProfile.parser(), extensionRegistry)); + break; + } + case 16: { + + pageTotalNum_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + groupMember_ = java.util.Collections.unmodifiableList(groupMember_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupNonmembersProto.internal_static_plugin_HaiGroupNonmembersResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupNonmembersProto.internal_static_plugin_HaiGroupNonmembersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse.class, com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse.Builder.class); + } + + private int bitField0_; + public static final int GROUP_MEMBER_FIELD_NUMBER = 1; + private java.util.List groupMember_; + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public java.util.List getGroupMemberList() { + return groupMember_; + } + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public java.util.List + getGroupMemberOrBuilderList() { + return groupMember_; + } + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public int getGroupMemberCount() { + return groupMember_.size(); + } + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile getGroupMember(int index) { + return groupMember_.get(index); + } + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder getGroupMemberOrBuilder( + int index) { + return groupMember_.get(index); + } + + public static final int PAGE_TOTAL_NUM_FIELD_NUMBER = 2; + private int pageTotalNum_; + /** + *
+     * 分页总数
+     * 
+ * + * int32 page_total_num = 2; + */ + public int getPageTotalNum() { + return pageTotalNum_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < groupMember_.size(); i++) { + output.writeMessage(1, groupMember_.get(i)); + } + if (pageTotalNum_ != 0) { + output.writeInt32(2, pageTotalNum_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < groupMember_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, groupMember_.get(i)); + } + if (pageTotalNum_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageTotalNum_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse other = (com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse) obj; + + boolean result = true; + result = result && getGroupMemberList() + .equals(other.getGroupMemberList()); + result = result && (getPageTotalNum() + == other.getPageTotalNum()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getGroupMemberCount() > 0) { + hash = (37 * hash) + GROUP_MEMBER_FIELD_NUMBER; + hash = (53 * hash) + getGroupMemberList().hashCode(); + } + hash = (37 * hash) + PAGE_TOTAL_NUM_FIELD_NUMBER; + hash = (53 * hash) + getPageTotalNum(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiGroupNonmembersResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiGroupNonmembersResponse) + com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupNonmembersProto.internal_static_plugin_HaiGroupNonmembersResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupNonmembersProto.internal_static_plugin_HaiGroupNonmembersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse.class, com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getGroupMemberFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (groupMemberBuilder_ == null) { + groupMember_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + groupMemberBuilder_.clear(); + } + pageTotalNum_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiGroupNonmembersProto.internal_static_plugin_HaiGroupNonmembersResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse build() { + com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse buildPartial() { + com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse result = new com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (groupMemberBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + groupMember_ = java.util.Collections.unmodifiableList(groupMember_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.groupMember_ = groupMember_; + } else { + result.groupMember_ = groupMemberBuilder_.build(); + } + result.pageTotalNum_ = pageTotalNum_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse other) { + if (other == com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse.getDefaultInstance()) return this; + if (groupMemberBuilder_ == null) { + if (!other.groupMember_.isEmpty()) { + if (groupMember_.isEmpty()) { + groupMember_ = other.groupMember_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGroupMemberIsMutable(); + groupMember_.addAll(other.groupMember_); + } + onChanged(); + } + } else { + if (!other.groupMember_.isEmpty()) { + if (groupMemberBuilder_.isEmpty()) { + groupMemberBuilder_.dispose(); + groupMemberBuilder_ = null; + groupMember_ = other.groupMember_; + bitField0_ = (bitField0_ & ~0x00000001); + groupMemberBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getGroupMemberFieldBuilder() : null; + } else { + groupMemberBuilder_.addAllMessages(other.groupMember_); + } + } + } + if (other.getPageTotalNum() != 0) { + setPageTotalNum(other.getPageTotalNum()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List groupMember_ = + java.util.Collections.emptyList(); + private void ensureGroupMemberIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + groupMember_ = new java.util.ArrayList(groupMember_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupMemberProfile, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder, com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder> groupMemberBuilder_; + + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public java.util.List getGroupMemberList() { + if (groupMemberBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupMember_); + } else { + return groupMemberBuilder_.getMessageList(); + } + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public int getGroupMemberCount() { + if (groupMemberBuilder_ == null) { + return groupMember_.size(); + } else { + return groupMemberBuilder_.getCount(); + } + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile getGroupMember(int index) { + if (groupMemberBuilder_ == null) { + return groupMember_.get(index); + } else { + return groupMemberBuilder_.getMessage(index); + } + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public Builder setGroupMember( + int index, com.akaxin.proto.core.GroupProto.GroupMemberProfile value) { + if (groupMemberBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupMemberIsMutable(); + groupMember_.set(index, value); + onChanged(); + } else { + groupMemberBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public Builder setGroupMember( + int index, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder builderForValue) { + if (groupMemberBuilder_ == null) { + ensureGroupMemberIsMutable(); + groupMember_.set(index, builderForValue.build()); + onChanged(); + } else { + groupMemberBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public Builder addGroupMember(com.akaxin.proto.core.GroupProto.GroupMemberProfile value) { + if (groupMemberBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupMemberIsMutable(); + groupMember_.add(value); + onChanged(); + } else { + groupMemberBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public Builder addGroupMember( + int index, com.akaxin.proto.core.GroupProto.GroupMemberProfile value) { + if (groupMemberBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupMemberIsMutable(); + groupMember_.add(index, value); + onChanged(); + } else { + groupMemberBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public Builder addGroupMember( + com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder builderForValue) { + if (groupMemberBuilder_ == null) { + ensureGroupMemberIsMutable(); + groupMember_.add(builderForValue.build()); + onChanged(); + } else { + groupMemberBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public Builder addGroupMember( + int index, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder builderForValue) { + if (groupMemberBuilder_ == null) { + ensureGroupMemberIsMutable(); + groupMember_.add(index, builderForValue.build()); + onChanged(); + } else { + groupMemberBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public Builder addAllGroupMember( + java.lang.Iterable values) { + if (groupMemberBuilder_ == null) { + ensureGroupMemberIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, groupMember_); + onChanged(); + } else { + groupMemberBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public Builder clearGroupMember() { + if (groupMemberBuilder_ == null) { + groupMember_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + groupMemberBuilder_.clear(); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public Builder removeGroupMember(int index) { + if (groupMemberBuilder_ == null) { + ensureGroupMemberIsMutable(); + groupMember_.remove(index); + onChanged(); + } else { + groupMemberBuilder_.remove(index); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder getGroupMemberBuilder( + int index) { + return getGroupMemberFieldBuilder().getBuilder(index); + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder getGroupMemberOrBuilder( + int index) { + if (groupMemberBuilder_ == null) { + return groupMember_.get(index); } else { + return groupMemberBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public java.util.List + getGroupMemberOrBuilderList() { + if (groupMemberBuilder_ != null) { + return groupMemberBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupMember_); + } + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder addGroupMemberBuilder() { + return getGroupMemberFieldBuilder().addBuilder( + com.akaxin.proto.core.GroupProto.GroupMemberProfile.getDefaultInstance()); + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder addGroupMemberBuilder( + int index) { + return getGroupMemberFieldBuilder().addBuilder( + index, com.akaxin.proto.core.GroupProto.GroupMemberProfile.getDefaultInstance()); + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile group_member = 1; + */ + public java.util.List + getGroupMemberBuilderList() { + return getGroupMemberFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupMemberProfile, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder, com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder> + getGroupMemberFieldBuilder() { + if (groupMemberBuilder_ == null) { + groupMemberBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupMemberProfile, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder, com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder>( + groupMember_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + groupMember_ = null; + } + return groupMemberBuilder_; + } + + private int pageTotalNum_ ; + /** + *
+       * 分页总数
+       * 
+ * + * int32 page_total_num = 2; + */ + public int getPageTotalNum() { + return pageTotalNum_; + } + /** + *
+       * 分页总数
+       * 
+ * + * int32 page_total_num = 2; + */ + public Builder setPageTotalNum(int value) { + + pageTotalNum_ = value; + onChanged(); + return this; + } + /** + *
+       * 分页总数
+       * 
+ * + * int32 page_total_num = 2; + */ + public Builder clearPageTotalNum() { + + pageTotalNum_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiGroupNonmembersResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiGroupNonmembersResponse) + private static final com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse(); + } + + public static com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiGroupNonmembersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiGroupNonmembersResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiGroupNonmembersProto.HaiGroupNonmembersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiGroupNonmembersRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiGroupNonmembersRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiGroupNonmembersResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiGroupNonmembersResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n!plugin/hai_group_nonmembers.proto\022\006plu" + + "gin\032\020core/group.proto\"k\n\031HaiGroupNonmemb" + + "ersRequest\022\024\n\014site_user_id\030\001 \001(\t\022\020\n\010grou" + + "p_id\030\002 \001(\t\022\023\n\013page_number\030\003 \001(\005\022\021\n\tpage_" + + "size\030\004 \001(\005\"d\n\032HaiGroupNonmembersResponse" + + "\022.\n\014group_member\030\001 \003(\0132\030.core.GroupMembe" + + "rProfile\022\026\n\016page_total_num\030\002 \001(\0052p\n\031HaiG" + + "roupNonmembersService\022S\n\nnonmembers\022!.pl" + + "ugin.HaiGroupNonmembersRequest\032\".plugin." + + "HaiGroupNonmembersResponseB2\n\027com.akaxin", + ".proto.pluginB\027HaiGroupNonmembersProtob\006" + + "proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.GroupProto.getDescriptor(), + }, assigner); + internal_static_plugin_HaiGroupNonmembersRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiGroupNonmembersRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiGroupNonmembersRequest_descriptor, + new java.lang.String[] { "SiteUserId", "GroupId", "PageNumber", "PageSize", }); + internal_static_plugin_HaiGroupNonmembersResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiGroupNonmembersResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiGroupNonmembersResponse_descriptor, + new java.lang.String[] { "GroupMember", "PageTotalNum", }); + com.akaxin.proto.core.GroupProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupProfileProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupProfileProto.java new file mode 100755 index 0000000..bc0ac2a --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupProfileProto.java @@ -0,0 +1,1298 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_group_profile.proto + +package com.akaxin.proto.plugin; + +public final class HaiGroupProfileProto { + private HaiGroupProfileProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiGroupProfileRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiGroupProfileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *当前用户获取群组ID的资料信息
+     * 
+ * + * string group_id = 1; + */ + java.lang.String getGroupId(); + /** + *
+     *当前用户获取群组ID的资料信息
+     * 
+ * + * string group_id = 1; + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + } + /** + *
+   **
+   *获取群组资料
+   *----
+   *接口名
+   *----
+   * /hai/group/profile
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiGroupProfileRequest} + */ + public static final class HaiGroupProfileRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiGroupProfileRequest) + HaiGroupProfileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiGroupProfileRequest.newBuilder() to construct. + private HaiGroupProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiGroupProfileRequest() { + groupId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiGroupProfileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + groupId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupProfileProto.internal_static_plugin_HaiGroupProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupProfileProto.internal_static_plugin_HaiGroupProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest.class, com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object groupId_; + /** + *
+     *当前用户获取群组ID的资料信息
+     * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+     *当前用户获取群组ID的资料信息
+     * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest other = (com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest) obj; + + boolean result = true; + result = result && getGroupId() + .equals(other.getGroupId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *获取群组资料
+     *----
+     *接口名
+     *----
+     * /hai/group/profile
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiGroupProfileRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiGroupProfileRequest) + com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupProfileProto.internal_static_plugin_HaiGroupProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupProfileProto.internal_static_plugin_HaiGroupProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest.class, com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + groupId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiGroupProfileProto.internal_static_plugin_HaiGroupProfileRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest build() { + com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest buildPartial() { + com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest result = new com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest(this); + result.groupId_ = groupId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest other) { + if (other == com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object groupId_ = ""; + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupId_ = value; + onChanged(); + return this; + } + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string group_id = 1; + */ + public Builder clearGroupId() { + + groupId_ = getDefaultInstance().getGroupId(); + onChanged(); + return this; + } + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiGroupProfileRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiGroupProfileRequest) + private static final com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest(); + } + + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiGroupProfileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiGroupProfileRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiGroupProfileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiGroupProfileResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组资料页信息
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + boolean hasProfile(); + /** + *
+     *群组资料页信息
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + com.akaxin.proto.core.GroupProto.GroupProfile getProfile(); + /** + *
+     *群组资料页信息
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder getProfileOrBuilder(); + } + /** + * Protobuf type {@code plugin.HaiGroupProfileResponse} + */ + public static final class HaiGroupProfileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiGroupProfileResponse) + HaiGroupProfileResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiGroupProfileResponse.newBuilder() to construct. + private HaiGroupProfileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiGroupProfileResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiGroupProfileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.GroupProto.GroupProfile.Builder subBuilder = null; + if (profile_ != null) { + subBuilder = profile_.toBuilder(); + } + profile_ = input.readMessage(com.akaxin.proto.core.GroupProto.GroupProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(profile_); + profile_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupProfileProto.internal_static_plugin_HaiGroupProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupProfileProto.internal_static_plugin_HaiGroupProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse.class, com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse.Builder.class); + } + + public static final int PROFILE_FIELD_NUMBER = 1; + private com.akaxin.proto.core.GroupProto.GroupProfile profile_; + /** + *
+     *群组资料页信息
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + public boolean hasProfile() { + return profile_ != null; + } + /** + *
+     *群组资料页信息
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile getProfile() { + return profile_ == null ? com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance() : profile_; + } + /** + *
+     *群组资料页信息
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder getProfileOrBuilder() { + return getProfile(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (profile_ != null) { + output.writeMessage(1, getProfile()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (profile_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProfile()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse other = (com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse) obj; + + boolean result = true; + result = result && (hasProfile() == other.hasProfile()); + if (hasProfile()) { + result = result && getProfile() + .equals(other.getProfile()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProfile()) { + hash = (37 * hash) + PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getProfile().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiGroupProfileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiGroupProfileResponse) + com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupProfileProto.internal_static_plugin_HaiGroupProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupProfileProto.internal_static_plugin_HaiGroupProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse.class, com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (profileBuilder_ == null) { + profile_ = null; + } else { + profile_ = null; + profileBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiGroupProfileProto.internal_static_plugin_HaiGroupProfileResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse build() { + com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse buildPartial() { + com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse result = new com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse(this); + if (profileBuilder_ == null) { + result.profile_ = profile_; + } else { + result.profile_ = profileBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse other) { + if (other == com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse.getDefaultInstance()) return this; + if (other.hasProfile()) { + mergeProfile(other.getProfile()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.core.GroupProto.GroupProfile profile_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupProfile, com.akaxin.proto.core.GroupProto.GroupProfile.Builder, com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder> profileBuilder_; + /** + *
+       *群组资料页信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public boolean hasProfile() { + return profileBuilder_ != null || profile_ != null; + } + /** + *
+       *群组资料页信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile getProfile() { + if (profileBuilder_ == null) { + return profile_ == null ? com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance() : profile_; + } else { + return profileBuilder_.getMessage(); + } + } + /** + *
+       *群组资料页信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public Builder setProfile(com.akaxin.proto.core.GroupProto.GroupProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profile_ = value; + onChanged(); + } else { + profileBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群组资料页信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public Builder setProfile( + com.akaxin.proto.core.GroupProto.GroupProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + profile_ = builderForValue.build(); + onChanged(); + } else { + profileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群组资料页信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public Builder mergeProfile(com.akaxin.proto.core.GroupProto.GroupProfile value) { + if (profileBuilder_ == null) { + if (profile_ != null) { + profile_ = + com.akaxin.proto.core.GroupProto.GroupProfile.newBuilder(profile_).mergeFrom(value).buildPartial(); + } else { + profile_ = value; + } + onChanged(); + } else { + profileBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群组资料页信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public Builder clearProfile() { + if (profileBuilder_ == null) { + profile_ = null; + onChanged(); + } else { + profile_ = null; + profileBuilder_ = null; + } + + return this; + } + /** + *
+       *群组资料页信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile.Builder getProfileBuilder() { + + onChanged(); + return getProfileFieldBuilder().getBuilder(); + } + /** + *
+       *群组资料页信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder getProfileOrBuilder() { + if (profileBuilder_ != null) { + return profileBuilder_.getMessageOrBuilder(); + } else { + return profile_ == null ? + com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance() : profile_; + } + } + /** + *
+       *群组资料页信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupProfile, com.akaxin.proto.core.GroupProto.GroupProfile.Builder, com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder> + getProfileFieldBuilder() { + if (profileBuilder_ == null) { + profileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupProfile, com.akaxin.proto.core.GroupProto.GroupProfile.Builder, com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder>( + getProfile(), + getParentForChildren(), + isClean()); + profile_ = null; + } + return profileBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiGroupProfileResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiGroupProfileResponse) + private static final com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse(); + } + + public static com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiGroupProfileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiGroupProfileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiGroupProfileProto.HaiGroupProfileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiGroupProfileRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiGroupProfileRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiGroupProfileResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiGroupProfileResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\036plugin/hai_group_profile.proto\022\006plugin" + + "\032\020core/group.proto\"*\n\026HaiGroupProfileReq" + + "uest\022\020\n\010group_id\030\001 \001(\t\">\n\027HaiGroupProfil" + + "eResponse\022#\n\007profile\030\001 \001(\0132\022.core.GroupP" + + "rofile2d\n\026HaiGroupProfileService\022J\n\007prof" + + "ile\022\036.plugin.HaiGroupProfileRequest\032\037.pl" + + "ugin.HaiGroupProfileResponseB/\n\027com.akax" + + "in.proto.pluginB\024HaiGroupProfileProtob\006p" + + "roto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.GroupProto.getDescriptor(), + }, assigner); + internal_static_plugin_HaiGroupProfileRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiGroupProfileRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiGroupProfileRequest_descriptor, + new java.lang.String[] { "GroupId", }); + internal_static_plugin_HaiGroupProfileResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiGroupProfileResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiGroupProfileResponse_descriptor, + new java.lang.String[] { "Profile", }); + com.akaxin.proto.core.GroupProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupRemoveMemberProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupRemoveMemberProto.java new file mode 100755 index 0000000..4a2b436 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupRemoveMemberProto.java @@ -0,0 +1,1303 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_group_removeMember.proto + +package com.akaxin.proto.plugin; + +public final class HaiGroupRemoveMemberProto { + private HaiGroupRemoveMemberProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiGroupRemoveMemberRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiGroupRemoveMemberRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + java.lang.String getGroupId(); + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+     *需要删除的群组成员!!不能删除管理员
+     * 
+ * + * repeated string group_member = 3; + */ + java.util.List + getGroupMemberList(); + /** + *
+     *需要删除的群组成员!!不能删除管理员
+     * 
+ * + * repeated string group_member = 3; + */ + int getGroupMemberCount(); + /** + *
+     *需要删除的群组成员!!不能删除管理员
+     * 
+ * + * repeated string group_member = 3; + */ + java.lang.String getGroupMember(int index); + /** + *
+     *需要删除的群组成员!!不能删除管理员
+     * 
+ * + * repeated string group_member = 3; + */ + com.google.protobuf.ByteString + getGroupMemberBytes(int index); + } + /** + *
+   **
+   *删除群成员
+   *----
+   *接口名
+   *----
+   * /hai/group/removeMember
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiGroupRemoveMemberRequest} + */ + public static final class HaiGroupRemoveMemberRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiGroupRemoveMemberRequest) + HaiGroupRemoveMemberRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiGroupRemoveMemberRequest.newBuilder() to construct. + private HaiGroupRemoveMemberRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiGroupRemoveMemberRequest() { + groupId_ = ""; + groupMember_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiGroupRemoveMemberRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + groupId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + groupMember_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + groupMember_.add(s); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + groupMember_ = groupMember_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.internal_static_plugin_HaiGroupRemoveMemberRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.internal_static_plugin_HaiGroupRemoveMemberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest.class, com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest.Builder.class); + } + + private int bitField0_; + public static final int GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object groupId_; + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUP_MEMBER_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList groupMember_; + /** + *
+     *需要删除的群组成员!!不能删除管理员
+     * 
+ * + * repeated string group_member = 3; + */ + public com.google.protobuf.ProtocolStringList + getGroupMemberList() { + return groupMember_; + } + /** + *
+     *需要删除的群组成员!!不能删除管理员
+     * 
+ * + * repeated string group_member = 3; + */ + public int getGroupMemberCount() { + return groupMember_.size(); + } + /** + *
+     *需要删除的群组成员!!不能删除管理员
+     * 
+ * + * repeated string group_member = 3; + */ + public java.lang.String getGroupMember(int index) { + return groupMember_.get(index); + } + /** + *
+     *需要删除的群组成员!!不能删除管理员
+     * 
+ * + * repeated string group_member = 3; + */ + public com.google.protobuf.ByteString + getGroupMemberBytes(int index) { + return groupMember_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupId_); + } + for (int i = 0; i < groupMember_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, groupMember_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupId_); + } + { + int dataSize = 0; + for (int i = 0; i < groupMember_.size(); i++) { + dataSize += computeStringSizeNoTag(groupMember_.getRaw(i)); + } + size += dataSize; + size += 1 * getGroupMemberList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest other = (com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest) obj; + + boolean result = true; + result = result && getGroupId() + .equals(other.getGroupId()); + result = result && getGroupMemberList() + .equals(other.getGroupMemberList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + if (getGroupMemberCount() > 0) { + hash = (37 * hash) + GROUP_MEMBER_FIELD_NUMBER; + hash = (53 * hash) + getGroupMemberList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *删除群成员
+     *----
+     *接口名
+     *----
+     * /hai/group/removeMember
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiGroupRemoveMemberRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiGroupRemoveMemberRequest) + com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.internal_static_plugin_HaiGroupRemoveMemberRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.internal_static_plugin_HaiGroupRemoveMemberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest.class, com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + groupId_ = ""; + + groupMember_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.internal_static_plugin_HaiGroupRemoveMemberRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest build() { + com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest buildPartial() { + com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest result = new com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.groupId_ = groupId_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + groupMember_ = groupMember_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.groupMember_ = groupMember_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest other) { + if (other == com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + onChanged(); + } + if (!other.groupMember_.isEmpty()) { + if (groupMember_.isEmpty()) { + groupMember_ = other.groupMember_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureGroupMemberIsMutable(); + groupMember_.addAll(other.groupMember_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object groupId_ = ""; + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupId_ = value; + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder clearGroupId() { + + groupId_ = getDefaultInstance().getGroupId(); + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList groupMember_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureGroupMemberIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + groupMember_ = new com.google.protobuf.LazyStringArrayList(groupMember_); + bitField0_ |= 0x00000002; + } + } + /** + *
+       *需要删除的群组成员!!不能删除管理员
+       * 
+ * + * repeated string group_member = 3; + */ + public com.google.protobuf.ProtocolStringList + getGroupMemberList() { + return groupMember_.getUnmodifiableView(); + } + /** + *
+       *需要删除的群组成员!!不能删除管理员
+       * 
+ * + * repeated string group_member = 3; + */ + public int getGroupMemberCount() { + return groupMember_.size(); + } + /** + *
+       *需要删除的群组成员!!不能删除管理员
+       * 
+ * + * repeated string group_member = 3; + */ + public java.lang.String getGroupMember(int index) { + return groupMember_.get(index); + } + /** + *
+       *需要删除的群组成员!!不能删除管理员
+       * 
+ * + * repeated string group_member = 3; + */ + public com.google.protobuf.ByteString + getGroupMemberBytes(int index) { + return groupMember_.getByteString(index); + } + /** + *
+       *需要删除的群组成员!!不能删除管理员
+       * 
+ * + * repeated string group_member = 3; + */ + public Builder setGroupMember( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupMemberIsMutable(); + groupMember_.set(index, value); + onChanged(); + return this; + } + /** + *
+       *需要删除的群组成员!!不能删除管理员
+       * 
+ * + * repeated string group_member = 3; + */ + public Builder addGroupMember( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupMemberIsMutable(); + groupMember_.add(value); + onChanged(); + return this; + } + /** + *
+       *需要删除的群组成员!!不能删除管理员
+       * 
+ * + * repeated string group_member = 3; + */ + public Builder addAllGroupMember( + java.lang.Iterable values) { + ensureGroupMemberIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, groupMember_); + onChanged(); + return this; + } + /** + *
+       *需要删除的群组成员!!不能删除管理员
+       * 
+ * + * repeated string group_member = 3; + */ + public Builder clearGroupMember() { + groupMember_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       *需要删除的群组成员!!不能删除管理员
+       * 
+ * + * repeated string group_member = 3; + */ + public Builder addGroupMemberBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureGroupMemberIsMutable(); + groupMember_.add(value); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiGroupRemoveMemberRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiGroupRemoveMemberRequest) + private static final com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest(); + } + + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiGroupRemoveMemberRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiGroupRemoveMemberRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiGroupRemoveMemberResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiGroupRemoveMemberResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code plugin.HaiGroupRemoveMemberResponse} + */ + public static final class HaiGroupRemoveMemberResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiGroupRemoveMemberResponse) + HaiGroupRemoveMemberResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiGroupRemoveMemberResponse.newBuilder() to construct. + private HaiGroupRemoveMemberResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiGroupRemoveMemberResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiGroupRemoveMemberResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.internal_static_plugin_HaiGroupRemoveMemberResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.internal_static_plugin_HaiGroupRemoveMemberResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse.class, com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse other = (com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiGroupRemoveMemberResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiGroupRemoveMemberResponse) + com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.internal_static_plugin_HaiGroupRemoveMemberResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.internal_static_plugin_HaiGroupRemoveMemberResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse.class, com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.internal_static_plugin_HaiGroupRemoveMemberResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse build() { + com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse buildPartial() { + com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse result = new com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse other) { + if (other == com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiGroupRemoveMemberResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiGroupRemoveMemberResponse) + private static final com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse(); + } + + public static com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiGroupRemoveMemberResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiGroupRemoveMemberResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiGroupRemoveMemberProto.HaiGroupRemoveMemberResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiGroupRemoveMemberRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiGroupRemoveMemberRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiGroupRemoveMemberResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiGroupRemoveMemberResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n#plugin/hai_group_removeMember.proto\022\006p" + + "lugin\"E\n\033HaiGroupRemoveMemberRequest\022\020\n\010" + + "group_id\030\001 \001(\t\022\024\n\014group_member\030\003 \003(\t\"\036\n\034" + + "HaiGroupRemoveMemberResponse2x\n\033HaiGroup" + + "RemoveMemberService\022Y\n\014removeMember\022#.pl" + + "ugin.HaiGroupRemoveMemberRequest\032$.plugi" + + "n.HaiGroupRemoveMemberResponseB4\n\027com.ak" + + "axin.proto.pluginB\031HaiGroupRemoveMemberP" + + "rotob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_plugin_HaiGroupRemoveMemberRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiGroupRemoveMemberRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiGroupRemoveMemberRequest_descriptor, + new java.lang.String[] { "GroupId", "GroupMember", }); + internal_static_plugin_HaiGroupRemoveMemberResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiGroupRemoveMemberResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiGroupRemoveMemberResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupUpdateProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupUpdateProto.java new file mode 100755 index 0000000..7abb4a3 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiGroupUpdateProto.java @@ -0,0 +1,1296 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_group_update.proto + +package com.akaxin.proto.plugin; + +public final class HaiGroupUpdateProto { + private HaiGroupUpdateProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiGroupUpdateRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiGroupUpdateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 显示的设置群组ID
+     * 
+ * + * string group_id = 1; + */ + java.lang.String getGroupId(); + /** + *
+     * 显示的设置群组ID
+     * 
+ * + * string group_id = 1; + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+     *需要更新的群组资料
+     * 
+ * + * .core.GroupProfile profile = 2; + */ + boolean hasProfile(); + /** + *
+     *需要更新的群组资料
+     * 
+ * + * .core.GroupProfile profile = 2; + */ + com.akaxin.proto.core.GroupProto.GroupProfile getProfile(); + /** + *
+     *需要更新的群组资料
+     * 
+ * + * .core.GroupProfile profile = 2; + */ + com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder getProfileOrBuilder(); + } + /** + *
+   **
+   *更新群资料
+   *----
+   *接口名
+   *----
+   * /hai/group/update
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiGroupUpdateRequest} + */ + public static final class HaiGroupUpdateRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiGroupUpdateRequest) + HaiGroupUpdateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiGroupUpdateRequest.newBuilder() to construct. + private HaiGroupUpdateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiGroupUpdateRequest() { + groupId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiGroupUpdateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + groupId_ = s; + break; + } + case 18: { + com.akaxin.proto.core.GroupProto.GroupProfile.Builder subBuilder = null; + if (profile_ != null) { + subBuilder = profile_.toBuilder(); + } + profile_ = input.readMessage(com.akaxin.proto.core.GroupProto.GroupProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(profile_); + profile_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupUpdateProto.internal_static_plugin_HaiGroupUpdateRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupUpdateProto.internal_static_plugin_HaiGroupUpdateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest.class, com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object groupId_; + /** + *
+     * 显示的设置群组ID
+     * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+     * 显示的设置群组ID
+     * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROFILE_FIELD_NUMBER = 2; + private com.akaxin.proto.core.GroupProto.GroupProfile profile_; + /** + *
+     *需要更新的群组资料
+     * 
+ * + * .core.GroupProfile profile = 2; + */ + public boolean hasProfile() { + return profile_ != null; + } + /** + *
+     *需要更新的群组资料
+     * 
+ * + * .core.GroupProfile profile = 2; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile getProfile() { + return profile_ == null ? com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance() : profile_; + } + /** + *
+     *需要更新的群组资料
+     * 
+ * + * .core.GroupProfile profile = 2; + */ + public com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder getProfileOrBuilder() { + return getProfile(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupId_); + } + if (profile_ != null) { + output.writeMessage(2, getProfile()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupId_); + } + if (profile_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getProfile()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest other = (com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest) obj; + + boolean result = true; + result = result && getGroupId() + .equals(other.getGroupId()); + result = result && (hasProfile() == other.hasProfile()); + if (hasProfile()) { + result = result && getProfile() + .equals(other.getProfile()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + if (hasProfile()) { + hash = (37 * hash) + PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getProfile().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *更新群资料
+     *----
+     *接口名
+     *----
+     * /hai/group/update
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiGroupUpdateRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiGroupUpdateRequest) + com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupUpdateProto.internal_static_plugin_HaiGroupUpdateRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupUpdateProto.internal_static_plugin_HaiGroupUpdateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest.class, com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + groupId_ = ""; + + if (profileBuilder_ == null) { + profile_ = null; + } else { + profile_ = null; + profileBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiGroupUpdateProto.internal_static_plugin_HaiGroupUpdateRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest build() { + com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest buildPartial() { + com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest result = new com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest(this); + result.groupId_ = groupId_; + if (profileBuilder_ == null) { + result.profile_ = profile_; + } else { + result.profile_ = profileBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest other) { + if (other == com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + onChanged(); + } + if (other.hasProfile()) { + mergeProfile(other.getProfile()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object groupId_ = ""; + /** + *
+       * 显示的设置群组ID
+       * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * 显示的设置群组ID
+       * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * 显示的设置群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupId_ = value; + onChanged(); + return this; + } + /** + *
+       * 显示的设置群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder clearGroupId() { + + groupId_ = getDefaultInstance().getGroupId(); + onChanged(); + return this; + } + /** + *
+       * 显示的设置群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupId_ = value; + onChanged(); + return this; + } + + private com.akaxin.proto.core.GroupProto.GroupProfile profile_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupProfile, com.akaxin.proto.core.GroupProto.GroupProfile.Builder, com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder> profileBuilder_; + /** + *
+       *需要更新的群组资料
+       * 
+ * + * .core.GroupProfile profile = 2; + */ + public boolean hasProfile() { + return profileBuilder_ != null || profile_ != null; + } + /** + *
+       *需要更新的群组资料
+       * 
+ * + * .core.GroupProfile profile = 2; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile getProfile() { + if (profileBuilder_ == null) { + return profile_ == null ? com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance() : profile_; + } else { + return profileBuilder_.getMessage(); + } + } + /** + *
+       *需要更新的群组资料
+       * 
+ * + * .core.GroupProfile profile = 2; + */ + public Builder setProfile(com.akaxin.proto.core.GroupProto.GroupProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profile_ = value; + onChanged(); + } else { + profileBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *需要更新的群组资料
+       * 
+ * + * .core.GroupProfile profile = 2; + */ + public Builder setProfile( + com.akaxin.proto.core.GroupProto.GroupProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + profile_ = builderForValue.build(); + onChanged(); + } else { + profileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *需要更新的群组资料
+       * 
+ * + * .core.GroupProfile profile = 2; + */ + public Builder mergeProfile(com.akaxin.proto.core.GroupProto.GroupProfile value) { + if (profileBuilder_ == null) { + if (profile_ != null) { + profile_ = + com.akaxin.proto.core.GroupProto.GroupProfile.newBuilder(profile_).mergeFrom(value).buildPartial(); + } else { + profile_ = value; + } + onChanged(); + } else { + profileBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *需要更新的群组资料
+       * 
+ * + * .core.GroupProfile profile = 2; + */ + public Builder clearProfile() { + if (profileBuilder_ == null) { + profile_ = null; + onChanged(); + } else { + profile_ = null; + profileBuilder_ = null; + } + + return this; + } + /** + *
+       *需要更新的群组资料
+       * 
+ * + * .core.GroupProfile profile = 2; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile.Builder getProfileBuilder() { + + onChanged(); + return getProfileFieldBuilder().getBuilder(); + } + /** + *
+       *需要更新的群组资料
+       * 
+ * + * .core.GroupProfile profile = 2; + */ + public com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder getProfileOrBuilder() { + if (profileBuilder_ != null) { + return profileBuilder_.getMessageOrBuilder(); + } else { + return profile_ == null ? + com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance() : profile_; + } + } + /** + *
+       *需要更新的群组资料
+       * 
+ * + * .core.GroupProfile profile = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupProfile, com.akaxin.proto.core.GroupProto.GroupProfile.Builder, com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder> + getProfileFieldBuilder() { + if (profileBuilder_ == null) { + profileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupProfile, com.akaxin.proto.core.GroupProto.GroupProfile.Builder, com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder>( + getProfile(), + getParentForChildren(), + isClean()); + profile_ = null; + } + return profileBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiGroupUpdateRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiGroupUpdateRequest) + private static final com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest(); + } + + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiGroupUpdateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiGroupUpdateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiGroupUpdateResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiGroupUpdateResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code plugin.HaiGroupUpdateResponse} + */ + public static final class HaiGroupUpdateResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiGroupUpdateResponse) + HaiGroupUpdateResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiGroupUpdateResponse.newBuilder() to construct. + private HaiGroupUpdateResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiGroupUpdateResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiGroupUpdateResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupUpdateProto.internal_static_plugin_HaiGroupUpdateResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupUpdateProto.internal_static_plugin_HaiGroupUpdateResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse.class, com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse other = (com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiGroupUpdateResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiGroupUpdateResponse) + com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiGroupUpdateProto.internal_static_plugin_HaiGroupUpdateResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiGroupUpdateProto.internal_static_plugin_HaiGroupUpdateResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse.class, com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiGroupUpdateProto.internal_static_plugin_HaiGroupUpdateResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse build() { + com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse buildPartial() { + com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse result = new com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse other) { + if (other == com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiGroupUpdateResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiGroupUpdateResponse) + private static final com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse(); + } + + public static com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiGroupUpdateResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiGroupUpdateResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiGroupUpdateProto.HaiGroupUpdateResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiGroupUpdateRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiGroupUpdateRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiGroupUpdateResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiGroupUpdateResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\035plugin/hai_group_update.proto\022\006plugin\032" + + "\020core/group.proto\"N\n\025HaiGroupUpdateReque" + + "st\022\020\n\010group_id\030\001 \001(\t\022#\n\007profile\030\002 \001(\0132\022." + + "core.GroupProfile\"\030\n\026HaiGroupUpdateRespo" + + "nse2`\n\025HaiGroupUpdateService\022G\n\006update\022\035" + + ".plugin.HaiGroupUpdateRequest\032\036.plugin.H" + + "aiGroupUpdateResponseB.\n\027com.akaxin.prot" + + "o.pluginB\023HaiGroupUpdateProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.GroupProto.getDescriptor(), + }, assigner); + internal_static_plugin_HaiGroupUpdateRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiGroupUpdateRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiGroupUpdateRequest_descriptor, + new java.lang.String[] { "GroupId", "Profile", }); + internal_static_plugin_HaiGroupUpdateResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiGroupUpdateResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiGroupUpdateResponse_descriptor, + new java.lang.String[] { }); + com.akaxin.proto.core.GroupProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiMessageProxyProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiMessageProxyProto.java new file mode 100755 index 0000000..27e9625 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiMessageProxyProto.java @@ -0,0 +1,1126 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_message_proxy.proto + +package com.akaxin.proto.plugin; + +public final class HaiMessageProxyProto { + private HaiMessageProxyProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiMessageProxyRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiMessageProxyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *代理发送的消息请求
+     * 
+ * + * .site.ImCtsMessageRequest proxy_msg = 1; + */ + boolean hasProxyMsg(); + /** + *
+     *代理发送的消息请求
+     * 
+ * + * .site.ImCtsMessageRequest proxy_msg = 1; + */ + com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest getProxyMsg(); + /** + *
+     *代理发送的消息请求
+     * 
+ * + * .site.ImCtsMessageRequest proxy_msg = 1; + */ + com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequestOrBuilder getProxyMsgOrBuilder(); + } + /** + *
+   **
+   *代发消息
+   *----
+   *接口名
+   *----
+   * /hai/message/proxy
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiMessageProxyRequest} + */ + public static final class HaiMessageProxyRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiMessageProxyRequest) + HaiMessageProxyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiMessageProxyRequest.newBuilder() to construct. + private HaiMessageProxyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiMessageProxyRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiMessageProxyRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest.Builder subBuilder = null; + if (proxyMsg_ != null) { + subBuilder = proxyMsg_.toBuilder(); + } + proxyMsg_ = input.readMessage(com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(proxyMsg_); + proxyMsg_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiMessageProxyProto.internal_static_plugin_HaiMessageProxyRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiMessageProxyProto.internal_static_plugin_HaiMessageProxyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest.class, com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest.Builder.class); + } + + public static final int PROXY_MSG_FIELD_NUMBER = 1; + private com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest proxyMsg_; + /** + *
+     *代理发送的消息请求
+     * 
+ * + * .site.ImCtsMessageRequest proxy_msg = 1; + */ + public boolean hasProxyMsg() { + return proxyMsg_ != null; + } + /** + *
+     *代理发送的消息请求
+     * 
+ * + * .site.ImCtsMessageRequest proxy_msg = 1; + */ + public com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest getProxyMsg() { + return proxyMsg_ == null ? com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest.getDefaultInstance() : proxyMsg_; + } + /** + *
+     *代理发送的消息请求
+     * 
+ * + * .site.ImCtsMessageRequest proxy_msg = 1; + */ + public com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequestOrBuilder getProxyMsgOrBuilder() { + return getProxyMsg(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (proxyMsg_ != null) { + output.writeMessage(1, getProxyMsg()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (proxyMsg_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProxyMsg()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest other = (com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest) obj; + + boolean result = true; + result = result && (hasProxyMsg() == other.hasProxyMsg()); + if (hasProxyMsg()) { + result = result && getProxyMsg() + .equals(other.getProxyMsg()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProxyMsg()) { + hash = (37 * hash) + PROXY_MSG_FIELD_NUMBER; + hash = (53 * hash) + getProxyMsg().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *代发消息
+     *----
+     *接口名
+     *----
+     * /hai/message/proxy
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiMessageProxyRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiMessageProxyRequest) + com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiMessageProxyProto.internal_static_plugin_HaiMessageProxyRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiMessageProxyProto.internal_static_plugin_HaiMessageProxyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest.class, com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (proxyMsgBuilder_ == null) { + proxyMsg_ = null; + } else { + proxyMsg_ = null; + proxyMsgBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiMessageProxyProto.internal_static_plugin_HaiMessageProxyRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest build() { + com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest buildPartial() { + com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest result = new com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest(this); + if (proxyMsgBuilder_ == null) { + result.proxyMsg_ = proxyMsg_; + } else { + result.proxyMsg_ = proxyMsgBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest other) { + if (other == com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest.getDefaultInstance()) return this; + if (other.hasProxyMsg()) { + mergeProxyMsg(other.getProxyMsg()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest proxyMsg_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest, com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest.Builder, com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequestOrBuilder> proxyMsgBuilder_; + /** + *
+       *代理发送的消息请求
+       * 
+ * + * .site.ImCtsMessageRequest proxy_msg = 1; + */ + public boolean hasProxyMsg() { + return proxyMsgBuilder_ != null || proxyMsg_ != null; + } + /** + *
+       *代理发送的消息请求
+       * 
+ * + * .site.ImCtsMessageRequest proxy_msg = 1; + */ + public com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest getProxyMsg() { + if (proxyMsgBuilder_ == null) { + return proxyMsg_ == null ? com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest.getDefaultInstance() : proxyMsg_; + } else { + return proxyMsgBuilder_.getMessage(); + } + } + /** + *
+       *代理发送的消息请求
+       * 
+ * + * .site.ImCtsMessageRequest proxy_msg = 1; + */ + public Builder setProxyMsg(com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest value) { + if (proxyMsgBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + proxyMsg_ = value; + onChanged(); + } else { + proxyMsgBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *代理发送的消息请求
+       * 
+ * + * .site.ImCtsMessageRequest proxy_msg = 1; + */ + public Builder setProxyMsg( + com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest.Builder builderForValue) { + if (proxyMsgBuilder_ == null) { + proxyMsg_ = builderForValue.build(); + onChanged(); + } else { + proxyMsgBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *代理发送的消息请求
+       * 
+ * + * .site.ImCtsMessageRequest proxy_msg = 1; + */ + public Builder mergeProxyMsg(com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest value) { + if (proxyMsgBuilder_ == null) { + if (proxyMsg_ != null) { + proxyMsg_ = + com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest.newBuilder(proxyMsg_).mergeFrom(value).buildPartial(); + } else { + proxyMsg_ = value; + } + onChanged(); + } else { + proxyMsgBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *代理发送的消息请求
+       * 
+ * + * .site.ImCtsMessageRequest proxy_msg = 1; + */ + public Builder clearProxyMsg() { + if (proxyMsgBuilder_ == null) { + proxyMsg_ = null; + onChanged(); + } else { + proxyMsg_ = null; + proxyMsgBuilder_ = null; + } + + return this; + } + /** + *
+       *代理发送的消息请求
+       * 
+ * + * .site.ImCtsMessageRequest proxy_msg = 1; + */ + public com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest.Builder getProxyMsgBuilder() { + + onChanged(); + return getProxyMsgFieldBuilder().getBuilder(); + } + /** + *
+       *代理发送的消息请求
+       * 
+ * + * .site.ImCtsMessageRequest proxy_msg = 1; + */ + public com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequestOrBuilder getProxyMsgOrBuilder() { + if (proxyMsgBuilder_ != null) { + return proxyMsgBuilder_.getMessageOrBuilder(); + } else { + return proxyMsg_ == null ? + com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest.getDefaultInstance() : proxyMsg_; + } + } + /** + *
+       *代理发送的消息请求
+       * 
+ * + * .site.ImCtsMessageRequest proxy_msg = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest, com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest.Builder, com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequestOrBuilder> + getProxyMsgFieldBuilder() { + if (proxyMsgBuilder_ == null) { + proxyMsgBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest, com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest.Builder, com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequestOrBuilder>( + getProxyMsg(), + getParentForChildren(), + isClean()); + proxyMsg_ = null; + } + return proxyMsgBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiMessageProxyRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiMessageProxyRequest) + private static final com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest(); + } + + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiMessageProxyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiMessageProxyRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiMessageProxyResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiMessageProxyResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code plugin.HaiMessageProxyResponse} + */ + public static final class HaiMessageProxyResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiMessageProxyResponse) + HaiMessageProxyResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiMessageProxyResponse.newBuilder() to construct. + private HaiMessageProxyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiMessageProxyResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiMessageProxyResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiMessageProxyProto.internal_static_plugin_HaiMessageProxyResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiMessageProxyProto.internal_static_plugin_HaiMessageProxyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse.class, com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse other = (com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiMessageProxyResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiMessageProxyResponse) + com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiMessageProxyProto.internal_static_plugin_HaiMessageProxyResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiMessageProxyProto.internal_static_plugin_HaiMessageProxyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse.class, com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiMessageProxyProto.internal_static_plugin_HaiMessageProxyResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse build() { + com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse buildPartial() { + com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse result = new com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse other) { + if (other == com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiMessageProxyResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiMessageProxyResponse) + private static final com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse(); + } + + public static com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiMessageProxyResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiMessageProxyResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiMessageProxyProto.HaiMessageProxyResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiMessageProxyRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiMessageProxyRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiMessageProxyResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiMessageProxyResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\036plugin/hai_message_proxy.proto\022\006plugin" + + "\032\017core/core.proto\032\031site/im_cts_message.p" + + "roto\"F\n\026HaiMessageProxyRequest\022,\n\tproxy_" + + "msg\030\001 \001(\0132\031.site.ImCtsMessageRequest\"\031\n\027" + + "HaiMessageProxyResponse2U\n\026HaiMessagePro" + + "xyService\022;\n\005proxy\022\036.plugin.HaiMessagePr" + + "oxyRequest\032\022.core.NoneResponseB/\n\027com.ak" + + "axin.proto.pluginB\024HaiMessageProxyProtob" + + "\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.CoreProto.getDescriptor(), + com.akaxin.proto.site.ImCtsMessageProto.getDescriptor(), + }, assigner); + internal_static_plugin_HaiMessageProxyRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiMessageProxyRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiMessageProxyRequest_descriptor, + new java.lang.String[] { "ProxyMsg", }); + internal_static_plugin_HaiMessageProxyResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiMessageProxyResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiMessageProxyResponse_descriptor, + new java.lang.String[] { }); + com.akaxin.proto.core.CoreProto.getDescriptor(); + com.akaxin.proto.site.ImCtsMessageProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiPushNoticesProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiPushNoticesProto.java new file mode 100755 index 0000000..1a9610d --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiPushNoticesProto.java @@ -0,0 +1,1386 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_push_notices.proto + +package com.akaxin.proto.plugin; + +public final class HaiPushNoticesProto { + private HaiPushNoticesProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiPushNoticesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiPushNoticesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *push通知的title(副标题),客户端主标题展示站点名称
+     * 
+ * + * string subtitle = 1; + */ + java.lang.String getSubtitle(); + /** + *
+     *push通知的title(副标题),客户端主标题展示站点名称
+     * 
+ * + * string subtitle = 1; + */ + com.google.protobuf.ByteString + getSubtitleBytes(); + + /** + *
+     *通知的内容
+     * 
+ * + * string content = 2; + */ + java.lang.String getContent(); + /** + *
+     *通知的内容
+     * 
+ * + * string content = 2; + */ + com.google.protobuf.ByteString + getContentBytes(); + + /** + *
+     *通知的跳转,可以为空。
+     * 
+ * + * string push_goto = 3; + */ + java.lang.String getPushGoto(); + /** + *
+     *通知的跳转,可以为空。
+     * 
+ * + * string push_goto = 3; + */ + com.google.protobuf.ByteString + getPushGotoBytes(); + } + /** + *
+   **
+   *向全员推送消息通知
+   *----
+   *接口名
+   *----
+   * /hai/push/notices
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiPushNoticesRequest} + */ + public static final class HaiPushNoticesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiPushNoticesRequest) + HaiPushNoticesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiPushNoticesRequest.newBuilder() to construct. + private HaiPushNoticesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiPushNoticesRequest() { + subtitle_ = ""; + content_ = ""; + pushGoto_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiPushNoticesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + subtitle_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + content_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pushGoto_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiPushNoticesProto.internal_static_plugin_HaiPushNoticesRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiPushNoticesProto.internal_static_plugin_HaiPushNoticesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest.class, com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest.Builder.class); + } + + public static final int SUBTITLE_FIELD_NUMBER = 1; + private volatile java.lang.Object subtitle_; + /** + *
+     *push通知的title(副标题),客户端主标题展示站点名称
+     * 
+ * + * string subtitle = 1; + */ + public java.lang.String getSubtitle() { + java.lang.Object ref = subtitle_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subtitle_ = s; + return s; + } + } + /** + *
+     *push通知的title(副标题),客户端主标题展示站点名称
+     * 
+ * + * string subtitle = 1; + */ + public com.google.protobuf.ByteString + getSubtitleBytes() { + java.lang.Object ref = subtitle_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subtitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 2; + private volatile java.lang.Object content_; + /** + *
+     *通知的内容
+     * 
+ * + * string content = 2; + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } + } + /** + *
+     *通知的内容
+     * 
+ * + * string content = 2; + */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUSH_GOTO_FIELD_NUMBER = 3; + private volatile java.lang.Object pushGoto_; + /** + *
+     *通知的跳转,可以为空。
+     * 
+ * + * string push_goto = 3; + */ + public java.lang.String getPushGoto() { + java.lang.Object ref = pushGoto_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushGoto_ = s; + return s; + } + } + /** + *
+     *通知的跳转,可以为空。
+     * 
+ * + * string push_goto = 3; + */ + public com.google.protobuf.ByteString + getPushGotoBytes() { + java.lang.Object ref = pushGoto_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushGoto_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSubtitleBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subtitle_); + } + if (!getContentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_); + } + if (!getPushGotoBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pushGoto_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSubtitleBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subtitle_); + } + if (!getContentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_); + } + if (!getPushGotoBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pushGoto_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest other = (com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest) obj; + + boolean result = true; + result = result && getSubtitle() + .equals(other.getSubtitle()); + result = result && getContent() + .equals(other.getContent()); + result = result && getPushGoto() + .equals(other.getPushGoto()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUBTITLE_FIELD_NUMBER; + hash = (53 * hash) + getSubtitle().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + PUSH_GOTO_FIELD_NUMBER; + hash = (53 * hash) + getPushGoto().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *向全员推送消息通知
+     *----
+     *接口名
+     *----
+     * /hai/push/notices
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiPushNoticesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiPushNoticesRequest) + com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiPushNoticesProto.internal_static_plugin_HaiPushNoticesRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiPushNoticesProto.internal_static_plugin_HaiPushNoticesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest.class, com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + subtitle_ = ""; + + content_ = ""; + + pushGoto_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiPushNoticesProto.internal_static_plugin_HaiPushNoticesRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest build() { + com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest buildPartial() { + com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest result = new com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest(this); + result.subtitle_ = subtitle_; + result.content_ = content_; + result.pushGoto_ = pushGoto_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest other) { + if (other == com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest.getDefaultInstance()) return this; + if (!other.getSubtitle().isEmpty()) { + subtitle_ = other.subtitle_; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + onChanged(); + } + if (!other.getPushGoto().isEmpty()) { + pushGoto_ = other.pushGoto_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object subtitle_ = ""; + /** + *
+       *push通知的title(副标题),客户端主标题展示站点名称
+       * 
+ * + * string subtitle = 1; + */ + public java.lang.String getSubtitle() { + java.lang.Object ref = subtitle_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subtitle_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *push通知的title(副标题),客户端主标题展示站点名称
+       * 
+ * + * string subtitle = 1; + */ + public com.google.protobuf.ByteString + getSubtitleBytes() { + java.lang.Object ref = subtitle_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subtitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *push通知的title(副标题),客户端主标题展示站点名称
+       * 
+ * + * string subtitle = 1; + */ + public Builder setSubtitle( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + subtitle_ = value; + onChanged(); + return this; + } + /** + *
+       *push通知的title(副标题),客户端主标题展示站点名称
+       * 
+ * + * string subtitle = 1; + */ + public Builder clearSubtitle() { + + subtitle_ = getDefaultInstance().getSubtitle(); + onChanged(); + return this; + } + /** + *
+       *push通知的title(副标题),客户端主标题展示站点名称
+       * 
+ * + * string subtitle = 1; + */ + public Builder setSubtitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + subtitle_ = value; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + /** + *
+       *通知的内容
+       * 
+ * + * string content = 2; + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *通知的内容
+       * 
+ * + * string content = 2; + */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *通知的内容
+       * 
+ * + * string content = 2; + */ + public Builder setContent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + *
+       *通知的内容
+       * 
+ * + * string content = 2; + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + /** + *
+       *通知的内容
+       * 
+ * + * string content = 2; + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + content_ = value; + onChanged(); + return this; + } + + private java.lang.Object pushGoto_ = ""; + /** + *
+       *通知的跳转,可以为空。
+       * 
+ * + * string push_goto = 3; + */ + public java.lang.String getPushGoto() { + java.lang.Object ref = pushGoto_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushGoto_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *通知的跳转,可以为空。
+       * 
+ * + * string push_goto = 3; + */ + public com.google.protobuf.ByteString + getPushGotoBytes() { + java.lang.Object ref = pushGoto_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushGoto_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *通知的跳转,可以为空。
+       * 
+ * + * string push_goto = 3; + */ + public Builder setPushGoto( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pushGoto_ = value; + onChanged(); + return this; + } + /** + *
+       *通知的跳转,可以为空。
+       * 
+ * + * string push_goto = 3; + */ + public Builder clearPushGoto() { + + pushGoto_ = getDefaultInstance().getPushGoto(); + onChanged(); + return this; + } + /** + *
+       *通知的跳转,可以为空。
+       * 
+ * + * string push_goto = 3; + */ + public Builder setPushGotoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pushGoto_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiPushNoticesRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiPushNoticesRequest) + private static final com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest(); + } + + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiPushNoticesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiPushNoticesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiPushNoticesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiPushNoticesResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code plugin.HaiPushNoticesResponse} + */ + public static final class HaiPushNoticesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiPushNoticesResponse) + HaiPushNoticesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiPushNoticesResponse.newBuilder() to construct. + private HaiPushNoticesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiPushNoticesResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiPushNoticesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiPushNoticesProto.internal_static_plugin_HaiPushNoticesResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiPushNoticesProto.internal_static_plugin_HaiPushNoticesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse.class, com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse other = (com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiPushNoticesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiPushNoticesResponse) + com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiPushNoticesProto.internal_static_plugin_HaiPushNoticesResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiPushNoticesProto.internal_static_plugin_HaiPushNoticesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse.class, com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiPushNoticesProto.internal_static_plugin_HaiPushNoticesResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse build() { + com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse buildPartial() { + com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse result = new com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse other) { + if (other == com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiPushNoticesResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiPushNoticesResponse) + private static final com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse(); + } + + public static com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiPushNoticesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiPushNoticesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiPushNoticesProto.HaiPushNoticesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiPushNoticesRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiPushNoticesRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiPushNoticesResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiPushNoticesResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\035plugin/hai_push_notices.proto\022\006plugin\"" + + "M\n\025HaiPushNoticesRequest\022\020\n\010subtitle\030\001 \001" + + "(\t\022\017\n\007content\030\002 \001(\t\022\021\n\tpush_goto\030\003 \001(\t\"\030" + + "\n\026HaiPushNoticesResponse2a\n\025HaiPushNotic" + + "esService\022H\n\007notices\022\035.plugin.HaiPushNot" + + "icesRequest\032\036.plugin.HaiPushNoticesRespo" + + "nseB.\n\027com.akaxin.proto.pluginB\023HaiPushN" + + "oticesProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_plugin_HaiPushNoticesRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiPushNoticesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiPushNoticesRequest_descriptor, + new java.lang.String[] { "Subtitle", "Content", "PushGoto", }); + internal_static_plugin_HaiPushNoticesResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiPushNoticesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiPushNoticesResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiSessionProfileProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiSessionProfileProto.java new file mode 100755 index 0000000..9b20500 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiSessionProfileProto.java @@ -0,0 +1,1298 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_session_profile.proto + +package com.akaxin.proto.plugin; + +public final class HaiSessionProfileProto { + private HaiSessionProfileProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiSessionProfileRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiSessionProfileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户的sessionid,base64_safe_url
+     * 
+ * + * string base64_safe_url_session_id = 1; + */ + java.lang.String getBase64SafeUrlSessionId(); + /** + *
+     *用户的sessionid,base64_safe_url
+     * 
+ * + * string base64_safe_url_session_id = 1; + */ + com.google.protobuf.ByteString + getBase64SafeUrlSessionIdBytes(); + } + /** + *
+   **
+   *通过用户session获取用户资料
+   *----
+   *接口名
+   *----
+   * /hai/session/profile
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiSessionProfileRequest} + */ + public static final class HaiSessionProfileRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiSessionProfileRequest) + HaiSessionProfileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiSessionProfileRequest.newBuilder() to construct. + private HaiSessionProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiSessionProfileRequest() { + base64SafeUrlSessionId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiSessionProfileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + base64SafeUrlSessionId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiSessionProfileProto.internal_static_plugin_HaiSessionProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiSessionProfileProto.internal_static_plugin_HaiSessionProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest.class, com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest.Builder.class); + } + + public static final int BASE64_SAFE_URL_SESSION_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object base64SafeUrlSessionId_; + /** + *
+     *用户的sessionid,base64_safe_url
+     * 
+ * + * string base64_safe_url_session_id = 1; + */ + public java.lang.String getBase64SafeUrlSessionId() { + java.lang.Object ref = base64SafeUrlSessionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64SafeUrlSessionId_ = s; + return s; + } + } + /** + *
+     *用户的sessionid,base64_safe_url
+     * 
+ * + * string base64_safe_url_session_id = 1; + */ + public com.google.protobuf.ByteString + getBase64SafeUrlSessionIdBytes() { + java.lang.Object ref = base64SafeUrlSessionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64SafeUrlSessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getBase64SafeUrlSessionIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, base64SafeUrlSessionId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getBase64SafeUrlSessionIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, base64SafeUrlSessionId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest other = (com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest) obj; + + boolean result = true; + result = result && getBase64SafeUrlSessionId() + .equals(other.getBase64SafeUrlSessionId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BASE64_SAFE_URL_SESSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getBase64SafeUrlSessionId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *通过用户session获取用户资料
+     *----
+     *接口名
+     *----
+     * /hai/session/profile
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiSessionProfileRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiSessionProfileRequest) + com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiSessionProfileProto.internal_static_plugin_HaiSessionProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiSessionProfileProto.internal_static_plugin_HaiSessionProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest.class, com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + base64SafeUrlSessionId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiSessionProfileProto.internal_static_plugin_HaiSessionProfileRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest build() { + com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest buildPartial() { + com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest result = new com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest(this); + result.base64SafeUrlSessionId_ = base64SafeUrlSessionId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest other) { + if (other == com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest.getDefaultInstance()) return this; + if (!other.getBase64SafeUrlSessionId().isEmpty()) { + base64SafeUrlSessionId_ = other.base64SafeUrlSessionId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object base64SafeUrlSessionId_ = ""; + /** + *
+       *用户的sessionid,base64_safe_url
+       * 
+ * + * string base64_safe_url_session_id = 1; + */ + public java.lang.String getBase64SafeUrlSessionId() { + java.lang.Object ref = base64SafeUrlSessionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + base64SafeUrlSessionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户的sessionid,base64_safe_url
+       * 
+ * + * string base64_safe_url_session_id = 1; + */ + public com.google.protobuf.ByteString + getBase64SafeUrlSessionIdBytes() { + java.lang.Object ref = base64SafeUrlSessionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + base64SafeUrlSessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户的sessionid,base64_safe_url
+       * 
+ * + * string base64_safe_url_session_id = 1; + */ + public Builder setBase64SafeUrlSessionId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + base64SafeUrlSessionId_ = value; + onChanged(); + return this; + } + /** + *
+       *用户的sessionid,base64_safe_url
+       * 
+ * + * string base64_safe_url_session_id = 1; + */ + public Builder clearBase64SafeUrlSessionId() { + + base64SafeUrlSessionId_ = getDefaultInstance().getBase64SafeUrlSessionId(); + onChanged(); + return this; + } + /** + *
+       *用户的sessionid,base64_safe_url
+       * 
+ * + * string base64_safe_url_session_id = 1; + */ + public Builder setBase64SafeUrlSessionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + base64SafeUrlSessionId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiSessionProfileRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiSessionProfileRequest) + private static final com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest(); + } + + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiSessionProfileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiSessionProfileRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiSessionProfileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiSessionProfileResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *需要查找的用户
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + boolean hasUserProfile(); + /** + *
+     *需要查找的用户
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + com.akaxin.proto.core.UserProto.UserProfile getUserProfile(); + /** + *
+     *需要查找的用户
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + com.akaxin.proto.core.UserProto.UserProfileOrBuilder getUserProfileOrBuilder(); + } + /** + * Protobuf type {@code plugin.HaiSessionProfileResponse} + */ + public static final class HaiSessionProfileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiSessionProfileResponse) + HaiSessionProfileResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiSessionProfileResponse.newBuilder() to construct. + private HaiSessionProfileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiSessionProfileResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiSessionProfileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.UserProto.UserProfile.Builder subBuilder = null; + if (userProfile_ != null) { + subBuilder = userProfile_.toBuilder(); + } + userProfile_ = input.readMessage(com.akaxin.proto.core.UserProto.UserProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(userProfile_); + userProfile_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiSessionProfileProto.internal_static_plugin_HaiSessionProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiSessionProfileProto.internal_static_plugin_HaiSessionProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse.class, com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse.Builder.class); + } + + public static final int USER_PROFILE_FIELD_NUMBER = 1; + private com.akaxin.proto.core.UserProto.UserProfile userProfile_; + /** + *
+     *需要查找的用户
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + public boolean hasUserProfile() { + return userProfile_ != null; + } + /** + *
+     *需要查找的用户
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile getUserProfile() { + return userProfile_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : userProfile_; + } + /** + *
+     *需要查找的用户
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getUserProfileOrBuilder() { + return getUserProfile(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (userProfile_ != null) { + output.writeMessage(1, getUserProfile()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (userProfile_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUserProfile()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse other = (com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse) obj; + + boolean result = true; + result = result && (hasUserProfile() == other.hasUserProfile()); + if (hasUserProfile()) { + result = result && getUserProfile() + .equals(other.getUserProfile()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUserProfile()) { + hash = (37 * hash) + USER_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getUserProfile().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiSessionProfileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiSessionProfileResponse) + com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiSessionProfileProto.internal_static_plugin_HaiSessionProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiSessionProfileProto.internal_static_plugin_HaiSessionProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse.class, com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (userProfileBuilder_ == null) { + userProfile_ = null; + } else { + userProfile_ = null; + userProfileBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiSessionProfileProto.internal_static_plugin_HaiSessionProfileResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse build() { + com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse buildPartial() { + com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse result = new com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse(this); + if (userProfileBuilder_ == null) { + result.userProfile_ = userProfile_; + } else { + result.userProfile_ = userProfileBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse other) { + if (other == com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse.getDefaultInstance()) return this; + if (other.hasUserProfile()) { + mergeUserProfile(other.getUserProfile()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.core.UserProto.UserProfile userProfile_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> userProfileBuilder_; + /** + *
+       *需要查找的用户
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public boolean hasUserProfile() { + return userProfileBuilder_ != null || userProfile_ != null; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile getUserProfile() { + if (userProfileBuilder_ == null) { + return userProfile_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : userProfile_; + } else { + return userProfileBuilder_.getMessage(); + } + } + /** + *
+       *需要查找的用户
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder setUserProfile(com.akaxin.proto.core.UserProto.UserProfile value) { + if (userProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userProfile_ = value; + onChanged(); + } else { + userProfileBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder setUserProfile( + com.akaxin.proto.core.UserProto.UserProfile.Builder builderForValue) { + if (userProfileBuilder_ == null) { + userProfile_ = builderForValue.build(); + onChanged(); + } else { + userProfileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder mergeUserProfile(com.akaxin.proto.core.UserProto.UserProfile value) { + if (userProfileBuilder_ == null) { + if (userProfile_ != null) { + userProfile_ = + com.akaxin.proto.core.UserProto.UserProfile.newBuilder(userProfile_).mergeFrom(value).buildPartial(); + } else { + userProfile_ = value; + } + onChanged(); + } else { + userProfileBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder clearUserProfile() { + if (userProfileBuilder_ == null) { + userProfile_ = null; + onChanged(); + } else { + userProfile_ = null; + userProfileBuilder_ = null; + } + + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile.Builder getUserProfileBuilder() { + + onChanged(); + return getUserProfileFieldBuilder().getBuilder(); + } + /** + *
+       *需要查找的用户
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getUserProfileOrBuilder() { + if (userProfileBuilder_ != null) { + return userProfileBuilder_.getMessageOrBuilder(); + } else { + return userProfile_ == null ? + com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : userProfile_; + } + } + /** + *
+       *需要查找的用户
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> + getUserProfileFieldBuilder() { + if (userProfileBuilder_ == null) { + userProfileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder>( + getUserProfile(), + getParentForChildren(), + isClean()); + userProfile_ = null; + } + return userProfileBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiSessionProfileResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiSessionProfileResponse) + private static final com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse(); + } + + public static com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiSessionProfileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiSessionProfileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiSessionProfileProto.HaiSessionProfileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiSessionProfileRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiSessionProfileRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiSessionProfileResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiSessionProfileResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n plugin/hai_session_profile.proto\022\006plug" + + "in\032\017core/user.proto\">\n\030HaiSessionProfile" + + "Request\022\"\n\032base64_safe_url_session_id\030\001 " + + "\001(\t\"D\n\031HaiSessionProfileResponse\022\'\n\014user" + + "_profile\030\001 \001(\0132\021.core.UserProfile2j\n\030Hai" + + "SessionProfileService\022N\n\007profile\022 .plugi" + + "n.HaiSessionProfileRequest\032!.plugin.HaiS" + + "essionProfileResponseB1\n\027com.akaxin.prot" + + "o.pluginB\026HaiSessionProfileProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.UserProto.getDescriptor(), + }, assigner); + internal_static_plugin_HaiSessionProfileRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiSessionProfileRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiSessionProfileRequest_descriptor, + new java.lang.String[] { "Base64SafeUrlSessionId", }); + internal_static_plugin_HaiSessionProfileResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiSessionProfileResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiSessionProfileResponse_descriptor, + new java.lang.String[] { "UserProfile", }); + com.akaxin.proto.core.UserProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiSiteGetConfigProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiSiteGetConfigProto.java new file mode 100755 index 0000000..4826a4d --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiSiteGetConfigProto.java @@ -0,0 +1,1124 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_site_getConfig.proto + +package com.akaxin.proto.plugin; + +public final class HaiSiteGetConfigProto { + private HaiSiteGetConfigProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiSiteGetConfigRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiSiteGetConfigRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   **
+   *获取站点的配置
+   *----
+   *接口名
+   *----
+   * /hai/site/getConfig
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiSiteGetConfigRequest} + */ + public static final class HaiSiteGetConfigRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiSiteGetConfigRequest) + HaiSiteGetConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiSiteGetConfigRequest.newBuilder() to construct. + private HaiSiteGetConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiSiteGetConfigRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiSiteGetConfigRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiSiteGetConfigProto.internal_static_plugin_HaiSiteGetConfigRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiSiteGetConfigProto.internal_static_plugin_HaiSiteGetConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest.class, com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest other = (com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *获取站点的配置
+     *----
+     *接口名
+     *----
+     * /hai/site/getConfig
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiSiteGetConfigRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiSiteGetConfigRequest) + com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiSiteGetConfigProto.internal_static_plugin_HaiSiteGetConfigRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiSiteGetConfigProto.internal_static_plugin_HaiSiteGetConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest.class, com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiSiteGetConfigProto.internal_static_plugin_HaiSiteGetConfigRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest build() { + com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest buildPartial() { + com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest result = new com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest other) { + if (other == com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiSiteGetConfigRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiSiteGetConfigRequest) + private static final com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest(); + } + + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiSiteGetConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiSiteGetConfigRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiSiteGetConfigResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiSiteGetConfigResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *信息配置,Key为SiteConfigKey
+     * 
+ * + * .core.SiteBackConfig site_config = 1; + */ + boolean hasSiteConfig(); + /** + *
+     *信息配置,Key为SiteConfigKey
+     * 
+ * + * .core.SiteBackConfig site_config = 1; + */ + com.akaxin.proto.core.ConfigProto.SiteBackConfig getSiteConfig(); + /** + *
+     *信息配置,Key为SiteConfigKey
+     * 
+ * + * .core.SiteBackConfig site_config = 1; + */ + com.akaxin.proto.core.ConfigProto.SiteBackConfigOrBuilder getSiteConfigOrBuilder(); + } + /** + * Protobuf type {@code plugin.HaiSiteGetConfigResponse} + */ + public static final class HaiSiteGetConfigResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiSiteGetConfigResponse) + HaiSiteGetConfigResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiSiteGetConfigResponse.newBuilder() to construct. + private HaiSiteGetConfigResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiSiteGetConfigResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiSiteGetConfigResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.ConfigProto.SiteBackConfig.Builder subBuilder = null; + if (siteConfig_ != null) { + subBuilder = siteConfig_.toBuilder(); + } + siteConfig_ = input.readMessage(com.akaxin.proto.core.ConfigProto.SiteBackConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(siteConfig_); + siteConfig_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiSiteGetConfigProto.internal_static_plugin_HaiSiteGetConfigResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiSiteGetConfigProto.internal_static_plugin_HaiSiteGetConfigResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse.class, com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse.Builder.class); + } + + public static final int SITE_CONFIG_FIELD_NUMBER = 1; + private com.akaxin.proto.core.ConfigProto.SiteBackConfig siteConfig_; + /** + *
+     *信息配置,Key为SiteConfigKey
+     * 
+ * + * .core.SiteBackConfig site_config = 1; + */ + public boolean hasSiteConfig() { + return siteConfig_ != null; + } + /** + *
+     *信息配置,Key为SiteConfigKey
+     * 
+ * + * .core.SiteBackConfig site_config = 1; + */ + public com.akaxin.proto.core.ConfigProto.SiteBackConfig getSiteConfig() { + return siteConfig_ == null ? com.akaxin.proto.core.ConfigProto.SiteBackConfig.getDefaultInstance() : siteConfig_; + } + /** + *
+     *信息配置,Key为SiteConfigKey
+     * 
+ * + * .core.SiteBackConfig site_config = 1; + */ + public com.akaxin.proto.core.ConfigProto.SiteBackConfigOrBuilder getSiteConfigOrBuilder() { + return getSiteConfig(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (siteConfig_ != null) { + output.writeMessage(1, getSiteConfig()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (siteConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getSiteConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse other = (com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse) obj; + + boolean result = true; + result = result && (hasSiteConfig() == other.hasSiteConfig()); + if (hasSiteConfig()) { + result = result && getSiteConfig() + .equals(other.getSiteConfig()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSiteConfig()) { + hash = (37 * hash) + SITE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSiteConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiSiteGetConfigResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiSiteGetConfigResponse) + com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiSiteGetConfigProto.internal_static_plugin_HaiSiteGetConfigResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiSiteGetConfigProto.internal_static_plugin_HaiSiteGetConfigResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse.class, com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (siteConfigBuilder_ == null) { + siteConfig_ = null; + } else { + siteConfig_ = null; + siteConfigBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiSiteGetConfigProto.internal_static_plugin_HaiSiteGetConfigResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse build() { + com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse buildPartial() { + com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse result = new com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse(this); + if (siteConfigBuilder_ == null) { + result.siteConfig_ = siteConfig_; + } else { + result.siteConfig_ = siteConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse other) { + if (other == com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse.getDefaultInstance()) return this; + if (other.hasSiteConfig()) { + mergeSiteConfig(other.getSiteConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.core.ConfigProto.SiteBackConfig siteConfig_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.ConfigProto.SiteBackConfig, com.akaxin.proto.core.ConfigProto.SiteBackConfig.Builder, com.akaxin.proto.core.ConfigProto.SiteBackConfigOrBuilder> siteConfigBuilder_; + /** + *
+       *信息配置,Key为SiteConfigKey
+       * 
+ * + * .core.SiteBackConfig site_config = 1; + */ + public boolean hasSiteConfig() { + return siteConfigBuilder_ != null || siteConfig_ != null; + } + /** + *
+       *信息配置,Key为SiteConfigKey
+       * 
+ * + * .core.SiteBackConfig site_config = 1; + */ + public com.akaxin.proto.core.ConfigProto.SiteBackConfig getSiteConfig() { + if (siteConfigBuilder_ == null) { + return siteConfig_ == null ? com.akaxin.proto.core.ConfigProto.SiteBackConfig.getDefaultInstance() : siteConfig_; + } else { + return siteConfigBuilder_.getMessage(); + } + } + /** + *
+       *信息配置,Key为SiteConfigKey
+       * 
+ * + * .core.SiteBackConfig site_config = 1; + */ + public Builder setSiteConfig(com.akaxin.proto.core.ConfigProto.SiteBackConfig value) { + if (siteConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + siteConfig_ = value; + onChanged(); + } else { + siteConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *信息配置,Key为SiteConfigKey
+       * 
+ * + * .core.SiteBackConfig site_config = 1; + */ + public Builder setSiteConfig( + com.akaxin.proto.core.ConfigProto.SiteBackConfig.Builder builderForValue) { + if (siteConfigBuilder_ == null) { + siteConfig_ = builderForValue.build(); + onChanged(); + } else { + siteConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *信息配置,Key为SiteConfigKey
+       * 
+ * + * .core.SiteBackConfig site_config = 1; + */ + public Builder mergeSiteConfig(com.akaxin.proto.core.ConfigProto.SiteBackConfig value) { + if (siteConfigBuilder_ == null) { + if (siteConfig_ != null) { + siteConfig_ = + com.akaxin.proto.core.ConfigProto.SiteBackConfig.newBuilder(siteConfig_).mergeFrom(value).buildPartial(); + } else { + siteConfig_ = value; + } + onChanged(); + } else { + siteConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *信息配置,Key为SiteConfigKey
+       * 
+ * + * .core.SiteBackConfig site_config = 1; + */ + public Builder clearSiteConfig() { + if (siteConfigBuilder_ == null) { + siteConfig_ = null; + onChanged(); + } else { + siteConfig_ = null; + siteConfigBuilder_ = null; + } + + return this; + } + /** + *
+       *信息配置,Key为SiteConfigKey
+       * 
+ * + * .core.SiteBackConfig site_config = 1; + */ + public com.akaxin.proto.core.ConfigProto.SiteBackConfig.Builder getSiteConfigBuilder() { + + onChanged(); + return getSiteConfigFieldBuilder().getBuilder(); + } + /** + *
+       *信息配置,Key为SiteConfigKey
+       * 
+ * + * .core.SiteBackConfig site_config = 1; + */ + public com.akaxin.proto.core.ConfigProto.SiteBackConfigOrBuilder getSiteConfigOrBuilder() { + if (siteConfigBuilder_ != null) { + return siteConfigBuilder_.getMessageOrBuilder(); + } else { + return siteConfig_ == null ? + com.akaxin.proto.core.ConfigProto.SiteBackConfig.getDefaultInstance() : siteConfig_; + } + } + /** + *
+       *信息配置,Key为SiteConfigKey
+       * 
+ * + * .core.SiteBackConfig site_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.ConfigProto.SiteBackConfig, com.akaxin.proto.core.ConfigProto.SiteBackConfig.Builder, com.akaxin.proto.core.ConfigProto.SiteBackConfigOrBuilder> + getSiteConfigFieldBuilder() { + if (siteConfigBuilder_ == null) { + siteConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.ConfigProto.SiteBackConfig, com.akaxin.proto.core.ConfigProto.SiteBackConfig.Builder, com.akaxin.proto.core.ConfigProto.SiteBackConfigOrBuilder>( + getSiteConfig(), + getParentForChildren(), + isClean()); + siteConfig_ = null; + } + return siteConfigBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiSiteGetConfigResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiSiteGetConfigResponse) + private static final com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse(); + } + + public static com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiSiteGetConfigResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiSiteGetConfigResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiSiteGetConfigProto.HaiSiteGetConfigResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiSiteGetConfigRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiSiteGetConfigRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiSiteGetConfigResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiSiteGetConfigResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\037plugin/hai_site_getConfig.proto\022\006plugi" + + "n\032\021core/config.proto\"\031\n\027HaiSiteGetConfig" + + "Request\"E\n\030HaiSiteGetConfigResponse\022)\n\013s" + + "ite_config\030\001 \001(\0132\024.core.SiteBackConfig2i" + + "\n\027HaiSiteGetConfigService\022N\n\tgetConfig\022\037" + + ".plugin.HaiSiteGetConfigRequest\032 .plugin" + + ".HaiSiteGetConfigResponseB0\n\027com.akaxin." + + "proto.pluginB\025HaiSiteGetConfigProtob\006pro" + + "to3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.ConfigProto.getDescriptor(), + }, assigner); + internal_static_plugin_HaiSiteGetConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiSiteGetConfigRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiSiteGetConfigRequest_descriptor, + new java.lang.String[] { }); + internal_static_plugin_HaiSiteGetConfigResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiSiteGetConfigResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiSiteGetConfigResponse_descriptor, + new java.lang.String[] { "SiteConfig", }); + com.akaxin.proto.core.ConfigProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserAvatarProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserAvatarProto.java new file mode 100755 index 0000000..1b77b7d --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserAvatarProto.java @@ -0,0 +1,1300 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_user_avatar.proto + +package com.akaxin.proto.plugin; + +public final class HaiUserAvatarProto { + private HaiUserAvatarProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiUserAvatarRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiUserAvatarRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户的siteUserId
+     * 
+ * + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + *
+     *用户的siteUserId
+     * 
+ * + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + } + /** + *
+   **
+   *获取用户头像
+   *----
+   *接口名
+   *----
+   * /hai/user/avatar
+   *错误码
+   *----
+   *- success
+   *- error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiUserAvatarRequest} + */ + public static final class HaiUserAvatarRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiUserAvatarRequest) + HaiUserAvatarRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiUserAvatarRequest.newBuilder() to construct. + private HaiUserAvatarRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiUserAvatarRequest() { + siteUserId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiUserAvatarRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserAvatarProto.internal_static_plugin_HaiUserAvatarRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserAvatarProto.internal_static_plugin_HaiUserAvatarRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest.class, com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + *
+     *用户的siteUserId
+     * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *用户的siteUserId
+     * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest other = (com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *获取用户头像
+     *----
+     *接口名
+     *----
+     * /hai/user/avatar
+     *错误码
+     *----
+     *- success
+     *- error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiUserAvatarRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiUserAvatarRequest) + com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserAvatarProto.internal_static_plugin_HaiUserAvatarRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserAvatarProto.internal_static_plugin_HaiUserAvatarRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest.class, com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiUserAvatarProto.internal_static_plugin_HaiUserAvatarRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest build() { + com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest buildPartial() { + com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest result = new com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest(this); + result.siteUserId_ = siteUserId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest other) { + if (other == com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *用户的siteUserId
+       * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户的siteUserId
+       * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户的siteUserId
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *用户的siteUserId
+       * 
+ * + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *用户的siteUserId
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiUserAvatarRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiUserAvatarRequest) + private static final com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest(); + } + + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiUserAvatarRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiUserAvatarRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiUserAvatarResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiUserAvatarResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *头像图片的ID
+     * 
+ * + * string photo_id = 1; + */ + java.lang.String getPhotoId(); + /** + *
+     *头像图片的ID
+     * 
+ * + * string photo_id = 1; + */ + com.google.protobuf.ByteString + getPhotoIdBytes(); + + /** + *
+     *图片二进制内容
+     * 
+ * + * bytes photo_content = 2; + */ + com.google.protobuf.ByteString getPhotoContent(); + } + /** + * Protobuf type {@code plugin.HaiUserAvatarResponse} + */ + public static final class HaiUserAvatarResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiUserAvatarResponse) + HaiUserAvatarResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiUserAvatarResponse.newBuilder() to construct. + private HaiUserAvatarResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiUserAvatarResponse() { + photoId_ = ""; + photoContent_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiUserAvatarResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + photoId_ = s; + break; + } + case 18: { + + photoContent_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserAvatarProto.internal_static_plugin_HaiUserAvatarResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserAvatarProto.internal_static_plugin_HaiUserAvatarResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse.class, com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse.Builder.class); + } + + public static final int PHOTO_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object photoId_; + /** + *
+     *头像图片的ID
+     * 
+ * + * string photo_id = 1; + */ + public java.lang.String getPhotoId() { + java.lang.Object ref = photoId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + photoId_ = s; + return s; + } + } + /** + *
+     *头像图片的ID
+     * 
+ * + * string photo_id = 1; + */ + public com.google.protobuf.ByteString + getPhotoIdBytes() { + java.lang.Object ref = photoId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + photoId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PHOTO_CONTENT_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString photoContent_; + /** + *
+     *图片二进制内容
+     * 
+ * + * bytes photo_content = 2; + */ + public com.google.protobuf.ByteString getPhotoContent() { + return photoContent_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getPhotoIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, photoId_); + } + if (!photoContent_.isEmpty()) { + output.writeBytes(2, photoContent_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPhotoIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, photoId_); + } + if (!photoContent_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, photoContent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse other = (com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse) obj; + + boolean result = true; + result = result && getPhotoId() + .equals(other.getPhotoId()); + result = result && getPhotoContent() + .equals(other.getPhotoContent()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PHOTO_ID_FIELD_NUMBER; + hash = (53 * hash) + getPhotoId().hashCode(); + hash = (37 * hash) + PHOTO_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getPhotoContent().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiUserAvatarResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiUserAvatarResponse) + com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserAvatarProto.internal_static_plugin_HaiUserAvatarResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserAvatarProto.internal_static_plugin_HaiUserAvatarResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse.class, com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + photoId_ = ""; + + photoContent_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiUserAvatarProto.internal_static_plugin_HaiUserAvatarResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse build() { + com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse buildPartial() { + com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse result = new com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse(this); + result.photoId_ = photoId_; + result.photoContent_ = photoContent_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse other) { + if (other == com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse.getDefaultInstance()) return this; + if (!other.getPhotoId().isEmpty()) { + photoId_ = other.photoId_; + onChanged(); + } + if (other.getPhotoContent() != com.google.protobuf.ByteString.EMPTY) { + setPhotoContent(other.getPhotoContent()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object photoId_ = ""; + /** + *
+       *头像图片的ID
+       * 
+ * + * string photo_id = 1; + */ + public java.lang.String getPhotoId() { + java.lang.Object ref = photoId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + photoId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *头像图片的ID
+       * 
+ * + * string photo_id = 1; + */ + public com.google.protobuf.ByteString + getPhotoIdBytes() { + java.lang.Object ref = photoId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + photoId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *头像图片的ID
+       * 
+ * + * string photo_id = 1; + */ + public Builder setPhotoId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + photoId_ = value; + onChanged(); + return this; + } + /** + *
+       *头像图片的ID
+       * 
+ * + * string photo_id = 1; + */ + public Builder clearPhotoId() { + + photoId_ = getDefaultInstance().getPhotoId(); + onChanged(); + return this; + } + /** + *
+       *头像图片的ID
+       * 
+ * + * string photo_id = 1; + */ + public Builder setPhotoIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + photoId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString photoContent_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       *图片二进制内容
+       * 
+ * + * bytes photo_content = 2; + */ + public com.google.protobuf.ByteString getPhotoContent() { + return photoContent_; + } + /** + *
+       *图片二进制内容
+       * 
+ * + * bytes photo_content = 2; + */ + public Builder setPhotoContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + photoContent_ = value; + onChanged(); + return this; + } + /** + *
+       *图片二进制内容
+       * 
+ * + * bytes photo_content = 2; + */ + public Builder clearPhotoContent() { + + photoContent_ = getDefaultInstance().getPhotoContent(); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiUserAvatarResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiUserAvatarResponse) + private static final com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse(); + } + + public static com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiUserAvatarResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiUserAvatarResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiUserAvatarProto.HaiUserAvatarResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiUserAvatarRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiUserAvatarRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiUserAvatarResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiUserAvatarResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034plugin/hai_user_avatar.proto\022\006plugin\"," + + "\n\024HaiUserAvatarRequest\022\024\n\014site_user_id\030\001" + + " \001(\t\"@\n\025HaiUserAvatarResponse\022\020\n\010photo_i" + + "d\030\001 \001(\t\022\025\n\rphoto_content\030\002 \001(\0142]\n\024HaiUse" + + "rAvatarService\022E\n\006avatar\022\034.plugin.HaiUse" + + "rAvatarRequest\032\035.plugin.HaiUserAvatarRes" + + "ponseB-\n\027com.akaxin.proto.pluginB\022HaiUse" + + "rAvatarProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_plugin_HaiUserAvatarRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiUserAvatarRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiUserAvatarRequest_descriptor, + new java.lang.String[] { "SiteUserId", }); + internal_static_plugin_HaiUserAvatarResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiUserAvatarResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiUserAvatarResponse_descriptor, + new java.lang.String[] { "PhotoId", "PhotoContent", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserFriendsProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserFriendsProto.java new file mode 100755 index 0000000..43405ad --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserFriendsProto.java @@ -0,0 +1,1778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_user_friends.proto + +package com.akaxin.proto.plugin; + +public final class HaiUserFriendsProto { + private HaiUserFriendsProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiUserFriendsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiUserFriendsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *需要查找的用户ID
+     * 
+ * + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + *
+     *需要查找的用户ID
+     * 
+ * + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     * 默认0
+     * 
+ * + * int32 page_number = 3; + */ + int getPageNumber(); + + /** + *
+     * 默认100
+     * 
+ * + * int32 page_size = 4; + */ + int getPageSize(); + } + /** + *
+   **
+   *获取用户的好友列表
+   *----
+   *接口名
+   *----
+   * /hai/user/friends
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiUserFriendsRequest} + */ + public static final class HaiUserFriendsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiUserFriendsRequest) + HaiUserFriendsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiUserFriendsRequest.newBuilder() to construct. + private HaiUserFriendsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiUserFriendsRequest() { + siteUserId_ = ""; + pageNumber_ = 0; + pageSize_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiUserFriendsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 24: { + + pageNumber_ = input.readInt32(); + break; + } + case 32: { + + pageSize_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserFriendsProto.internal_static_plugin_HaiUserFriendsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserFriendsProto.internal_static_plugin_HaiUserFriendsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest.class, com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + *
+     *需要查找的用户ID
+     * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *需要查找的用户ID
+     * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_NUMBER_FIELD_NUMBER = 3; + private int pageNumber_; + /** + *
+     * 默认0
+     * 
+ * + * int32 page_number = 3; + */ + public int getPageNumber() { + return pageNumber_; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_; + /** + *
+     * 默认100
+     * 
+ * + * int32 page_size = 4; + */ + public int getPageSize() { + return pageSize_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + if (pageNumber_ != 0) { + output.writeInt32(3, pageNumber_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + if (pageNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageNumber_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, pageSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest other = (com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && (getPageNumber() + == other.getPageNumber()); + result = result && (getPageSize() + == other.getPageSize()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getPageNumber(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *获取用户的好友列表
+     *----
+     *接口名
+     *----
+     * /hai/user/friends
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiUserFriendsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiUserFriendsRequest) + com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserFriendsProto.internal_static_plugin_HaiUserFriendsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserFriendsProto.internal_static_plugin_HaiUserFriendsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest.class, com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + pageNumber_ = 0; + + pageSize_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiUserFriendsProto.internal_static_plugin_HaiUserFriendsRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest build() { + com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest buildPartial() { + com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest result = new com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest(this); + result.siteUserId_ = siteUserId_; + result.pageNumber_ = pageNumber_; + result.pageSize_ = pageSize_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest other) { + if (other == com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (other.getPageNumber() != 0) { + setPageNumber(other.getPageNumber()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *需要查找的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *需要查找的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *需要查找的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *需要查找的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *需要查找的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private int pageNumber_ ; + /** + *
+       * 默认0
+       * 
+ * + * int32 page_number = 3; + */ + public int getPageNumber() { + return pageNumber_; + } + /** + *
+       * 默认0
+       * 
+ * + * int32 page_number = 3; + */ + public Builder setPageNumber(int value) { + + pageNumber_ = value; + onChanged(); + return this; + } + /** + *
+       * 默认0
+       * 
+ * + * int32 page_number = 3; + */ + public Builder clearPageNumber() { + + pageNumber_ = 0; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+       * 默认100
+       * 
+ * + * int32 page_size = 4; + */ + public int getPageSize() { + return pageSize_; + } + /** + *
+       * 默认100
+       * 
+ * + * int32 page_size = 4; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+       * 默认100
+       * 
+ * + * int32 page_size = 4; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiUserFriendsRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiUserFriendsRequest) + private static final com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest(); + } + + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiUserFriendsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiUserFriendsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiUserFriendsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiUserFriendsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + java.util.List + getProfileList(); + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + com.akaxin.proto.core.UserProto.SimpleUserProfile getProfile(int index); + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + int getProfileCount(); + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + java.util.List + getProfileOrBuilderList(); + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder getProfileOrBuilder( + int index); + + /** + *
+     *总页数
+     * 
+ * + * int32 page_total_num = 2; + */ + int getPageTotalNum(); + } + /** + * Protobuf type {@code plugin.HaiUserFriendsResponse} + */ + public static final class HaiUserFriendsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiUserFriendsResponse) + HaiUserFriendsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiUserFriendsResponse.newBuilder() to construct. + private HaiUserFriendsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiUserFriendsResponse() { + profile_ = java.util.Collections.emptyList(); + pageTotalNum_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiUserFriendsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + profile_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + profile_.add( + input.readMessage(com.akaxin.proto.core.UserProto.SimpleUserProfile.parser(), extensionRegistry)); + break; + } + case 16: { + + pageTotalNum_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + profile_ = java.util.Collections.unmodifiableList(profile_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserFriendsProto.internal_static_plugin_HaiUserFriendsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserFriendsProto.internal_static_plugin_HaiUserFriendsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse.class, com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse.Builder.class); + } + + private int bitField0_; + public static final int PROFILE_FIELD_NUMBER = 1; + private java.util.List profile_; + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public java.util.List getProfileList() { + return profile_; + } + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public java.util.List + getProfileOrBuilderList() { + return profile_; + } + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public int getProfileCount() { + return profile_.size(); + } + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile getProfile(int index) { + return profile_.get(index); + } + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder getProfileOrBuilder( + int index) { + return profile_.get(index); + } + + public static final int PAGE_TOTAL_NUM_FIELD_NUMBER = 2; + private int pageTotalNum_; + /** + *
+     *总页数
+     * 
+ * + * int32 page_total_num = 2; + */ + public int getPageTotalNum() { + return pageTotalNum_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < profile_.size(); i++) { + output.writeMessage(1, profile_.get(i)); + } + if (pageTotalNum_ != 0) { + output.writeInt32(2, pageTotalNum_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < profile_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, profile_.get(i)); + } + if (pageTotalNum_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageTotalNum_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse other = (com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse) obj; + + boolean result = true; + result = result && getProfileList() + .equals(other.getProfileList()); + result = result && (getPageTotalNum() + == other.getPageTotalNum()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProfileCount() > 0) { + hash = (37 * hash) + PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getProfileList().hashCode(); + } + hash = (37 * hash) + PAGE_TOTAL_NUM_FIELD_NUMBER; + hash = (53 * hash) + getPageTotalNum(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiUserFriendsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiUserFriendsResponse) + com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserFriendsProto.internal_static_plugin_HaiUserFriendsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserFriendsProto.internal_static_plugin_HaiUserFriendsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse.class, com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getProfileFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (profileBuilder_ == null) { + profile_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + profileBuilder_.clear(); + } + pageTotalNum_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiUserFriendsProto.internal_static_plugin_HaiUserFriendsResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse build() { + com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse buildPartial() { + com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse result = new com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (profileBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + profile_ = java.util.Collections.unmodifiableList(profile_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.profile_ = profile_; + } else { + result.profile_ = profileBuilder_.build(); + } + result.pageTotalNum_ = pageTotalNum_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse other) { + if (other == com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse.getDefaultInstance()) return this; + if (profileBuilder_ == null) { + if (!other.profile_.isEmpty()) { + if (profile_.isEmpty()) { + profile_ = other.profile_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProfileIsMutable(); + profile_.addAll(other.profile_); + } + onChanged(); + } + } else { + if (!other.profile_.isEmpty()) { + if (profileBuilder_.isEmpty()) { + profileBuilder_.dispose(); + profileBuilder_ = null; + profile_ = other.profile_; + bitField0_ = (bitField0_ & ~0x00000001); + profileBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProfileFieldBuilder() : null; + } else { + profileBuilder_.addAllMessages(other.profile_); + } + } + } + if (other.getPageTotalNum() != 0) { + setPageTotalNum(other.getPageTotalNum()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List profile_ = + java.util.Collections.emptyList(); + private void ensureProfileIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + profile_ = new java.util.ArrayList(profile_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.UserProto.SimpleUserProfile, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder, com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder> profileBuilder_; + + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public java.util.List getProfileList() { + if (profileBuilder_ == null) { + return java.util.Collections.unmodifiableList(profile_); + } else { + return profileBuilder_.getMessageList(); + } + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public int getProfileCount() { + if (profileBuilder_ == null) { + return profile_.size(); + } else { + return profileBuilder_.getCount(); + } + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile getProfile(int index) { + if (profileBuilder_ == null) { + return profile_.get(index); + } else { + return profileBuilder_.getMessage(index); + } + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public Builder setProfile( + int index, com.akaxin.proto.core.UserProto.SimpleUserProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProfileIsMutable(); + profile_.set(index, value); + onChanged(); + } else { + profileBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public Builder setProfile( + int index, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + ensureProfileIsMutable(); + profile_.set(index, builderForValue.build()); + onChanged(); + } else { + profileBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public Builder addProfile(com.akaxin.proto.core.UserProto.SimpleUserProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProfileIsMutable(); + profile_.add(value); + onChanged(); + } else { + profileBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public Builder addProfile( + int index, com.akaxin.proto.core.UserProto.SimpleUserProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProfileIsMutable(); + profile_.add(index, value); + onChanged(); + } else { + profileBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public Builder addProfile( + com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + ensureProfileIsMutable(); + profile_.add(builderForValue.build()); + onChanged(); + } else { + profileBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public Builder addProfile( + int index, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + ensureProfileIsMutable(); + profile_.add(index, builderForValue.build()); + onChanged(); + } else { + profileBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public Builder addAllProfile( + java.lang.Iterable values) { + if (profileBuilder_ == null) { + ensureProfileIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, profile_); + onChanged(); + } else { + profileBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public Builder clearProfile() { + if (profileBuilder_ == null) { + profile_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + profileBuilder_.clear(); + } + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public Builder removeProfile(int index) { + if (profileBuilder_ == null) { + ensureProfileIsMutable(); + profile_.remove(index); + onChanged(); + } else { + profileBuilder_.remove(index); + } + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder getProfileBuilder( + int index) { + return getProfileFieldBuilder().getBuilder(index); + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder getProfileOrBuilder( + int index) { + if (profileBuilder_ == null) { + return profile_.get(index); } else { + return profileBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public java.util.List + getProfileOrBuilderList() { + if (profileBuilder_ != null) { + return profileBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(profile_); + } + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder addProfileBuilder() { + return getProfileFieldBuilder().addBuilder( + com.akaxin.proto.core.UserProto.SimpleUserProfile.getDefaultInstance()); + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder addProfileBuilder( + int index) { + return getProfileFieldBuilder().addBuilder( + index, com.akaxin.proto.core.UserProto.SimpleUserProfile.getDefaultInstance()); + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public java.util.List + getProfileBuilderList() { + return getProfileFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.UserProto.SimpleUserProfile, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder, com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder> + getProfileFieldBuilder() { + if (profileBuilder_ == null) { + profileBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.UserProto.SimpleUserProfile, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder, com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder>( + profile_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + profile_ = null; + } + return profileBuilder_; + } + + private int pageTotalNum_ ; + /** + *
+       *总页数
+       * 
+ * + * int32 page_total_num = 2; + */ + public int getPageTotalNum() { + return pageTotalNum_; + } + /** + *
+       *总页数
+       * 
+ * + * int32 page_total_num = 2; + */ + public Builder setPageTotalNum(int value) { + + pageTotalNum_ = value; + onChanged(); + return this; + } + /** + *
+       *总页数
+       * 
+ * + * int32 page_total_num = 2; + */ + public Builder clearPageTotalNum() { + + pageTotalNum_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiUserFriendsResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiUserFriendsResponse) + private static final com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse(); + } + + public static com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiUserFriendsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiUserFriendsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiUserFriendsProto.HaiUserFriendsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiUserFriendsRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiUserFriendsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiUserFriendsResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiUserFriendsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\035plugin/hai_user_friends.proto\022\006plugin\032" + + "\017core/user.proto\"U\n\025HaiUserFriendsReques" + + "t\022\024\n\014site_user_id\030\001 \001(\t\022\023\n\013page_number\030\003" + + " \001(\005\022\021\n\tpage_size\030\004 \001(\005\"Z\n\026HaiUserFriend" + + "sResponse\022(\n\007profile\030\001 \003(\0132\027.core.Simple" + + "UserProfile\022\026\n\016page_total_num\030\002 \001(\0052a\n\025H" + + "aiUserFriendsService\022H\n\007friends\022\035.plugin" + + ".HaiUserFriendsRequest\032\036.plugin.HaiUserF" + + "riendsResponseB.\n\027com.akaxin.proto.plugi" + + "nB\023HaiUserFriendsProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.UserProto.getDescriptor(), + }, assigner); + internal_static_plugin_HaiUserFriendsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiUserFriendsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiUserFriendsRequest_descriptor, + new java.lang.String[] { "SiteUserId", "PageNumber", "PageSize", }); + internal_static_plugin_HaiUserFriendsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiUserFriendsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiUserFriendsResponse_descriptor, + new java.lang.String[] { "Profile", "PageTotalNum", }); + com.akaxin.proto.core.UserProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserGroupsProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserGroupsProto.java new file mode 100755 index 0000000..e4a075d --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserGroupsProto.java @@ -0,0 +1,1778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_user_groups.proto + +package com.akaxin.proto.plugin; + +public final class HaiUserGroupsProto { + private HaiUserGroupsProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiUserGroupsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiUserGroupsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *需要查找的用户ID
+     * 
+ * + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + *
+     *需要查找的用户ID
+     * 
+ * + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     * 默认0
+     * 
+ * + * int32 page_number = 3; + */ + int getPageNumber(); + + /** + *
+     * 默认100
+     * 
+ * + * int32 page_size = 4; + */ + int getPageSize(); + } + /** + *
+   **
+   *获取用户的群组列表
+   *----
+   *接口名
+   *----
+   * /hai/user/groups
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiUserGroupsRequest} + */ + public static final class HaiUserGroupsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiUserGroupsRequest) + HaiUserGroupsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiUserGroupsRequest.newBuilder() to construct. + private HaiUserGroupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiUserGroupsRequest() { + siteUserId_ = ""; + pageNumber_ = 0; + pageSize_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiUserGroupsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 24: { + + pageNumber_ = input.readInt32(); + break; + } + case 32: { + + pageSize_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserGroupsProto.internal_static_plugin_HaiUserGroupsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserGroupsProto.internal_static_plugin_HaiUserGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest.class, com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + *
+     *需要查找的用户ID
+     * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *需要查找的用户ID
+     * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_NUMBER_FIELD_NUMBER = 3; + private int pageNumber_; + /** + *
+     * 默认0
+     * 
+ * + * int32 page_number = 3; + */ + public int getPageNumber() { + return pageNumber_; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_; + /** + *
+     * 默认100
+     * 
+ * + * int32 page_size = 4; + */ + public int getPageSize() { + return pageSize_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + if (pageNumber_ != 0) { + output.writeInt32(3, pageNumber_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + if (pageNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageNumber_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, pageSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest other = (com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && (getPageNumber() + == other.getPageNumber()); + result = result && (getPageSize() + == other.getPageSize()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getPageNumber(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *获取用户的群组列表
+     *----
+     *接口名
+     *----
+     * /hai/user/groups
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiUserGroupsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiUserGroupsRequest) + com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserGroupsProto.internal_static_plugin_HaiUserGroupsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserGroupsProto.internal_static_plugin_HaiUserGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest.class, com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + pageNumber_ = 0; + + pageSize_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiUserGroupsProto.internal_static_plugin_HaiUserGroupsRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest build() { + com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest buildPartial() { + com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest result = new com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest(this); + result.siteUserId_ = siteUserId_; + result.pageNumber_ = pageNumber_; + result.pageSize_ = pageSize_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest other) { + if (other == com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (other.getPageNumber() != 0) { + setPageNumber(other.getPageNumber()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *需要查找的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *需要查找的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *需要查找的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *需要查找的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *需要查找的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private int pageNumber_ ; + /** + *
+       * 默认0
+       * 
+ * + * int32 page_number = 3; + */ + public int getPageNumber() { + return pageNumber_; + } + /** + *
+       * 默认0
+       * 
+ * + * int32 page_number = 3; + */ + public Builder setPageNumber(int value) { + + pageNumber_ = value; + onChanged(); + return this; + } + /** + *
+       * 默认0
+       * 
+ * + * int32 page_number = 3; + */ + public Builder clearPageNumber() { + + pageNumber_ = 0; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+       * 默认100
+       * 
+ * + * int32 page_size = 4; + */ + public int getPageSize() { + return pageSize_; + } + /** + *
+       * 默认100
+       * 
+ * + * int32 page_size = 4; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+       * 默认100
+       * 
+ * + * int32 page_size = 4; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiUserGroupsRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiUserGroupsRequest) + private static final com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest(); + } + + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiUserGroupsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiUserGroupsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiUserGroupsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiUserGroupsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + java.util.List + getProfileList(); + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + com.akaxin.proto.core.GroupProto.GroupProfile getProfile(int index); + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + int getProfileCount(); + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + java.util.List + getProfileOrBuilderList(); + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder getProfileOrBuilder( + int index); + + /** + *
+     *总页数
+     * 
+ * + * int32 page_total_num = 2; + */ + int getPageTotalNum(); + } + /** + * Protobuf type {@code plugin.HaiUserGroupsResponse} + */ + public static final class HaiUserGroupsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiUserGroupsResponse) + HaiUserGroupsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiUserGroupsResponse.newBuilder() to construct. + private HaiUserGroupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiUserGroupsResponse() { + profile_ = java.util.Collections.emptyList(); + pageTotalNum_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiUserGroupsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + profile_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + profile_.add( + input.readMessage(com.akaxin.proto.core.GroupProto.GroupProfile.parser(), extensionRegistry)); + break; + } + case 16: { + + pageTotalNum_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + profile_ = java.util.Collections.unmodifiableList(profile_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserGroupsProto.internal_static_plugin_HaiUserGroupsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserGroupsProto.internal_static_plugin_HaiUserGroupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse.class, com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse.Builder.class); + } + + private int bitField0_; + public static final int PROFILE_FIELD_NUMBER = 1; + private java.util.List profile_; + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public java.util.List getProfileList() { + return profile_; + } + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public java.util.List + getProfileOrBuilderList() { + return profile_; + } + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public int getProfileCount() { + return profile_.size(); + } + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile getProfile(int index) { + return profile_.get(index); + } + /** + *
+     *需要查找的用户
+     * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder getProfileOrBuilder( + int index) { + return profile_.get(index); + } + + public static final int PAGE_TOTAL_NUM_FIELD_NUMBER = 2; + private int pageTotalNum_; + /** + *
+     *总页数
+     * 
+ * + * int32 page_total_num = 2; + */ + public int getPageTotalNum() { + return pageTotalNum_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < profile_.size(); i++) { + output.writeMessage(1, profile_.get(i)); + } + if (pageTotalNum_ != 0) { + output.writeInt32(2, pageTotalNum_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < profile_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, profile_.get(i)); + } + if (pageTotalNum_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageTotalNum_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse other = (com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse) obj; + + boolean result = true; + result = result && getProfileList() + .equals(other.getProfileList()); + result = result && (getPageTotalNum() + == other.getPageTotalNum()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProfileCount() > 0) { + hash = (37 * hash) + PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getProfileList().hashCode(); + } + hash = (37 * hash) + PAGE_TOTAL_NUM_FIELD_NUMBER; + hash = (53 * hash) + getPageTotalNum(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiUserGroupsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiUserGroupsResponse) + com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserGroupsProto.internal_static_plugin_HaiUserGroupsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserGroupsProto.internal_static_plugin_HaiUserGroupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse.class, com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getProfileFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (profileBuilder_ == null) { + profile_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + profileBuilder_.clear(); + } + pageTotalNum_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiUserGroupsProto.internal_static_plugin_HaiUserGroupsResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse build() { + com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse buildPartial() { + com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse result = new com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (profileBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + profile_ = java.util.Collections.unmodifiableList(profile_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.profile_ = profile_; + } else { + result.profile_ = profileBuilder_.build(); + } + result.pageTotalNum_ = pageTotalNum_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse other) { + if (other == com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse.getDefaultInstance()) return this; + if (profileBuilder_ == null) { + if (!other.profile_.isEmpty()) { + if (profile_.isEmpty()) { + profile_ = other.profile_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProfileIsMutable(); + profile_.addAll(other.profile_); + } + onChanged(); + } + } else { + if (!other.profile_.isEmpty()) { + if (profileBuilder_.isEmpty()) { + profileBuilder_.dispose(); + profileBuilder_ = null; + profile_ = other.profile_; + bitField0_ = (bitField0_ & ~0x00000001); + profileBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProfileFieldBuilder() : null; + } else { + profileBuilder_.addAllMessages(other.profile_); + } + } + } + if (other.getPageTotalNum() != 0) { + setPageTotalNum(other.getPageTotalNum()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List profile_ = + java.util.Collections.emptyList(); + private void ensureProfileIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + profile_ = new java.util.ArrayList(profile_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupProfile, com.akaxin.proto.core.GroupProto.GroupProfile.Builder, com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder> profileBuilder_; + + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public java.util.List getProfileList() { + if (profileBuilder_ == null) { + return java.util.Collections.unmodifiableList(profile_); + } else { + return profileBuilder_.getMessageList(); + } + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public int getProfileCount() { + if (profileBuilder_ == null) { + return profile_.size(); + } else { + return profileBuilder_.getCount(); + } + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile getProfile(int index) { + if (profileBuilder_ == null) { + return profile_.get(index); + } else { + return profileBuilder_.getMessage(index); + } + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public Builder setProfile( + int index, com.akaxin.proto.core.GroupProto.GroupProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProfileIsMutable(); + profile_.set(index, value); + onChanged(); + } else { + profileBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public Builder setProfile( + int index, com.akaxin.proto.core.GroupProto.GroupProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + ensureProfileIsMutable(); + profile_.set(index, builderForValue.build()); + onChanged(); + } else { + profileBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public Builder addProfile(com.akaxin.proto.core.GroupProto.GroupProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProfileIsMutable(); + profile_.add(value); + onChanged(); + } else { + profileBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public Builder addProfile( + int index, com.akaxin.proto.core.GroupProto.GroupProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProfileIsMutable(); + profile_.add(index, value); + onChanged(); + } else { + profileBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public Builder addProfile( + com.akaxin.proto.core.GroupProto.GroupProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + ensureProfileIsMutable(); + profile_.add(builderForValue.build()); + onChanged(); + } else { + profileBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public Builder addProfile( + int index, com.akaxin.proto.core.GroupProto.GroupProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + ensureProfileIsMutable(); + profile_.add(index, builderForValue.build()); + onChanged(); + } else { + profileBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public Builder addAllProfile( + java.lang.Iterable values) { + if (profileBuilder_ == null) { + ensureProfileIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, profile_); + onChanged(); + } else { + profileBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public Builder clearProfile() { + if (profileBuilder_ == null) { + profile_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + profileBuilder_.clear(); + } + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public Builder removeProfile(int index) { + if (profileBuilder_ == null) { + ensureProfileIsMutable(); + profile_.remove(index); + onChanged(); + } else { + profileBuilder_.remove(index); + } + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile.Builder getProfileBuilder( + int index) { + return getProfileFieldBuilder().getBuilder(index); + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder getProfileOrBuilder( + int index) { + if (profileBuilder_ == null) { + return profile_.get(index); } else { + return profileBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public java.util.List + getProfileOrBuilderList() { + if (profileBuilder_ != null) { + return profileBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(profile_); + } + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile.Builder addProfileBuilder() { + return getProfileFieldBuilder().addBuilder( + com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance()); + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile.Builder addProfileBuilder( + int index) { + return getProfileFieldBuilder().addBuilder( + index, com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance()); + } + /** + *
+       *需要查找的用户
+       * 
+ * + * repeated .core.GroupProfile profile = 1; + */ + public java.util.List + getProfileBuilderList() { + return getProfileFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupProfile, com.akaxin.proto.core.GroupProto.GroupProfile.Builder, com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder> + getProfileFieldBuilder() { + if (profileBuilder_ == null) { + profileBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupProfile, com.akaxin.proto.core.GroupProto.GroupProfile.Builder, com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder>( + profile_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + profile_ = null; + } + return profileBuilder_; + } + + private int pageTotalNum_ ; + /** + *
+       *总页数
+       * 
+ * + * int32 page_total_num = 2; + */ + public int getPageTotalNum() { + return pageTotalNum_; + } + /** + *
+       *总页数
+       * 
+ * + * int32 page_total_num = 2; + */ + public Builder setPageTotalNum(int value) { + + pageTotalNum_ = value; + onChanged(); + return this; + } + /** + *
+       *总页数
+       * 
+ * + * int32 page_total_num = 2; + */ + public Builder clearPageTotalNum() { + + pageTotalNum_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiUserGroupsResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiUserGroupsResponse) + private static final com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse(); + } + + public static com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiUserGroupsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiUserGroupsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiUserGroupsProto.HaiUserGroupsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiUserGroupsRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiUserGroupsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiUserGroupsResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiUserGroupsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034plugin/hai_user_groups.proto\022\006plugin\032\020" + + "core/group.proto\"T\n\024HaiUserGroupsRequest" + + "\022\024\n\014site_user_id\030\001 \001(\t\022\023\n\013page_number\030\003 " + + "\001(\005\022\021\n\tpage_size\030\004 \001(\005\"T\n\025HaiUserGroupsR" + + "esponse\022#\n\007profile\030\001 \003(\0132\022.core.GroupPro" + + "file\022\026\n\016page_total_num\030\002 \001(\0052^\n\024HaiUserG" + + "roupsService\022F\n\007profile\022\034.plugin.HaiUser" + + "GroupsRequest\032\035.plugin.HaiUserGroupsResp" + + "onseB-\n\027com.akaxin.proto.pluginB\022HaiUser" + + "GroupsProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.GroupProto.getDescriptor(), + }, assigner); + internal_static_plugin_HaiUserGroupsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiUserGroupsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiUserGroupsRequest_descriptor, + new java.lang.String[] { "SiteUserId", "PageNumber", "PageSize", }); + internal_static_plugin_HaiUserGroupsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiUserGroupsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiUserGroupsResponse_descriptor, + new java.lang.String[] { "Profile", "PageTotalNum", }); + com.akaxin.proto.core.GroupProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserListProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserListProto.java new file mode 100755 index 0000000..78f957f --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserListProto.java @@ -0,0 +1,1584 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_user_list.proto + +package com.akaxin.proto.plugin; + +public final class HaiUserListProto { + private HaiUserListProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiUserListRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiUserListRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *分页:第几页
+     * 
+ * + * int32 page_number = 1; + */ + int getPageNumber(); + + /** + *
+     *分页:每页条数
+     * 
+ * + * int32 page_size = 2; + */ + int getPageSize(); + } + /** + *
+   **
+   *获取站点上用户
+   *----
+   *接口名
+   *----
+   * /hai/user/list
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiUserListRequest} + */ + public static final class HaiUserListRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiUserListRequest) + HaiUserListRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiUserListRequest.newBuilder() to construct. + private HaiUserListRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiUserListRequest() { + pageNumber_ = 0; + pageSize_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiUserListRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + pageNumber_ = input.readInt32(); + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserListProto.internal_static_plugin_HaiUserListRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserListProto.internal_static_plugin_HaiUserListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest.class, com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest.Builder.class); + } + + public static final int PAGE_NUMBER_FIELD_NUMBER = 1; + private int pageNumber_; + /** + *
+     *分页:第几页
+     * 
+ * + * int32 page_number = 1; + */ + public int getPageNumber() { + return pageNumber_; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+     *分页:每页条数
+     * 
+ * + * int32 page_size = 2; + */ + public int getPageSize() { + return pageSize_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (pageNumber_ != 0) { + output.writeInt32(1, pageNumber_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pageNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, pageNumber_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest other = (com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest) obj; + + boolean result = true; + result = result && (getPageNumber() + == other.getPageNumber()); + result = result && (getPageSize() + == other.getPageSize()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getPageNumber(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *获取站点上用户
+     *----
+     *接口名
+     *----
+     * /hai/user/list
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiUserListRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiUserListRequest) + com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserListProto.internal_static_plugin_HaiUserListRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserListProto.internal_static_plugin_HaiUserListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest.class, com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + pageNumber_ = 0; + + pageSize_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiUserListProto.internal_static_plugin_HaiUserListRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest build() { + com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest buildPartial() { + com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest result = new com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest(this); + result.pageNumber_ = pageNumber_; + result.pageSize_ = pageSize_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest other) { + if (other == com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest.getDefaultInstance()) return this; + if (other.getPageNumber() != 0) { + setPageNumber(other.getPageNumber()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int pageNumber_ ; + /** + *
+       *分页:第几页
+       * 
+ * + * int32 page_number = 1; + */ + public int getPageNumber() { + return pageNumber_; + } + /** + *
+       *分页:第几页
+       * 
+ * + * int32 page_number = 1; + */ + public Builder setPageNumber(int value) { + + pageNumber_ = value; + onChanged(); + return this; + } + /** + *
+       *分页:第几页
+       * 
+ * + * int32 page_number = 1; + */ + public Builder clearPageNumber() { + + pageNumber_ = 0; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+       *分页:每页条数
+       * 
+ * + * int32 page_size = 2; + */ + public int getPageSize() { + return pageSize_; + } + /** + *
+       *分页:每页条数
+       * 
+ * + * int32 page_size = 2; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+       *分页:每页条数
+       * 
+ * + * int32 page_size = 2; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiUserListRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiUserListRequest) + private static final com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest(); + } + + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiUserListRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiUserListRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiUserListProto.HaiUserListRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiUserListResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiUserListResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + java.util.List + getUserProfileList(); + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + com.akaxin.proto.core.UserProto.SimpleUserProfile getUserProfile(int index); + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + int getUserProfileCount(); + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + java.util.List + getUserProfileOrBuilderList(); + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder getUserProfileOrBuilder( + int index); + + /** + * int32 page_total_num = 2; + */ + int getPageTotalNum(); + } + /** + * Protobuf type {@code plugin.HaiUserListResponse} + */ + public static final class HaiUserListResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiUserListResponse) + HaiUserListResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiUserListResponse.newBuilder() to construct. + private HaiUserListResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiUserListResponse() { + userProfile_ = java.util.Collections.emptyList(); + pageTotalNum_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiUserListResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + userProfile_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + userProfile_.add( + input.readMessage(com.akaxin.proto.core.UserProto.SimpleUserProfile.parser(), extensionRegistry)); + break; + } + case 16: { + + pageTotalNum_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + userProfile_ = java.util.Collections.unmodifiableList(userProfile_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserListProto.internal_static_plugin_HaiUserListResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserListProto.internal_static_plugin_HaiUserListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse.class, com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse.Builder.class); + } + + private int bitField0_; + public static final int USER_PROFILE_FIELD_NUMBER = 1; + private java.util.List userProfile_; + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public java.util.List getUserProfileList() { + return userProfile_; + } + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public java.util.List + getUserProfileOrBuilderList() { + return userProfile_; + } + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public int getUserProfileCount() { + return userProfile_.size(); + } + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile getUserProfile(int index) { + return userProfile_.get(index); + } + /** + *
+     *查询的结果
+     * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder getUserProfileOrBuilder( + int index) { + return userProfile_.get(index); + } + + public static final int PAGE_TOTAL_NUM_FIELD_NUMBER = 2; + private int pageTotalNum_; + /** + * int32 page_total_num = 2; + */ + public int getPageTotalNum() { + return pageTotalNum_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < userProfile_.size(); i++) { + output.writeMessage(1, userProfile_.get(i)); + } + if (pageTotalNum_ != 0) { + output.writeInt32(2, pageTotalNum_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < userProfile_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, userProfile_.get(i)); + } + if (pageTotalNum_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageTotalNum_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse other = (com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse) obj; + + boolean result = true; + result = result && getUserProfileList() + .equals(other.getUserProfileList()); + result = result && (getPageTotalNum() + == other.getPageTotalNum()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getUserProfileCount() > 0) { + hash = (37 * hash) + USER_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getUserProfileList().hashCode(); + } + hash = (37 * hash) + PAGE_TOTAL_NUM_FIELD_NUMBER; + hash = (53 * hash) + getPageTotalNum(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiUserListResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiUserListResponse) + com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserListProto.internal_static_plugin_HaiUserListResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserListProto.internal_static_plugin_HaiUserListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse.class, com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getUserProfileFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (userProfileBuilder_ == null) { + userProfile_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + userProfileBuilder_.clear(); + } + pageTotalNum_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiUserListProto.internal_static_plugin_HaiUserListResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse build() { + com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse buildPartial() { + com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse result = new com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (userProfileBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + userProfile_ = java.util.Collections.unmodifiableList(userProfile_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.userProfile_ = userProfile_; + } else { + result.userProfile_ = userProfileBuilder_.build(); + } + result.pageTotalNum_ = pageTotalNum_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse other) { + if (other == com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse.getDefaultInstance()) return this; + if (userProfileBuilder_ == null) { + if (!other.userProfile_.isEmpty()) { + if (userProfile_.isEmpty()) { + userProfile_ = other.userProfile_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUserProfileIsMutable(); + userProfile_.addAll(other.userProfile_); + } + onChanged(); + } + } else { + if (!other.userProfile_.isEmpty()) { + if (userProfileBuilder_.isEmpty()) { + userProfileBuilder_.dispose(); + userProfileBuilder_ = null; + userProfile_ = other.userProfile_; + bitField0_ = (bitField0_ & ~0x00000001); + userProfileBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getUserProfileFieldBuilder() : null; + } else { + userProfileBuilder_.addAllMessages(other.userProfile_); + } + } + } + if (other.getPageTotalNum() != 0) { + setPageTotalNum(other.getPageTotalNum()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List userProfile_ = + java.util.Collections.emptyList(); + private void ensureUserProfileIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + userProfile_ = new java.util.ArrayList(userProfile_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.UserProto.SimpleUserProfile, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder, com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder> userProfileBuilder_; + + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public java.util.List getUserProfileList() { + if (userProfileBuilder_ == null) { + return java.util.Collections.unmodifiableList(userProfile_); + } else { + return userProfileBuilder_.getMessageList(); + } + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public int getUserProfileCount() { + if (userProfileBuilder_ == null) { + return userProfile_.size(); + } else { + return userProfileBuilder_.getCount(); + } + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile getUserProfile(int index) { + if (userProfileBuilder_ == null) { + return userProfile_.get(index); + } else { + return userProfileBuilder_.getMessage(index); + } + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public Builder setUserProfile( + int index, com.akaxin.proto.core.UserProto.SimpleUserProfile value) { + if (userProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserProfileIsMutable(); + userProfile_.set(index, value); + onChanged(); + } else { + userProfileBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public Builder setUserProfile( + int index, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder builderForValue) { + if (userProfileBuilder_ == null) { + ensureUserProfileIsMutable(); + userProfile_.set(index, builderForValue.build()); + onChanged(); + } else { + userProfileBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public Builder addUserProfile(com.akaxin.proto.core.UserProto.SimpleUserProfile value) { + if (userProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserProfileIsMutable(); + userProfile_.add(value); + onChanged(); + } else { + userProfileBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public Builder addUserProfile( + int index, com.akaxin.proto.core.UserProto.SimpleUserProfile value) { + if (userProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserProfileIsMutable(); + userProfile_.add(index, value); + onChanged(); + } else { + userProfileBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public Builder addUserProfile( + com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder builderForValue) { + if (userProfileBuilder_ == null) { + ensureUserProfileIsMutable(); + userProfile_.add(builderForValue.build()); + onChanged(); + } else { + userProfileBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public Builder addUserProfile( + int index, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder builderForValue) { + if (userProfileBuilder_ == null) { + ensureUserProfileIsMutable(); + userProfile_.add(index, builderForValue.build()); + onChanged(); + } else { + userProfileBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public Builder addAllUserProfile( + java.lang.Iterable values) { + if (userProfileBuilder_ == null) { + ensureUserProfileIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, userProfile_); + onChanged(); + } else { + userProfileBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public Builder clearUserProfile() { + if (userProfileBuilder_ == null) { + userProfile_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + userProfileBuilder_.clear(); + } + return this; + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public Builder removeUserProfile(int index) { + if (userProfileBuilder_ == null) { + ensureUserProfileIsMutable(); + userProfile_.remove(index); + onChanged(); + } else { + userProfileBuilder_.remove(index); + } + return this; + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder getUserProfileBuilder( + int index) { + return getUserProfileFieldBuilder().getBuilder(index); + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder getUserProfileOrBuilder( + int index) { + if (userProfileBuilder_ == null) { + return userProfile_.get(index); } else { + return userProfileBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public java.util.List + getUserProfileOrBuilderList() { + if (userProfileBuilder_ != null) { + return userProfileBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(userProfile_); + } + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder addUserProfileBuilder() { + return getUserProfileFieldBuilder().addBuilder( + com.akaxin.proto.core.UserProto.SimpleUserProfile.getDefaultInstance()); + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder addUserProfileBuilder( + int index) { + return getUserProfileFieldBuilder().addBuilder( + index, com.akaxin.proto.core.UserProto.SimpleUserProfile.getDefaultInstance()); + } + /** + *
+       *查询的结果
+       * 
+ * + * repeated .core.SimpleUserProfile user_profile = 1; + */ + public java.util.List + getUserProfileBuilderList() { + return getUserProfileFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.UserProto.SimpleUserProfile, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder, com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder> + getUserProfileFieldBuilder() { + if (userProfileBuilder_ == null) { + userProfileBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.UserProto.SimpleUserProfile, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder, com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder>( + userProfile_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + userProfile_ = null; + } + return userProfileBuilder_; + } + + private int pageTotalNum_ ; + /** + * int32 page_total_num = 2; + */ + public int getPageTotalNum() { + return pageTotalNum_; + } + /** + * int32 page_total_num = 2; + */ + public Builder setPageTotalNum(int value) { + + pageTotalNum_ = value; + onChanged(); + return this; + } + /** + * int32 page_total_num = 2; + */ + public Builder clearPageTotalNum() { + + pageTotalNum_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiUserListResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiUserListResponse) + private static final com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse(); + } + + public static com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiUserListResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiUserListResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiUserListProto.HaiUserListResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiUserListRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiUserListRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiUserListResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiUserListResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032plugin/hai_user_list.proto\022\006plugin\032\017co" + + "re/user.proto\"<\n\022HaiUserListRequest\022\023\n\013p" + + "age_number\030\001 \001(\005\022\021\n\tpage_size\030\002 \001(\005\"\\\n\023H" + + "aiUserListResponse\022-\n\014user_profile\030\001 \003(\013" + + "2\027.core.SimpleUserProfile\022\026\n\016page_total_" + + "num\030\002 \001(\0052U\n\022HaiUserListService\022?\n\004list\022" + + "\032.plugin.HaiUserListRequest\032\033.plugin.Hai" + + "UserListResponseB+\n\027com.akaxin.proto.plu" + + "ginB\020HaiUserListProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.UserProto.getDescriptor(), + }, assigner); + internal_static_plugin_HaiUserListRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiUserListRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiUserListRequest_descriptor, + new java.lang.String[] { "PageNumber", "PageSize", }); + internal_static_plugin_HaiUserListResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiUserListResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiUserListResponse_descriptor, + new java.lang.String[] { "UserProfile", "PageTotalNum", }); + com.akaxin.proto.core.UserProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserPhoneProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserPhoneProto.java new file mode 100755 index 0000000..0492b2c --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserPhoneProto.java @@ -0,0 +1,1391 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_user_phone.proto + +package com.akaxin.proto.plugin; + +public final class HaiUserPhoneProto { + private HaiUserPhoneProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiUserPhoneRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiUserPhoneRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户的站点ID
+     * 
+ * + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + *
+     *用户的站点ID
+     * 
+ * + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + } + /** + *
+   **
+   *!! 这个文件需要重命名 !!
+   *获取用户手机号
+   *----
+   *只有实名站点,才能获取此数据。
+   *接口名
+   *----
+   * /hai/user/phone
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiUserPhoneRequest} + */ + public static final class HaiUserPhoneRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiUserPhoneRequest) + HaiUserPhoneRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiUserPhoneRequest.newBuilder() to construct. + private HaiUserPhoneRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiUserPhoneRequest() { + siteUserId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiUserPhoneRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserPhoneProto.internal_static_plugin_HaiUserPhoneRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserPhoneProto.internal_static_plugin_HaiUserPhoneRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest.class, com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + *
+     *用户的站点ID
+     * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *用户的站点ID
+     * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest other = (com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *!! 这个文件需要重命名 !!
+     *获取用户手机号
+     *----
+     *只有实名站点,才能获取此数据。
+     *接口名
+     *----
+     * /hai/user/phone
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiUserPhoneRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiUserPhoneRequest) + com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserPhoneProto.internal_static_plugin_HaiUserPhoneRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserPhoneProto.internal_static_plugin_HaiUserPhoneRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest.class, com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiUserPhoneProto.internal_static_plugin_HaiUserPhoneRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest build() { + com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest buildPartial() { + com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest result = new com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest(this); + result.siteUserId_ = siteUserId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest other) { + if (other == com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *用户的站点ID
+       * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户的站点ID
+       * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户的站点ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *用户的站点ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *用户的站点ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiUserPhoneRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiUserPhoneRequest) + private static final com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest(); + } + + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiUserPhoneRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiUserPhoneRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiUserPhoneResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiUserPhoneResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *国际区号+86
+     * 
+ * + * string country_code = 1; + */ + java.lang.String getCountryCode(); + /** + *
+     *国际区号+86
+     * 
+ * + * string country_code = 1; + */ + com.google.protobuf.ByteString + getCountryCodeBytes(); + + /** + *
+     *手机号
+     * 
+ * + * string phone_id = 2; + */ + java.lang.String getPhoneId(); + /** + *
+     *手机号
+     * 
+ * + * string phone_id = 2; + */ + com.google.protobuf.ByteString + getPhoneIdBytes(); + } + /** + * Protobuf type {@code plugin.HaiUserPhoneResponse} + */ + public static final class HaiUserPhoneResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiUserPhoneResponse) + HaiUserPhoneResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiUserPhoneResponse.newBuilder() to construct. + private HaiUserPhoneResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiUserPhoneResponse() { + countryCode_ = ""; + phoneId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiUserPhoneResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + countryCode_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + phoneId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserPhoneProto.internal_static_plugin_HaiUserPhoneResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserPhoneProto.internal_static_plugin_HaiUserPhoneResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse.class, com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse.Builder.class); + } + + public static final int COUNTRY_CODE_FIELD_NUMBER = 1; + private volatile java.lang.Object countryCode_; + /** + *
+     *国际区号+86
+     * 
+ * + * string country_code = 1; + */ + public java.lang.String getCountryCode() { + java.lang.Object ref = countryCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + countryCode_ = s; + return s; + } + } + /** + *
+     *国际区号+86
+     * 
+ * + * string country_code = 1; + */ + public com.google.protobuf.ByteString + getCountryCodeBytes() { + java.lang.Object ref = countryCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + countryCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PHONE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object phoneId_; + /** + *
+     *手机号
+     * 
+ * + * string phone_id = 2; + */ + public java.lang.String getPhoneId() { + java.lang.Object ref = phoneId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phoneId_ = s; + return s; + } + } + /** + *
+     *手机号
+     * 
+ * + * string phone_id = 2; + */ + public com.google.protobuf.ByteString + getPhoneIdBytes() { + java.lang.Object ref = phoneId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + phoneId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getCountryCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, countryCode_); + } + if (!getPhoneIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, phoneId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCountryCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, countryCode_); + } + if (!getPhoneIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, phoneId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse other = (com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse) obj; + + boolean result = true; + result = result && getCountryCode() + .equals(other.getCountryCode()); + result = result && getPhoneId() + .equals(other.getPhoneId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COUNTRY_CODE_FIELD_NUMBER; + hash = (53 * hash) + getCountryCode().hashCode(); + hash = (37 * hash) + PHONE_ID_FIELD_NUMBER; + hash = (53 * hash) + getPhoneId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiUserPhoneResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiUserPhoneResponse) + com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserPhoneProto.internal_static_plugin_HaiUserPhoneResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserPhoneProto.internal_static_plugin_HaiUserPhoneResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse.class, com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + countryCode_ = ""; + + phoneId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiUserPhoneProto.internal_static_plugin_HaiUserPhoneResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse build() { + com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse buildPartial() { + com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse result = new com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse(this); + result.countryCode_ = countryCode_; + result.phoneId_ = phoneId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse other) { + if (other == com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse.getDefaultInstance()) return this; + if (!other.getCountryCode().isEmpty()) { + countryCode_ = other.countryCode_; + onChanged(); + } + if (!other.getPhoneId().isEmpty()) { + phoneId_ = other.phoneId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object countryCode_ = ""; + /** + *
+       *国际区号+86
+       * 
+ * + * string country_code = 1; + */ + public java.lang.String getCountryCode() { + java.lang.Object ref = countryCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + countryCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *国际区号+86
+       * 
+ * + * string country_code = 1; + */ + public com.google.protobuf.ByteString + getCountryCodeBytes() { + java.lang.Object ref = countryCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + countryCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *国际区号+86
+       * 
+ * + * string country_code = 1; + */ + public Builder setCountryCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + countryCode_ = value; + onChanged(); + return this; + } + /** + *
+       *国际区号+86
+       * 
+ * + * string country_code = 1; + */ + public Builder clearCountryCode() { + + countryCode_ = getDefaultInstance().getCountryCode(); + onChanged(); + return this; + } + /** + *
+       *国际区号+86
+       * 
+ * + * string country_code = 1; + */ + public Builder setCountryCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + countryCode_ = value; + onChanged(); + return this; + } + + private java.lang.Object phoneId_ = ""; + /** + *
+       *手机号
+       * 
+ * + * string phone_id = 2; + */ + public java.lang.String getPhoneId() { + java.lang.Object ref = phoneId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phoneId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *手机号
+       * 
+ * + * string phone_id = 2; + */ + public com.google.protobuf.ByteString + getPhoneIdBytes() { + java.lang.Object ref = phoneId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + phoneId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *手机号
+       * 
+ * + * string phone_id = 2; + */ + public Builder setPhoneId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + phoneId_ = value; + onChanged(); + return this; + } + /** + *
+       *手机号
+       * 
+ * + * string phone_id = 2; + */ + public Builder clearPhoneId() { + + phoneId_ = getDefaultInstance().getPhoneId(); + onChanged(); + return this; + } + /** + *
+       *手机号
+       * 
+ * + * string phone_id = 2; + */ + public Builder setPhoneIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + phoneId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiUserPhoneResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiUserPhoneResponse) + private static final com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse(); + } + + public static com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiUserPhoneResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiUserPhoneResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiUserPhoneProto.HaiUserPhoneResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiUserPhoneRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiUserPhoneRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiUserPhoneResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiUserPhoneResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033plugin/hai_user_phone.proto\022\006plugin\"+\n" + + "\023HaiUserPhoneRequest\022\024\n\014site_user_id\030\001 \001" + + "(\t\">\n\024HaiUserPhoneResponse\022\024\n\014country_co" + + "de\030\001 \001(\t\022\020\n\010phone_id\030\002 \001(\t2Y\n\023HaiUserPho" + + "neService\022B\n\005phone\022\033.plugin.HaiUserPhone" + + "Request\032\034.plugin.HaiUserPhoneResponseB,\n" + + "\027com.akaxin.proto.pluginB\021HaiUserPhonePr" + + "otob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_plugin_HaiUserPhoneRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiUserPhoneRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiUserPhoneRequest_descriptor, + new java.lang.String[] { "SiteUserId", }); + internal_static_plugin_HaiUserPhoneResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiUserPhoneResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiUserPhoneResponse_descriptor, + new java.lang.String[] { "CountryCode", "PhoneId", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserProfileProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserProfileProto.java new file mode 100755 index 0000000..ee1b55e --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserProfileProto.java @@ -0,0 +1,1298 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_user_profile.proto + +package com.akaxin.proto.plugin; + +public final class HaiUserProfileProto { + private HaiUserProfileProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiUserProfileRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiUserProfileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *需要查找的用户ID
+     * 
+ * + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + *
+     *需要查找的用户ID
+     * 
+ * + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + } + /** + *
+   **
+   *获取用户资料
+   *----
+   *接口名
+   *----
+   * /hai/user/profile
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiUserProfileRequest} + */ + public static final class HaiUserProfileRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiUserProfileRequest) + HaiUserProfileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiUserProfileRequest.newBuilder() to construct. + private HaiUserProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiUserProfileRequest() { + siteUserId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiUserProfileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserProfileProto.internal_static_plugin_HaiUserProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserProfileProto.internal_static_plugin_HaiUserProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest.class, com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + *
+     *需要查找的用户ID
+     * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *需要查找的用户ID
+     * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest other = (com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *获取用户资料
+     *----
+     *接口名
+     *----
+     * /hai/user/profile
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiUserProfileRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiUserProfileRequest) + com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserProfileProto.internal_static_plugin_HaiUserProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserProfileProto.internal_static_plugin_HaiUserProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest.class, com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiUserProfileProto.internal_static_plugin_HaiUserProfileRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest build() { + com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest buildPartial() { + com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest result = new com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest(this); + result.siteUserId_ = siteUserId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest other) { + if (other == com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *需要查找的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *需要查找的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *需要查找的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *需要查找的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *需要查找的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiUserProfileRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiUserProfileRequest) + private static final com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest(); + } + + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiUserProfileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiUserProfileRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiUserProfileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiUserProfileResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *需要查找的用户
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + boolean hasUserProfile(); + /** + *
+     *需要查找的用户
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + com.akaxin.proto.core.UserProto.UserProfile getUserProfile(); + /** + *
+     *需要查找的用户
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + com.akaxin.proto.core.UserProto.UserProfileOrBuilder getUserProfileOrBuilder(); + } + /** + * Protobuf type {@code plugin.HaiUserProfileResponse} + */ + public static final class HaiUserProfileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiUserProfileResponse) + HaiUserProfileResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiUserProfileResponse.newBuilder() to construct. + private HaiUserProfileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiUserProfileResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiUserProfileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.UserProto.UserProfile.Builder subBuilder = null; + if (userProfile_ != null) { + subBuilder = userProfile_.toBuilder(); + } + userProfile_ = input.readMessage(com.akaxin.proto.core.UserProto.UserProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(userProfile_); + userProfile_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserProfileProto.internal_static_plugin_HaiUserProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserProfileProto.internal_static_plugin_HaiUserProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse.class, com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse.Builder.class); + } + + public static final int USER_PROFILE_FIELD_NUMBER = 1; + private com.akaxin.proto.core.UserProto.UserProfile userProfile_; + /** + *
+     *需要查找的用户
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + public boolean hasUserProfile() { + return userProfile_ != null; + } + /** + *
+     *需要查找的用户
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile getUserProfile() { + return userProfile_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : userProfile_; + } + /** + *
+     *需要查找的用户
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getUserProfileOrBuilder() { + return getUserProfile(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (userProfile_ != null) { + output.writeMessage(1, getUserProfile()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (userProfile_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUserProfile()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse other = (com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse) obj; + + boolean result = true; + result = result && (hasUserProfile() == other.hasUserProfile()); + if (hasUserProfile()) { + result = result && getUserProfile() + .equals(other.getUserProfile()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUserProfile()) { + hash = (37 * hash) + USER_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getUserProfile().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiUserProfileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiUserProfileResponse) + com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserProfileProto.internal_static_plugin_HaiUserProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserProfileProto.internal_static_plugin_HaiUserProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse.class, com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (userProfileBuilder_ == null) { + userProfile_ = null; + } else { + userProfile_ = null; + userProfileBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiUserProfileProto.internal_static_plugin_HaiUserProfileResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse build() { + com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse buildPartial() { + com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse result = new com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse(this); + if (userProfileBuilder_ == null) { + result.userProfile_ = userProfile_; + } else { + result.userProfile_ = userProfileBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse other) { + if (other == com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse.getDefaultInstance()) return this; + if (other.hasUserProfile()) { + mergeUserProfile(other.getUserProfile()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.core.UserProto.UserProfile userProfile_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> userProfileBuilder_; + /** + *
+       *需要查找的用户
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public boolean hasUserProfile() { + return userProfileBuilder_ != null || userProfile_ != null; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile getUserProfile() { + if (userProfileBuilder_ == null) { + return userProfile_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : userProfile_; + } else { + return userProfileBuilder_.getMessage(); + } + } + /** + *
+       *需要查找的用户
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder setUserProfile(com.akaxin.proto.core.UserProto.UserProfile value) { + if (userProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userProfile_ = value; + onChanged(); + } else { + userProfileBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder setUserProfile( + com.akaxin.proto.core.UserProto.UserProfile.Builder builderForValue) { + if (userProfileBuilder_ == null) { + userProfile_ = builderForValue.build(); + onChanged(); + } else { + userProfileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder mergeUserProfile(com.akaxin.proto.core.UserProto.UserProfile value) { + if (userProfileBuilder_ == null) { + if (userProfile_ != null) { + userProfile_ = + com.akaxin.proto.core.UserProto.UserProfile.newBuilder(userProfile_).mergeFrom(value).buildPartial(); + } else { + userProfile_ = value; + } + onChanged(); + } else { + userProfileBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder clearUserProfile() { + if (userProfileBuilder_ == null) { + userProfile_ = null; + onChanged(); + } else { + userProfile_ = null; + userProfileBuilder_ = null; + } + + return this; + } + /** + *
+       *需要查找的用户
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile.Builder getUserProfileBuilder() { + + onChanged(); + return getUserProfileFieldBuilder().getBuilder(); + } + /** + *
+       *需要查找的用户
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getUserProfileOrBuilder() { + if (userProfileBuilder_ != null) { + return userProfileBuilder_.getMessageOrBuilder(); + } else { + return userProfile_ == null ? + com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : userProfile_; + } + } + /** + *
+       *需要查找的用户
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> + getUserProfileFieldBuilder() { + if (userProfileBuilder_ == null) { + userProfileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder>( + getUserProfile(), + getParentForChildren(), + isClean()); + userProfile_ = null; + } + return userProfileBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiUserProfileResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiUserProfileResponse) + private static final com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse(); + } + + public static com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiUserProfileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiUserProfileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiUserProfileProto.HaiUserProfileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiUserProfileRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiUserProfileRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiUserProfileResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiUserProfileResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\035plugin/hai_user_profile.proto\022\006plugin\032" + + "\017core/user.proto\"-\n\025HaiUserProfileReques" + + "t\022\024\n\014site_user_id\030\001 \001(\t\"A\n\026HaiUserProfil" + + "eResponse\022\'\n\014user_profile\030\001 \001(\0132\021.core.U" + + "serProfile2a\n\025HaiUserProfileService\022H\n\007p" + + "rofile\022\035.plugin.HaiUserProfileRequest\032\036." + + "plugin.HaiUserProfileResponseB.\n\027com.aka" + + "xin.proto.pluginB\023HaiUserProfileProtob\006p" + + "roto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.UserProto.getDescriptor(), + }, assigner); + internal_static_plugin_HaiUserProfileRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiUserProfileRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiUserProfileRequest_descriptor, + new java.lang.String[] { "SiteUserId", }); + internal_static_plugin_HaiUserProfileResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiUserProfileResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiUserProfileResponse_descriptor, + new java.lang.String[] { "UserProfile", }); + com.akaxin.proto.core.UserProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserUpdateProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserUpdateProto.java new file mode 100755 index 0000000..ae59469 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/plugin/HaiUserUpdateProto.java @@ -0,0 +1,1123 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: plugin/hai_user_update.proto + +package com.akaxin.proto.plugin; + +public final class HaiUserUpdateProto { + private HaiUserUpdateProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface HaiUserUpdateRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiUserUpdateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *需要更新的用户信息
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + boolean hasUserProfile(); + /** + *
+     *需要更新的用户信息
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + com.akaxin.proto.core.UserProto.UserProfile getUserProfile(); + /** + *
+     *需要更新的用户信息
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + com.akaxin.proto.core.UserProto.UserProfileOrBuilder getUserProfileOrBuilder(); + } + /** + *
+   **
+   *更新用户信息
+   *----
+   *接口名
+   *----
+   * /hai/user/update
+   *错误码
+   *----
+   * success
+   * error.alert
+   * 
+ * + * Protobuf type {@code plugin.HaiUserUpdateRequest} + */ + public static final class HaiUserUpdateRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiUserUpdateRequest) + HaiUserUpdateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiUserUpdateRequest.newBuilder() to construct. + private HaiUserUpdateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiUserUpdateRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiUserUpdateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.UserProto.UserProfile.Builder subBuilder = null; + if (userProfile_ != null) { + subBuilder = userProfile_.toBuilder(); + } + userProfile_ = input.readMessage(com.akaxin.proto.core.UserProto.UserProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(userProfile_); + userProfile_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserUpdateProto.internal_static_plugin_HaiUserUpdateRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserUpdateProto.internal_static_plugin_HaiUserUpdateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest.class, com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest.Builder.class); + } + + public static final int USER_PROFILE_FIELD_NUMBER = 1; + private com.akaxin.proto.core.UserProto.UserProfile userProfile_; + /** + *
+     *需要更新的用户信息
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + public boolean hasUserProfile() { + return userProfile_ != null; + } + /** + *
+     *需要更新的用户信息
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile getUserProfile() { + return userProfile_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : userProfile_; + } + /** + *
+     *需要更新的用户信息
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getUserProfileOrBuilder() { + return getUserProfile(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (userProfile_ != null) { + output.writeMessage(1, getUserProfile()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (userProfile_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUserProfile()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest other = (com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest) obj; + + boolean result = true; + result = result && (hasUserProfile() == other.hasUserProfile()); + if (hasUserProfile()) { + result = result && getUserProfile() + .equals(other.getUserProfile()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUserProfile()) { + hash = (37 * hash) + USER_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getUserProfile().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     **
+     *更新用户信息
+     *----
+     *接口名
+     *----
+     * /hai/user/update
+     *错误码
+     *----
+     * success
+     * error.alert
+     * 
+ * + * Protobuf type {@code plugin.HaiUserUpdateRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiUserUpdateRequest) + com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserUpdateProto.internal_static_plugin_HaiUserUpdateRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserUpdateProto.internal_static_plugin_HaiUserUpdateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest.class, com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (userProfileBuilder_ == null) { + userProfile_ = null; + } else { + userProfile_ = null; + userProfileBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiUserUpdateProto.internal_static_plugin_HaiUserUpdateRequest_descriptor; + } + + public com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest build() { + com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest buildPartial() { + com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest result = new com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest(this); + if (userProfileBuilder_ == null) { + result.userProfile_ = userProfile_; + } else { + result.userProfile_ = userProfileBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest) { + return mergeFrom((com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest other) { + if (other == com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest.getDefaultInstance()) return this; + if (other.hasUserProfile()) { + mergeUserProfile(other.getUserProfile()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.core.UserProto.UserProfile userProfile_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> userProfileBuilder_; + /** + *
+       *需要更新的用户信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public boolean hasUserProfile() { + return userProfileBuilder_ != null || userProfile_ != null; + } + /** + *
+       *需要更新的用户信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile getUserProfile() { + if (userProfileBuilder_ == null) { + return userProfile_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : userProfile_; + } else { + return userProfileBuilder_.getMessage(); + } + } + /** + *
+       *需要更新的用户信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder setUserProfile(com.akaxin.proto.core.UserProto.UserProfile value) { + if (userProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userProfile_ = value; + onChanged(); + } else { + userProfileBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *需要更新的用户信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder setUserProfile( + com.akaxin.proto.core.UserProto.UserProfile.Builder builderForValue) { + if (userProfileBuilder_ == null) { + userProfile_ = builderForValue.build(); + onChanged(); + } else { + userProfileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *需要更新的用户信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder mergeUserProfile(com.akaxin.proto.core.UserProto.UserProfile value) { + if (userProfileBuilder_ == null) { + if (userProfile_ != null) { + userProfile_ = + com.akaxin.proto.core.UserProto.UserProfile.newBuilder(userProfile_).mergeFrom(value).buildPartial(); + } else { + userProfile_ = value; + } + onChanged(); + } else { + userProfileBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *需要更新的用户信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder clearUserProfile() { + if (userProfileBuilder_ == null) { + userProfile_ = null; + onChanged(); + } else { + userProfile_ = null; + userProfileBuilder_ = null; + } + + return this; + } + /** + *
+       *需要更新的用户信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile.Builder getUserProfileBuilder() { + + onChanged(); + return getUserProfileFieldBuilder().getBuilder(); + } + /** + *
+       *需要更新的用户信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getUserProfileOrBuilder() { + if (userProfileBuilder_ != null) { + return userProfileBuilder_.getMessageOrBuilder(); + } else { + return userProfile_ == null ? + com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : userProfile_; + } + } + /** + *
+       *需要更新的用户信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> + getUserProfileFieldBuilder() { + if (userProfileBuilder_ == null) { + userProfileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder>( + getUserProfile(), + getParentForChildren(), + isClean()); + userProfile_ = null; + } + return userProfileBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiUserUpdateRequest) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiUserUpdateRequest) + private static final com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest(); + } + + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiUserUpdateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiUserUpdateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HaiUserUpdateResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:plugin.HaiUserUpdateResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code plugin.HaiUserUpdateResponse} + */ + public static final class HaiUserUpdateResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:plugin.HaiUserUpdateResponse) + HaiUserUpdateResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HaiUserUpdateResponse.newBuilder() to construct. + private HaiUserUpdateResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HaiUserUpdateResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HaiUserUpdateResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserUpdateProto.internal_static_plugin_HaiUserUpdateResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserUpdateProto.internal_static_plugin_HaiUserUpdateResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse.class, com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse)) { + return super.equals(obj); + } + com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse other = (com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code plugin.HaiUserUpdateResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:plugin.HaiUserUpdateResponse) + com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.plugin.HaiUserUpdateProto.internal_static_plugin_HaiUserUpdateResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.plugin.HaiUserUpdateProto.internal_static_plugin_HaiUserUpdateResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse.class, com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse.Builder.class); + } + + // Construct using com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.plugin.HaiUserUpdateProto.internal_static_plugin_HaiUserUpdateResponse_descriptor; + } + + public com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse getDefaultInstanceForType() { + return com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse.getDefaultInstance(); + } + + public com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse build() { + com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse buildPartial() { + com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse result = new com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse) { + return mergeFrom((com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse other) { + if (other == com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:plugin.HaiUserUpdateResponse) + } + + // @@protoc_insertion_point(class_scope:plugin.HaiUserUpdateResponse) + private static final com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse(); + } + + public static com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HaiUserUpdateResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HaiUserUpdateResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.plugin.HaiUserUpdateProto.HaiUserUpdateResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiUserUpdateRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiUserUpdateRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_plugin_HaiUserUpdateResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_plugin_HaiUserUpdateResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034plugin/hai_user_update.proto\022\006plugin\032\017" + + "core/user.proto\"?\n\024HaiUserUpdateRequest\022" + + "\'\n\014user_profile\030\001 \001(\0132\021.core.UserProfile" + + "\"\027\n\025HaiUserUpdateResponse2]\n\024HaiUserUpda" + + "teService\022E\n\006update\022\034.plugin.HaiUserUpda" + + "teRequest\032\035.plugin.HaiUserUpdateResponse" + + "B-\n\027com.akaxin.proto.pluginB\022HaiUserUpda" + + "teProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.UserProto.getDescriptor(), + }, assigner); + internal_static_plugin_HaiUserUpdateRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_plugin_HaiUserUpdateRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiUserUpdateRequest_descriptor, + new java.lang.String[] { "UserProfile", }); + internal_static_plugin_HaiUserUpdateResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_plugin_HaiUserUpdateResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_plugin_HaiUserUpdateResponse_descriptor, + new java.lang.String[] { }); + com.akaxin.proto.core.UserProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiDeviceBoundListProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiDeviceBoundListProto.java new file mode 100755 index 0000000..0494062 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiDeviceBoundListProto.java @@ -0,0 +1,1505 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_device_boundList.proto + +package com.akaxin.proto.site; + +public final class ApiDeviceBoundListProto { + private ApiDeviceBoundListProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiDeviceBoundListRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiDeviceBoundListRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户ID
+     * 
+ * + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + *
+     *用户ID
+     * 
+ * + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + } + /** + * Protobuf type {@code site.ApiDeviceBoundListRequest} + */ + public static final class ApiDeviceBoundListRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiDeviceBoundListRequest) + ApiDeviceBoundListRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiDeviceBoundListRequest.newBuilder() to construct. + private ApiDeviceBoundListRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiDeviceBoundListRequest() { + siteUserId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiDeviceBoundListRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiDeviceBoundListProto.internal_static_site_ApiDeviceBoundListRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiDeviceBoundListProto.internal_static_site_ApiDeviceBoundListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest.class, com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + *
+     *用户ID
+     * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *用户ID
+     * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest other = (com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiDeviceBoundListRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiDeviceBoundListRequest) + com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiDeviceBoundListProto.internal_static_site_ApiDeviceBoundListRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiDeviceBoundListProto.internal_static_site_ApiDeviceBoundListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest.class, com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiDeviceBoundListProto.internal_static_site_ApiDeviceBoundListRequest_descriptor; + } + + public com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest build() { + com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest buildPartial() { + com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest result = new com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest(this); + result.siteUserId_ = siteUserId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest) { + return mergeFrom((com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest other) { + if (other == com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiDeviceBoundListRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiDeviceBoundListRequest) + private static final com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest(); + } + + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiDeviceBoundListRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiDeviceBoundListRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiDeviceBoundListResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiDeviceBoundListResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *绑定的设备信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + java.util.List + getListList(); + /** + *
+     *绑定的设备信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile getList(int index); + /** + *
+     *绑定的设备信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + int getListCount(); + /** + *
+     *绑定的设备信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + java.util.List + getListOrBuilderList(); + /** + *
+     *绑定的设备信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder getListOrBuilder( + int index); + } + /** + * Protobuf type {@code site.ApiDeviceBoundListResponse} + */ + public static final class ApiDeviceBoundListResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiDeviceBoundListResponse) + ApiDeviceBoundListResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiDeviceBoundListResponse.newBuilder() to construct. + private ApiDeviceBoundListResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiDeviceBoundListResponse() { + list_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiDeviceBoundListResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + list_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + list_.add( + input.readMessage(com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + list_ = java.util.Collections.unmodifiableList(list_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiDeviceBoundListProto.internal_static_site_ApiDeviceBoundListResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiDeviceBoundListProto.internal_static_site_ApiDeviceBoundListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse.class, com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse.Builder.class); + } + + public static final int LIST_FIELD_NUMBER = 1; + private java.util.List list_; + /** + *
+     *绑定的设备信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public java.util.List getListList() { + return list_; + } + /** + *
+     *绑定的设备信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public java.util.List + getListOrBuilderList() { + return list_; + } + /** + *
+     *绑定的设备信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public int getListCount() { + return list_.size(); + } + /** + *
+     *绑定的设备信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile getList(int index) { + return list_.get(index); + } + /** + *
+     *绑定的设备信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder getListOrBuilder( + int index) { + return list_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < list_.size(); i++) { + output.writeMessage(1, list_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < list_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, list_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse other = (com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse) obj; + + boolean result = true; + result = result && getListList() + .equals(other.getListList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getListCount() > 0) { + hash = (37 * hash) + LIST_FIELD_NUMBER; + hash = (53 * hash) + getListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiDeviceBoundListResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiDeviceBoundListResponse) + com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiDeviceBoundListProto.internal_static_site_ApiDeviceBoundListResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiDeviceBoundListProto.internal_static_site_ApiDeviceBoundListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse.class, com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getListFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (listBuilder_ == null) { + list_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + listBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiDeviceBoundListProto.internal_static_site_ApiDeviceBoundListResponse_descriptor; + } + + public com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse build() { + com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse buildPartial() { + com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse result = new com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse(this); + int from_bitField0_ = bitField0_; + if (listBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + list_ = java.util.Collections.unmodifiableList(list_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.list_ = list_; + } else { + result.list_ = listBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse) { + return mergeFrom((com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse other) { + if (other == com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse.getDefaultInstance()) return this; + if (listBuilder_ == null) { + if (!other.list_.isEmpty()) { + if (list_.isEmpty()) { + list_ = other.list_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureListIsMutable(); + list_.addAll(other.list_); + } + onChanged(); + } + } else { + if (!other.list_.isEmpty()) { + if (listBuilder_.isEmpty()) { + listBuilder_.dispose(); + listBuilder_ = null; + list_ = other.list_; + bitField0_ = (bitField0_ & ~0x00000001); + listBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getListFieldBuilder() : null; + } else { + listBuilder_.addAllMessages(other.list_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List list_ = + java.util.Collections.emptyList(); + private void ensureListIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + list_ = new java.util.ArrayList(list_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder> listBuilder_; + + /** + *
+       *绑定的设备信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public java.util.List getListList() { + if (listBuilder_ == null) { + return java.util.Collections.unmodifiableList(list_); + } else { + return listBuilder_.getMessageList(); + } + } + /** + *
+       *绑定的设备信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public int getListCount() { + if (listBuilder_ == null) { + return list_.size(); + } else { + return listBuilder_.getCount(); + } + } + /** + *
+       *绑定的设备信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile getList(int index) { + if (listBuilder_ == null) { + return list_.get(index); + } else { + return listBuilder_.getMessage(index); + } + } + /** + *
+       *绑定的设备信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public Builder setList( + int index, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.set(index, value); + onChanged(); + } else { + listBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *绑定的设备信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public Builder setList( + int index, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.set(index, builderForValue.build()); + onChanged(); + } else { + listBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *绑定的设备信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public Builder addList(com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.add(value); + onChanged(); + } else { + listBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *绑定的设备信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public Builder addList( + int index, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.add(index, value); + onChanged(); + } else { + listBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *绑定的设备信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public Builder addList( + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.add(builderForValue.build()); + onChanged(); + } else { + listBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *绑定的设备信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public Builder addList( + int index, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.add(index, builderForValue.build()); + onChanged(); + } else { + listBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *绑定的设备信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public Builder addAllList( + java.lang.Iterable values) { + if (listBuilder_ == null) { + ensureListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, list_); + onChanged(); + } else { + listBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *绑定的设备信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public Builder clearList() { + if (listBuilder_ == null) { + list_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + listBuilder_.clear(); + } + return this; + } + /** + *
+       *绑定的设备信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public Builder removeList(int index) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.remove(index); + onChanged(); + } else { + listBuilder_.remove(index); + } + return this; + } + /** + *
+       *绑定的设备信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder getListBuilder( + int index) { + return getListFieldBuilder().getBuilder(index); + } + /** + *
+       *绑定的设备信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder getListOrBuilder( + int index) { + if (listBuilder_ == null) { + return list_.get(index); } else { + return listBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *绑定的设备信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public java.util.List + getListOrBuilderList() { + if (listBuilder_ != null) { + return listBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(list_); + } + } + /** + *
+       *绑定的设备信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder addListBuilder() { + return getListFieldBuilder().addBuilder( + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.getDefaultInstance()); + } + /** + *
+       *绑定的设备信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder addListBuilder( + int index) { + return getListFieldBuilder().addBuilder( + index, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.getDefaultInstance()); + } + /** + *
+       *绑定的设备信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public java.util.List + getListBuilderList() { + return getListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder> + getListFieldBuilder() { + if (listBuilder_ == null) { + listBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder>( + list_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + list_ = null; + } + return listBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiDeviceBoundListResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiDeviceBoundListResponse) + private static final com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse(); + } + + public static com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiDeviceBoundListResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiDeviceBoundListResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiDeviceBoundListProto.ApiDeviceBoundListResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiDeviceBoundListRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiDeviceBoundListRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiDeviceBoundListResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiDeviceBoundListResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\037site/api_device_boundList.proto\022\004site\032" + + "\021core/device.proto\"1\n\031ApiDeviceBoundList" + + "Request\022\024\n\014site_user_id\030\001 \001(\t\"E\n\032ApiDevi" + + "ceBoundListResponse\022\'\n\004list\030\001 \003(\0132\031.core" + + ".SimpleDeviceProfile2k\n\031ApiDeviceBoundLi" + + "stService\022N\n\tboundList\022\037.site.ApiDeviceB" + + "oundListRequest\032 .site.ApiDeviceBoundLis" + + "tResponseB0\n\025com.akaxin.proto.siteB\027ApiD" + + "eviceBoundListProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.DeviceProto.getDescriptor(), + }, assigner); + internal_static_site_ApiDeviceBoundListRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiDeviceBoundListRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiDeviceBoundListRequest_descriptor, + new java.lang.String[] { "SiteUserId", }); + internal_static_site_ApiDeviceBoundListResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiDeviceBoundListResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiDeviceBoundListResponse_descriptor, + new java.lang.String[] { "List", }); + com.akaxin.proto.core.DeviceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiDeviceListProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiDeviceListProto.java new file mode 100755 index 0000000..df51e9f --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiDeviceListProto.java @@ -0,0 +1,1671 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_device_list.proto + +package com.akaxin.proto.site; + +public final class ApiDeviceListProto { + private ApiDeviceListProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface DeviceListInfoRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.DeviceListInfoRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *获取列表的用户ID
+     * 
+ * + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + *
+     *获取列表的用户ID
+     * 
+ * + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *第几页
+     * 
+ * + * int32 page_number = 2; + */ + int getPageNumber(); + + /** + *
+     *每页第几条
+     * 
+ * + * int32 page_size = 3; + */ + int getPageSize(); + } + /** + * Protobuf type {@code site.DeviceListInfoRequest} + */ + public static final class DeviceListInfoRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.DeviceListInfoRequest) + DeviceListInfoRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeviceListInfoRequest.newBuilder() to construct. + private DeviceListInfoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeviceListInfoRequest() { + siteUserId_ = ""; + pageNumber_ = 0; + pageSize_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeviceListInfoRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 16: { + + pageNumber_ = input.readInt32(); + break; + } + case 24: { + + pageSize_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiDeviceListProto.internal_static_site_DeviceListInfoRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiDeviceListProto.internal_static_site_DeviceListInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest.class, com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + *
+     *获取列表的用户ID
+     * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *获取列表的用户ID
+     * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_NUMBER_FIELD_NUMBER = 2; + private int pageNumber_; + /** + *
+     *第几页
+     * 
+ * + * int32 page_number = 2; + */ + public int getPageNumber() { + return pageNumber_; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + *
+     *每页第几条
+     * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + if (pageNumber_ != 0) { + output.writeInt32(2, pageNumber_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + if (pageNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageNumber_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest other = (com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && (getPageNumber() + == other.getPageNumber()); + result = result && (getPageSize() + == other.getPageSize()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getPageNumber(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.DeviceListInfoRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.DeviceListInfoRequest) + com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiDeviceListProto.internal_static_site_DeviceListInfoRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiDeviceListProto.internal_static_site_DeviceListInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest.class, com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + pageNumber_ = 0; + + pageSize_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiDeviceListProto.internal_static_site_DeviceListInfoRequest_descriptor; + } + + public com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest build() { + com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest buildPartial() { + com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest result = new com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest(this); + result.siteUserId_ = siteUserId_; + result.pageNumber_ = pageNumber_; + result.pageSize_ = pageSize_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest) { + return mergeFrom((com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest other) { + if (other == com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (other.getPageNumber() != 0) { + setPageNumber(other.getPageNumber()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *获取列表的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *获取列表的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *获取列表的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *获取列表的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *获取列表的用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private int pageNumber_ ; + /** + *
+       *第几页
+       * 
+ * + * int32 page_number = 2; + */ + public int getPageNumber() { + return pageNumber_; + } + /** + *
+       *第几页
+       * 
+ * + * int32 page_number = 2; + */ + public Builder setPageNumber(int value) { + + pageNumber_ = value; + onChanged(); + return this; + } + /** + *
+       *第几页
+       * 
+ * + * int32 page_number = 2; + */ + public Builder clearPageNumber() { + + pageNumber_ = 0; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+       *每页第几条
+       * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + /** + *
+       *每页第几条
+       * 
+ * + * int32 page_size = 3; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+       *每页第几条
+       * 
+ * + * int32 page_size = 3; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.DeviceListInfoRequest) + } + + // @@protoc_insertion_point(class_scope:site.DeviceListInfoRequest) + private static final com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest(); + } + + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DeviceListInfoRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeviceListInfoRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DeviceListInfoResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.DeviceListInfoResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *设备列表信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + java.util.List + getListList(); + /** + *
+     *设备列表信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile getList(int index); + /** + *
+     *设备列表信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + int getListCount(); + /** + *
+     *设备列表信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + java.util.List + getListOrBuilderList(); + /** + *
+     *设备列表信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder getListOrBuilder( + int index); + } + /** + * Protobuf type {@code site.DeviceListInfoResponse} + */ + public static final class DeviceListInfoResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.DeviceListInfoResponse) + DeviceListInfoResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeviceListInfoResponse.newBuilder() to construct. + private DeviceListInfoResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeviceListInfoResponse() { + list_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeviceListInfoResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + list_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + list_.add( + input.readMessage(com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + list_ = java.util.Collections.unmodifiableList(list_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiDeviceListProto.internal_static_site_DeviceListInfoResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiDeviceListProto.internal_static_site_DeviceListInfoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse.class, com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse.Builder.class); + } + + public static final int LIST_FIELD_NUMBER = 1; + private java.util.List list_; + /** + *
+     *设备列表信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public java.util.List getListList() { + return list_; + } + /** + *
+     *设备列表信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public java.util.List + getListOrBuilderList() { + return list_; + } + /** + *
+     *设备列表信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public int getListCount() { + return list_.size(); + } + /** + *
+     *设备列表信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile getList(int index) { + return list_.get(index); + } + /** + *
+     *设备列表信息
+     * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder getListOrBuilder( + int index) { + return list_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < list_.size(); i++) { + output.writeMessage(1, list_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < list_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, list_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse other = (com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse) obj; + + boolean result = true; + result = result && getListList() + .equals(other.getListList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getListCount() > 0) { + hash = (37 * hash) + LIST_FIELD_NUMBER; + hash = (53 * hash) + getListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.DeviceListInfoResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.DeviceListInfoResponse) + com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiDeviceListProto.internal_static_site_DeviceListInfoResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiDeviceListProto.internal_static_site_DeviceListInfoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse.class, com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getListFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (listBuilder_ == null) { + list_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + listBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiDeviceListProto.internal_static_site_DeviceListInfoResponse_descriptor; + } + + public com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse build() { + com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse buildPartial() { + com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse result = new com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse(this); + int from_bitField0_ = bitField0_; + if (listBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + list_ = java.util.Collections.unmodifiableList(list_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.list_ = list_; + } else { + result.list_ = listBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse) { + return mergeFrom((com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse other) { + if (other == com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse.getDefaultInstance()) return this; + if (listBuilder_ == null) { + if (!other.list_.isEmpty()) { + if (list_.isEmpty()) { + list_ = other.list_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureListIsMutable(); + list_.addAll(other.list_); + } + onChanged(); + } + } else { + if (!other.list_.isEmpty()) { + if (listBuilder_.isEmpty()) { + listBuilder_.dispose(); + listBuilder_ = null; + list_ = other.list_; + bitField0_ = (bitField0_ & ~0x00000001); + listBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getListFieldBuilder() : null; + } else { + listBuilder_.addAllMessages(other.list_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List list_ = + java.util.Collections.emptyList(); + private void ensureListIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + list_ = new java.util.ArrayList(list_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder> listBuilder_; + + /** + *
+       *设备列表信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public java.util.List getListList() { + if (listBuilder_ == null) { + return java.util.Collections.unmodifiableList(list_); + } else { + return listBuilder_.getMessageList(); + } + } + /** + *
+       *设备列表信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public int getListCount() { + if (listBuilder_ == null) { + return list_.size(); + } else { + return listBuilder_.getCount(); + } + } + /** + *
+       *设备列表信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile getList(int index) { + if (listBuilder_ == null) { + return list_.get(index); + } else { + return listBuilder_.getMessage(index); + } + } + /** + *
+       *设备列表信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public Builder setList( + int index, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.set(index, value); + onChanged(); + } else { + listBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *设备列表信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public Builder setList( + int index, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.set(index, builderForValue.build()); + onChanged(); + } else { + listBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *设备列表信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public Builder addList(com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.add(value); + onChanged(); + } else { + listBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *设备列表信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public Builder addList( + int index, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.add(index, value); + onChanged(); + } else { + listBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *设备列表信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public Builder addList( + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.add(builderForValue.build()); + onChanged(); + } else { + listBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *设备列表信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public Builder addList( + int index, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.add(index, builderForValue.build()); + onChanged(); + } else { + listBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *设备列表信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public Builder addAllList( + java.lang.Iterable values) { + if (listBuilder_ == null) { + ensureListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, list_); + onChanged(); + } else { + listBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *设备列表信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public Builder clearList() { + if (listBuilder_ == null) { + list_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + listBuilder_.clear(); + } + return this; + } + /** + *
+       *设备列表信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public Builder removeList(int index) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.remove(index); + onChanged(); + } else { + listBuilder_.remove(index); + } + return this; + } + /** + *
+       *设备列表信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder getListBuilder( + int index) { + return getListFieldBuilder().getBuilder(index); + } + /** + *
+       *设备列表信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder getListOrBuilder( + int index) { + if (listBuilder_ == null) { + return list_.get(index); } else { + return listBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *设备列表信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public java.util.List + getListOrBuilderList() { + if (listBuilder_ != null) { + return listBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(list_); + } + } + /** + *
+       *设备列表信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder addListBuilder() { + return getListFieldBuilder().addBuilder( + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.getDefaultInstance()); + } + /** + *
+       *设备列表信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder addListBuilder( + int index) { + return getListFieldBuilder().addBuilder( + index, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.getDefaultInstance()); + } + /** + *
+       *设备列表信息
+       * 
+ * + * repeated .core.SimpleDeviceProfile list = 1; + */ + public java.util.List + getListBuilderList() { + return getListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder> + getListFieldBuilder() { + if (listBuilder_ == null) { + listBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder>( + list_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + list_ = null; + } + return listBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.DeviceListInfoResponse) + } + + // @@protoc_insertion_point(class_scope:site.DeviceListInfoResponse) + private static final com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse(); + } + + public static com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DeviceListInfoResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeviceListInfoResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiDeviceListProto.DeviceListInfoResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_DeviceListInfoRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_DeviceListInfoRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_DeviceListInfoResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_DeviceListInfoResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032site/api_device_list.proto\022\004site\032\021core" + + "/device.proto\"U\n\025DeviceListInfoRequest\022\024" + + "\n\014site_user_id\030\001 \001(\t\022\023\n\013page_number\030\002 \001(" + + "\005\022\021\n\tpage_size\030\003 \001(\005\"A\n\026DeviceListInfoRe" + + "sponse\022\'\n\004list\030\001 \003(\0132\031.core.SimpleDevice" + + "Profile2Y\n\024ApiDeviceListService\022A\n\004list\022" + + "\033.site.DeviceListInfoRequest\032\034.site.Devi" + + "ceListInfoResponseB+\n\025com.akaxin.proto.s" + + "iteB\022ApiDeviceListProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.DeviceProto.getDescriptor(), + }, assigner); + internal_static_site_DeviceListInfoRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_DeviceListInfoRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_DeviceListInfoRequest_descriptor, + new java.lang.String[] { "SiteUserId", "PageNumber", "PageSize", }); + internal_static_site_DeviceListInfoResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_DeviceListInfoResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_DeviceListInfoResponse_descriptor, + new java.lang.String[] { "List", }); + com.akaxin.proto.core.DeviceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiDeviceProfileProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiDeviceProfileProto.java new file mode 100755 index 0000000..a8c2cde --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiDeviceProfileProto.java @@ -0,0 +1,1536 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_device_profile.proto + +package com.akaxin.proto.site; + +public final class ApiDeviceProfileProto { + private ApiDeviceProfileProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiDeviceProfileRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiDeviceProfileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *设备ID
+     * 
+ * + * string device_id = 1; + */ + java.lang.String getDeviceId(); + /** + *
+     *设备ID
+     * 
+ * + * string device_id = 1; + */ + com.google.protobuf.ByteString + getDeviceIdBytes(); + } + /** + * Protobuf type {@code site.ApiDeviceProfileRequest} + */ + public static final class ApiDeviceProfileRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiDeviceProfileRequest) + ApiDeviceProfileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiDeviceProfileRequest.newBuilder() to construct. + private ApiDeviceProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiDeviceProfileRequest() { + deviceId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiDeviceProfileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + deviceId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiDeviceProfileProto.internal_static_site_ApiDeviceProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiDeviceProfileProto.internal_static_site_ApiDeviceProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest.class, com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest.Builder.class); + } + + public static final int DEVICE_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object deviceId_; + /** + *
+     *设备ID
+     * 
+ * + * string device_id = 1; + */ + public java.lang.String getDeviceId() { + java.lang.Object ref = deviceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceId_ = s; + return s; + } + } + /** + *
+     *设备ID
+     * 
+ * + * string device_id = 1; + */ + public com.google.protobuf.ByteString + getDeviceIdBytes() { + java.lang.Object ref = deviceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getDeviceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, deviceId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDeviceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, deviceId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest other = (com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest) obj; + + boolean result = true; + result = result && getDeviceId() + .equals(other.getDeviceId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiDeviceProfileRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiDeviceProfileRequest) + com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiDeviceProfileProto.internal_static_site_ApiDeviceProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiDeviceProfileProto.internal_static_site_ApiDeviceProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest.class, com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + deviceId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiDeviceProfileProto.internal_static_site_ApiDeviceProfileRequest_descriptor; + } + + public com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest build() { + com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest buildPartial() { + com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest result = new com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest(this); + result.deviceId_ = deviceId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest) { + return mergeFrom((com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest other) { + if (other == com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest.getDefaultInstance()) return this; + if (!other.getDeviceId().isEmpty()) { + deviceId_ = other.deviceId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object deviceId_ = ""; + /** + *
+       *设备ID
+       * 
+ * + * string device_id = 1; + */ + public java.lang.String getDeviceId() { + java.lang.Object ref = deviceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *设备ID
+       * 
+ * + * string device_id = 1; + */ + public com.google.protobuf.ByteString + getDeviceIdBytes() { + java.lang.Object ref = deviceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *设备ID
+       * 
+ * + * string device_id = 1; + */ + public Builder setDeviceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deviceId_ = value; + onChanged(); + return this; + } + /** + *
+       *设备ID
+       * 
+ * + * string device_id = 1; + */ + public Builder clearDeviceId() { + + deviceId_ = getDefaultInstance().getDeviceId(); + onChanged(); + return this; + } + /** + *
+       *设备ID
+       * 
+ * + * string device_id = 1; + */ + public Builder setDeviceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deviceId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiDeviceProfileRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiDeviceProfileRequest) + private static final com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest(); + } + + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiDeviceProfileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiDeviceProfileRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiDeviceProfileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiDeviceProfileResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *设备资料
+     * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + boolean hasDeviceProfile(); + /** + *
+     *设备资料
+     * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile getDeviceProfile(); + /** + *
+     *设备资料
+     * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder getDeviceProfileOrBuilder(); + + /** + *
+     *客户端登陆的IP
+     * 
+ * + * string login_ip = 2; + */ + java.lang.String getLoginIp(); + /** + *
+     *客户端登陆的IP
+     * 
+ * + * string login_ip = 2; + */ + com.google.protobuf.ByteString + getLoginIpBytes(); + + /** + *
+     *客户端上次登陆时间
+     * 
+ * + * int64 last_active_time = 3; + */ + long getLastActiveTime(); + } + /** + * Protobuf type {@code site.ApiDeviceProfileResponse} + */ + public static final class ApiDeviceProfileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiDeviceProfileResponse) + ApiDeviceProfileResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiDeviceProfileResponse.newBuilder() to construct. + private ApiDeviceProfileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiDeviceProfileResponse() { + loginIp_ = ""; + lastActiveTime_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiDeviceProfileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder subBuilder = null; + if (deviceProfile_ != null) { + subBuilder = deviceProfile_.toBuilder(); + } + deviceProfile_ = input.readMessage(com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deviceProfile_); + deviceProfile_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + loginIp_ = s; + break; + } + case 24: { + + lastActiveTime_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiDeviceProfileProto.internal_static_site_ApiDeviceProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiDeviceProfileProto.internal_static_site_ApiDeviceProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse.class, com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse.Builder.class); + } + + public static final int DEVICEPROFILE_FIELD_NUMBER = 1; + private com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile deviceProfile_; + /** + *
+     *设备资料
+     * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public boolean hasDeviceProfile() { + return deviceProfile_ != null; + } + /** + *
+     *设备资料
+     * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile getDeviceProfile() { + return deviceProfile_ == null ? com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.getDefaultInstance() : deviceProfile_; + } + /** + *
+     *设备资料
+     * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder getDeviceProfileOrBuilder() { + return getDeviceProfile(); + } + + public static final int LOGIN_IP_FIELD_NUMBER = 2; + private volatile java.lang.Object loginIp_; + /** + *
+     *客户端登陆的IP
+     * 
+ * + * string login_ip = 2; + */ + public java.lang.String getLoginIp() { + java.lang.Object ref = loginIp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + loginIp_ = s; + return s; + } + } + /** + *
+     *客户端登陆的IP
+     * 
+ * + * string login_ip = 2; + */ + public com.google.protobuf.ByteString + getLoginIpBytes() { + java.lang.Object ref = loginIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + loginIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAST_ACTIVE_TIME_FIELD_NUMBER = 3; + private long lastActiveTime_; + /** + *
+     *客户端上次登陆时间
+     * 
+ * + * int64 last_active_time = 3; + */ + public long getLastActiveTime() { + return lastActiveTime_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (deviceProfile_ != null) { + output.writeMessage(1, getDeviceProfile()); + } + if (!getLoginIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, loginIp_); + } + if (lastActiveTime_ != 0L) { + output.writeInt64(3, lastActiveTime_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (deviceProfile_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getDeviceProfile()); + } + if (!getLoginIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, loginIp_); + } + if (lastActiveTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, lastActiveTime_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse other = (com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse) obj; + + boolean result = true; + result = result && (hasDeviceProfile() == other.hasDeviceProfile()); + if (hasDeviceProfile()) { + result = result && getDeviceProfile() + .equals(other.getDeviceProfile()); + } + result = result && getLoginIp() + .equals(other.getLoginIp()); + result = result && (getLastActiveTime() + == other.getLastActiveTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDeviceProfile()) { + hash = (37 * hash) + DEVICEPROFILE_FIELD_NUMBER; + hash = (53 * hash) + getDeviceProfile().hashCode(); + } + hash = (37 * hash) + LOGIN_IP_FIELD_NUMBER; + hash = (53 * hash) + getLoginIp().hashCode(); + hash = (37 * hash) + LAST_ACTIVE_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLastActiveTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiDeviceProfileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiDeviceProfileResponse) + com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiDeviceProfileProto.internal_static_site_ApiDeviceProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiDeviceProfileProto.internal_static_site_ApiDeviceProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse.class, com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (deviceProfileBuilder_ == null) { + deviceProfile_ = null; + } else { + deviceProfile_ = null; + deviceProfileBuilder_ = null; + } + loginIp_ = ""; + + lastActiveTime_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiDeviceProfileProto.internal_static_site_ApiDeviceProfileResponse_descriptor; + } + + public com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse build() { + com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse buildPartial() { + com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse result = new com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse(this); + if (deviceProfileBuilder_ == null) { + result.deviceProfile_ = deviceProfile_; + } else { + result.deviceProfile_ = deviceProfileBuilder_.build(); + } + result.loginIp_ = loginIp_; + result.lastActiveTime_ = lastActiveTime_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse) { + return mergeFrom((com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse other) { + if (other == com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse.getDefaultInstance()) return this; + if (other.hasDeviceProfile()) { + mergeDeviceProfile(other.getDeviceProfile()); + } + if (!other.getLoginIp().isEmpty()) { + loginIp_ = other.loginIp_; + onChanged(); + } + if (other.getLastActiveTime() != 0L) { + setLastActiveTime(other.getLastActiveTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile deviceProfile_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder> deviceProfileBuilder_; + /** + *
+       *设备资料
+       * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public boolean hasDeviceProfile() { + return deviceProfileBuilder_ != null || deviceProfile_ != null; + } + /** + *
+       *设备资料
+       * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile getDeviceProfile() { + if (deviceProfileBuilder_ == null) { + return deviceProfile_ == null ? com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.getDefaultInstance() : deviceProfile_; + } else { + return deviceProfileBuilder_.getMessage(); + } + } + /** + *
+       *设备资料
+       * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public Builder setDeviceProfile(com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile value) { + if (deviceProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceProfile_ = value; + onChanged(); + } else { + deviceProfileBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *设备资料
+       * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public Builder setDeviceProfile( + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder builderForValue) { + if (deviceProfileBuilder_ == null) { + deviceProfile_ = builderForValue.build(); + onChanged(); + } else { + deviceProfileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *设备资料
+       * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public Builder mergeDeviceProfile(com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile value) { + if (deviceProfileBuilder_ == null) { + if (deviceProfile_ != null) { + deviceProfile_ = + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.newBuilder(deviceProfile_).mergeFrom(value).buildPartial(); + } else { + deviceProfile_ = value; + } + onChanged(); + } else { + deviceProfileBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *设备资料
+       * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public Builder clearDeviceProfile() { + if (deviceProfileBuilder_ == null) { + deviceProfile_ = null; + onChanged(); + } else { + deviceProfile_ = null; + deviceProfileBuilder_ = null; + } + + return this; + } + /** + *
+       *设备资料
+       * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder getDeviceProfileBuilder() { + + onChanged(); + return getDeviceProfileFieldBuilder().getBuilder(); + } + /** + *
+       *设备资料
+       * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder getDeviceProfileOrBuilder() { + if (deviceProfileBuilder_ != null) { + return deviceProfileBuilder_.getMessageOrBuilder(); + } else { + return deviceProfile_ == null ? + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.getDefaultInstance() : deviceProfile_; + } + } + /** + *
+       *设备资料
+       * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder> + getDeviceProfileFieldBuilder() { + if (deviceProfileBuilder_ == null) { + deviceProfileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder>( + getDeviceProfile(), + getParentForChildren(), + isClean()); + deviceProfile_ = null; + } + return deviceProfileBuilder_; + } + + private java.lang.Object loginIp_ = ""; + /** + *
+       *客户端登陆的IP
+       * 
+ * + * string login_ip = 2; + */ + public java.lang.String getLoginIp() { + java.lang.Object ref = loginIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + loginIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *客户端登陆的IP
+       * 
+ * + * string login_ip = 2; + */ + public com.google.protobuf.ByteString + getLoginIpBytes() { + java.lang.Object ref = loginIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + loginIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *客户端登陆的IP
+       * 
+ * + * string login_ip = 2; + */ + public Builder setLoginIp( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + loginIp_ = value; + onChanged(); + return this; + } + /** + *
+       *客户端登陆的IP
+       * 
+ * + * string login_ip = 2; + */ + public Builder clearLoginIp() { + + loginIp_ = getDefaultInstance().getLoginIp(); + onChanged(); + return this; + } + /** + *
+       *客户端登陆的IP
+       * 
+ * + * string login_ip = 2; + */ + public Builder setLoginIpBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + loginIp_ = value; + onChanged(); + return this; + } + + private long lastActiveTime_ ; + /** + *
+       *客户端上次登陆时间
+       * 
+ * + * int64 last_active_time = 3; + */ + public long getLastActiveTime() { + return lastActiveTime_; + } + /** + *
+       *客户端上次登陆时间
+       * 
+ * + * int64 last_active_time = 3; + */ + public Builder setLastActiveTime(long value) { + + lastActiveTime_ = value; + onChanged(); + return this; + } + /** + *
+       *客户端上次登陆时间
+       * 
+ * + * int64 last_active_time = 3; + */ + public Builder clearLastActiveTime() { + + lastActiveTime_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiDeviceProfileResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiDeviceProfileResponse) + private static final com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse(); + } + + public static com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiDeviceProfileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiDeviceProfileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiDeviceProfileProto.ApiDeviceProfileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiDeviceProfileRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiDeviceProfileRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiDeviceProfileResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiDeviceProfileResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\035site/api_device_profile.proto\022\004site\032\021c" + + "ore/device.proto\",\n\027ApiDeviceProfileRequ" + + "est\022\021\n\tdevice_id\030\001 \001(\t\"x\n\030ApiDeviceProfi" + + "leResponse\0220\n\rdeviceProfile\030\001 \001(\0132\031.core" + + ".SimpleDeviceProfile\022\020\n\010login_ip\030\002 \001(\t\022\030" + + "\n\020last_active_time\030\003 \001(\0032c\n\027ApiDevicePro" + + "fileService\022H\n\007profile\022\035.site.ApiDeviceP" + + "rofileRequest\032\036.site.ApiDeviceProfileRes" + + "ponseB.\n\025com.akaxin.proto.siteB\025ApiDevic" + + "eProfileProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.DeviceProto.getDescriptor(), + }, assigner); + internal_static_site_ApiDeviceProfileRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiDeviceProfileRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiDeviceProfileRequest_descriptor, + new java.lang.String[] { "DeviceId", }); + internal_static_site_ApiDeviceProfileResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiDeviceProfileResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiDeviceProfileResponse_descriptor, + new java.lang.String[] { "DeviceProfile", "LoginIp", "LastActiveTime", }); + com.akaxin.proto.core.DeviceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFileDownloadProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFileDownloadProto.java new file mode 100755 index 0000000..bba0ccf --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFileDownloadProto.java @@ -0,0 +1,1277 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_file_download.proto + +package com.akaxin.proto.site; + +public final class ApiFileDownloadProto { + private ApiFileDownloadProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiFileDownloadRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFileDownloadRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *下载资源标识ID
+     * 
+ * + * string file_id = 1; + */ + java.lang.String getFileId(); + /** + *
+     *下载资源标识ID
+     * 
+ * + * string file_id = 1; + */ + com.google.protobuf.ByteString + getFileIdBytes(); + } + /** + * Protobuf type {@code site.ApiFileDownloadRequest} + */ + public static final class ApiFileDownloadRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFileDownloadRequest) + ApiFileDownloadRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFileDownloadRequest.newBuilder() to construct. + private ApiFileDownloadRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFileDownloadRequest() { + fileId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFileDownloadRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + fileId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFileDownloadProto.internal_static_site_ApiFileDownloadRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFileDownloadProto.internal_static_site_ApiFileDownloadRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest.class, com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest.Builder.class); + } + + public static final int FILE_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object fileId_; + /** + *
+     *下载资源标识ID
+     * 
+ * + * string file_id = 1; + */ + public java.lang.String getFileId() { + java.lang.Object ref = fileId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fileId_ = s; + return s; + } + } + /** + *
+     *下载资源标识ID
+     * 
+ * + * string file_id = 1; + */ + public com.google.protobuf.ByteString + getFileIdBytes() { + java.lang.Object ref = fileId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getFileIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fileId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFileIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fileId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest other = (com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest) obj; + + boolean result = true; + result = result && getFileId() + .equals(other.getFileId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FILE_ID_FIELD_NUMBER; + hash = (53 * hash) + getFileId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFileDownloadRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFileDownloadRequest) + com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFileDownloadProto.internal_static_site_ApiFileDownloadRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFileDownloadProto.internal_static_site_ApiFileDownloadRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest.class, com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + fileId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFileDownloadProto.internal_static_site_ApiFileDownloadRequest_descriptor; + } + + public com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest build() { + com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest buildPartial() { + com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest result = new com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest(this); + result.fileId_ = fileId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest) { + return mergeFrom((com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest other) { + if (other == com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest.getDefaultInstance()) return this; + if (!other.getFileId().isEmpty()) { + fileId_ = other.fileId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object fileId_ = ""; + /** + *
+       *下载资源标识ID
+       * 
+ * + * string file_id = 1; + */ + public java.lang.String getFileId() { + java.lang.Object ref = fileId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fileId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *下载资源标识ID
+       * 
+ * + * string file_id = 1; + */ + public com.google.protobuf.ByteString + getFileIdBytes() { + java.lang.Object ref = fileId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *下载资源标识ID
+       * 
+ * + * string file_id = 1; + */ + public Builder setFileId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fileId_ = value; + onChanged(); + return this; + } + /** + *
+       *下载资源标识ID
+       * 
+ * + * string file_id = 1; + */ + public Builder clearFileId() { + + fileId_ = getDefaultInstance().getFileId(); + onChanged(); + return this; + } + /** + *
+       *下载资源标识ID
+       * 
+ * + * string file_id = 1; + */ + public Builder setFileIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fileId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFileDownloadRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiFileDownloadRequest) + private static final com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest(); + } + + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFileDownloadRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFileDownloadRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiFileDownloadResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFileDownloadResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *通过资源标示ID下载的资源文件
+     * 
+ * + * .core.File file = 1; + */ + boolean hasFile(); + /** + *
+     *通过资源标示ID下载的资源文件
+     * 
+ * + * .core.File file = 1; + */ + com.akaxin.proto.core.FileProto.File getFile(); + /** + *
+     *通过资源标示ID下载的资源文件
+     * 
+ * + * .core.File file = 1; + */ + com.akaxin.proto.core.FileProto.FileOrBuilder getFileOrBuilder(); + } + /** + * Protobuf type {@code site.ApiFileDownloadResponse} + */ + public static final class ApiFileDownloadResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFileDownloadResponse) + ApiFileDownloadResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFileDownloadResponse.newBuilder() to construct. + private ApiFileDownloadResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFileDownloadResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFileDownloadResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.FileProto.File.Builder subBuilder = null; + if (file_ != null) { + subBuilder = file_.toBuilder(); + } + file_ = input.readMessage(com.akaxin.proto.core.FileProto.File.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(file_); + file_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFileDownloadProto.internal_static_site_ApiFileDownloadResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFileDownloadProto.internal_static_site_ApiFileDownloadResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse.class, com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse.Builder.class); + } + + public static final int FILE_FIELD_NUMBER = 1; + private com.akaxin.proto.core.FileProto.File file_; + /** + *
+     *通过资源标示ID下载的资源文件
+     * 
+ * + * .core.File file = 1; + */ + public boolean hasFile() { + return file_ != null; + } + /** + *
+     *通过资源标示ID下载的资源文件
+     * 
+ * + * .core.File file = 1; + */ + public com.akaxin.proto.core.FileProto.File getFile() { + return file_ == null ? com.akaxin.proto.core.FileProto.File.getDefaultInstance() : file_; + } + /** + *
+     *通过资源标示ID下载的资源文件
+     * 
+ * + * .core.File file = 1; + */ + public com.akaxin.proto.core.FileProto.FileOrBuilder getFileOrBuilder() { + return getFile(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (file_ != null) { + output.writeMessage(1, getFile()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (file_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getFile()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse other = (com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse) obj; + + boolean result = true; + result = result && (hasFile() == other.hasFile()); + if (hasFile()) { + result = result && getFile() + .equals(other.getFile()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFile()) { + hash = (37 * hash) + FILE_FIELD_NUMBER; + hash = (53 * hash) + getFile().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFileDownloadResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFileDownloadResponse) + com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFileDownloadProto.internal_static_site_ApiFileDownloadResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFileDownloadProto.internal_static_site_ApiFileDownloadResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse.class, com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (fileBuilder_ == null) { + file_ = null; + } else { + file_ = null; + fileBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFileDownloadProto.internal_static_site_ApiFileDownloadResponse_descriptor; + } + + public com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse build() { + com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse buildPartial() { + com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse result = new com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse(this); + if (fileBuilder_ == null) { + result.file_ = file_; + } else { + result.file_ = fileBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse) { + return mergeFrom((com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse other) { + if (other == com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse.getDefaultInstance()) return this; + if (other.hasFile()) { + mergeFile(other.getFile()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.core.FileProto.File file_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.FileProto.File, com.akaxin.proto.core.FileProto.File.Builder, com.akaxin.proto.core.FileProto.FileOrBuilder> fileBuilder_; + /** + *
+       *通过资源标示ID下载的资源文件
+       * 
+ * + * .core.File file = 1; + */ + public boolean hasFile() { + return fileBuilder_ != null || file_ != null; + } + /** + *
+       *通过资源标示ID下载的资源文件
+       * 
+ * + * .core.File file = 1; + */ + public com.akaxin.proto.core.FileProto.File getFile() { + if (fileBuilder_ == null) { + return file_ == null ? com.akaxin.proto.core.FileProto.File.getDefaultInstance() : file_; + } else { + return fileBuilder_.getMessage(); + } + } + /** + *
+       *通过资源标示ID下载的资源文件
+       * 
+ * + * .core.File file = 1; + */ + public Builder setFile(com.akaxin.proto.core.FileProto.File value) { + if (fileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + file_ = value; + onChanged(); + } else { + fileBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *通过资源标示ID下载的资源文件
+       * 
+ * + * .core.File file = 1; + */ + public Builder setFile( + com.akaxin.proto.core.FileProto.File.Builder builderForValue) { + if (fileBuilder_ == null) { + file_ = builderForValue.build(); + onChanged(); + } else { + fileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *通过资源标示ID下载的资源文件
+       * 
+ * + * .core.File file = 1; + */ + public Builder mergeFile(com.akaxin.proto.core.FileProto.File value) { + if (fileBuilder_ == null) { + if (file_ != null) { + file_ = + com.akaxin.proto.core.FileProto.File.newBuilder(file_).mergeFrom(value).buildPartial(); + } else { + file_ = value; + } + onChanged(); + } else { + fileBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *通过资源标示ID下载的资源文件
+       * 
+ * + * .core.File file = 1; + */ + public Builder clearFile() { + if (fileBuilder_ == null) { + file_ = null; + onChanged(); + } else { + file_ = null; + fileBuilder_ = null; + } + + return this; + } + /** + *
+       *通过资源标示ID下载的资源文件
+       * 
+ * + * .core.File file = 1; + */ + public com.akaxin.proto.core.FileProto.File.Builder getFileBuilder() { + + onChanged(); + return getFileFieldBuilder().getBuilder(); + } + /** + *
+       *通过资源标示ID下载的资源文件
+       * 
+ * + * .core.File file = 1; + */ + public com.akaxin.proto.core.FileProto.FileOrBuilder getFileOrBuilder() { + if (fileBuilder_ != null) { + return fileBuilder_.getMessageOrBuilder(); + } else { + return file_ == null ? + com.akaxin.proto.core.FileProto.File.getDefaultInstance() : file_; + } + } + /** + *
+       *通过资源标示ID下载的资源文件
+       * 
+ * + * .core.File file = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.FileProto.File, com.akaxin.proto.core.FileProto.File.Builder, com.akaxin.proto.core.FileProto.FileOrBuilder> + getFileFieldBuilder() { + if (fileBuilder_ == null) { + fileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.FileProto.File, com.akaxin.proto.core.FileProto.File.Builder, com.akaxin.proto.core.FileProto.FileOrBuilder>( + getFile(), + getParentForChildren(), + isClean()); + file_ = null; + } + return fileBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFileDownloadResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiFileDownloadResponse) + private static final com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse(); + } + + public static com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFileDownloadResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFileDownloadResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFileDownloadProto.ApiFileDownloadResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFileDownloadRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFileDownloadRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFileDownloadResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFileDownloadResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034site/api_file_download.proto\022\004site\032\017co" + + "re/file.proto\")\n\026ApiFileDownloadRequest\022" + + "\017\n\007file_id\030\001 \001(\t\"3\n\027ApiFileDownloadRespo" + + "nse\022\030\n\004file\030\001 \001(\0132\n.core.File2a\n\026ApiFile" + + "DownloadService\022G\n\010download\022\034.site.ApiFi" + + "leDownloadRequest\032\035.site.ApiFileDownload" + + "ResponseB-\n\025com.akaxin.proto.siteB\024ApiFi" + + "leDownloadProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.FileProto.getDescriptor(), + }, assigner); + internal_static_site_ApiFileDownloadRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiFileDownloadRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFileDownloadRequest_descriptor, + new java.lang.String[] { "FileId", }); + internal_static_site_ApiFileDownloadResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiFileDownloadResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFileDownloadResponse_descriptor, + new java.lang.String[] { "File", }); + com.akaxin.proto.core.FileProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFileUploadProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFileUploadProto.java new file mode 100755 index 0000000..7281e21 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFileUploadProto.java @@ -0,0 +1,1532 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_file_upload.proto + +package com.akaxin.proto.site; + +public final class ApiFileUploadProto { + private ApiFileUploadProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiFileUploadRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFileUploadRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *上传文件资源<图片,语音,视频>
+     * 
+ * + * .core.File file = 1; + */ + boolean hasFile(); + /** + *
+     *上传文件资源<图片,语音,视频>
+     * 
+ * + * .core.File file = 1; + */ + com.akaxin.proto.core.FileProto.File getFile(); + /** + *
+     *上传文件资源<图片,语音,视频>
+     * 
+ * + * .core.File file = 1; + */ + com.akaxin.proto.core.FileProto.FileOrBuilder getFileOrBuilder(); + + /** + *
+     *文件资源的描述
+     * 
+ * + * .core.FileDesc fileDesc = 2; + */ + boolean hasFileDesc(); + /** + *
+     *文件资源的描述
+     * 
+ * + * .core.FileDesc fileDesc = 2; + */ + com.akaxin.proto.core.FileProto.FileDesc getFileDesc(); + /** + *
+     *文件资源的描述
+     * 
+ * + * .core.FileDesc fileDesc = 2; + */ + com.akaxin.proto.core.FileProto.FileDescOrBuilder getFileDescOrBuilder(); + } + /** + * Protobuf type {@code site.ApiFileUploadRequest} + */ + public static final class ApiFileUploadRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFileUploadRequest) + ApiFileUploadRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFileUploadRequest.newBuilder() to construct. + private ApiFileUploadRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFileUploadRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFileUploadRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.FileProto.File.Builder subBuilder = null; + if (file_ != null) { + subBuilder = file_.toBuilder(); + } + file_ = input.readMessage(com.akaxin.proto.core.FileProto.File.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(file_); + file_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.akaxin.proto.core.FileProto.FileDesc.Builder subBuilder = null; + if (fileDesc_ != null) { + subBuilder = fileDesc_.toBuilder(); + } + fileDesc_ = input.readMessage(com.akaxin.proto.core.FileProto.FileDesc.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fileDesc_); + fileDesc_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFileUploadProto.internal_static_site_ApiFileUploadRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFileUploadProto.internal_static_site_ApiFileUploadRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest.class, com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest.Builder.class); + } + + public static final int FILE_FIELD_NUMBER = 1; + private com.akaxin.proto.core.FileProto.File file_; + /** + *
+     *上传文件资源<图片,语音,视频>
+     * 
+ * + * .core.File file = 1; + */ + public boolean hasFile() { + return file_ != null; + } + /** + *
+     *上传文件资源<图片,语音,视频>
+     * 
+ * + * .core.File file = 1; + */ + public com.akaxin.proto.core.FileProto.File getFile() { + return file_ == null ? com.akaxin.proto.core.FileProto.File.getDefaultInstance() : file_; + } + /** + *
+     *上传文件资源<图片,语音,视频>
+     * 
+ * + * .core.File file = 1; + */ + public com.akaxin.proto.core.FileProto.FileOrBuilder getFileOrBuilder() { + return getFile(); + } + + public static final int FILEDESC_FIELD_NUMBER = 2; + private com.akaxin.proto.core.FileProto.FileDesc fileDesc_; + /** + *
+     *文件资源的描述
+     * 
+ * + * .core.FileDesc fileDesc = 2; + */ + public boolean hasFileDesc() { + return fileDesc_ != null; + } + /** + *
+     *文件资源的描述
+     * 
+ * + * .core.FileDesc fileDesc = 2; + */ + public com.akaxin.proto.core.FileProto.FileDesc getFileDesc() { + return fileDesc_ == null ? com.akaxin.proto.core.FileProto.FileDesc.getDefaultInstance() : fileDesc_; + } + /** + *
+     *文件资源的描述
+     * 
+ * + * .core.FileDesc fileDesc = 2; + */ + public com.akaxin.proto.core.FileProto.FileDescOrBuilder getFileDescOrBuilder() { + return getFileDesc(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (file_ != null) { + output.writeMessage(1, getFile()); + } + if (fileDesc_ != null) { + output.writeMessage(2, getFileDesc()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (file_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getFile()); + } + if (fileDesc_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getFileDesc()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest other = (com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest) obj; + + boolean result = true; + result = result && (hasFile() == other.hasFile()); + if (hasFile()) { + result = result && getFile() + .equals(other.getFile()); + } + result = result && (hasFileDesc() == other.hasFileDesc()); + if (hasFileDesc()) { + result = result && getFileDesc() + .equals(other.getFileDesc()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFile()) { + hash = (37 * hash) + FILE_FIELD_NUMBER; + hash = (53 * hash) + getFile().hashCode(); + } + if (hasFileDesc()) { + hash = (37 * hash) + FILEDESC_FIELD_NUMBER; + hash = (53 * hash) + getFileDesc().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFileUploadRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFileUploadRequest) + com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFileUploadProto.internal_static_site_ApiFileUploadRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFileUploadProto.internal_static_site_ApiFileUploadRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest.class, com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (fileBuilder_ == null) { + file_ = null; + } else { + file_ = null; + fileBuilder_ = null; + } + if (fileDescBuilder_ == null) { + fileDesc_ = null; + } else { + fileDesc_ = null; + fileDescBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFileUploadProto.internal_static_site_ApiFileUploadRequest_descriptor; + } + + public com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest build() { + com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest buildPartial() { + com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest result = new com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest(this); + if (fileBuilder_ == null) { + result.file_ = file_; + } else { + result.file_ = fileBuilder_.build(); + } + if (fileDescBuilder_ == null) { + result.fileDesc_ = fileDesc_; + } else { + result.fileDesc_ = fileDescBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest) { + return mergeFrom((com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest other) { + if (other == com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest.getDefaultInstance()) return this; + if (other.hasFile()) { + mergeFile(other.getFile()); + } + if (other.hasFileDesc()) { + mergeFileDesc(other.getFileDesc()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.core.FileProto.File file_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.FileProto.File, com.akaxin.proto.core.FileProto.File.Builder, com.akaxin.proto.core.FileProto.FileOrBuilder> fileBuilder_; + /** + *
+       *上传文件资源<图片,语音,视频>
+       * 
+ * + * .core.File file = 1; + */ + public boolean hasFile() { + return fileBuilder_ != null || file_ != null; + } + /** + *
+       *上传文件资源<图片,语音,视频>
+       * 
+ * + * .core.File file = 1; + */ + public com.akaxin.proto.core.FileProto.File getFile() { + if (fileBuilder_ == null) { + return file_ == null ? com.akaxin.proto.core.FileProto.File.getDefaultInstance() : file_; + } else { + return fileBuilder_.getMessage(); + } + } + /** + *
+       *上传文件资源<图片,语音,视频>
+       * 
+ * + * .core.File file = 1; + */ + public Builder setFile(com.akaxin.proto.core.FileProto.File value) { + if (fileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + file_ = value; + onChanged(); + } else { + fileBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *上传文件资源<图片,语音,视频>
+       * 
+ * + * .core.File file = 1; + */ + public Builder setFile( + com.akaxin.proto.core.FileProto.File.Builder builderForValue) { + if (fileBuilder_ == null) { + file_ = builderForValue.build(); + onChanged(); + } else { + fileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *上传文件资源<图片,语音,视频>
+       * 
+ * + * .core.File file = 1; + */ + public Builder mergeFile(com.akaxin.proto.core.FileProto.File value) { + if (fileBuilder_ == null) { + if (file_ != null) { + file_ = + com.akaxin.proto.core.FileProto.File.newBuilder(file_).mergeFrom(value).buildPartial(); + } else { + file_ = value; + } + onChanged(); + } else { + fileBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *上传文件资源<图片,语音,视频>
+       * 
+ * + * .core.File file = 1; + */ + public Builder clearFile() { + if (fileBuilder_ == null) { + file_ = null; + onChanged(); + } else { + file_ = null; + fileBuilder_ = null; + } + + return this; + } + /** + *
+       *上传文件资源<图片,语音,视频>
+       * 
+ * + * .core.File file = 1; + */ + public com.akaxin.proto.core.FileProto.File.Builder getFileBuilder() { + + onChanged(); + return getFileFieldBuilder().getBuilder(); + } + /** + *
+       *上传文件资源<图片,语音,视频>
+       * 
+ * + * .core.File file = 1; + */ + public com.akaxin.proto.core.FileProto.FileOrBuilder getFileOrBuilder() { + if (fileBuilder_ != null) { + return fileBuilder_.getMessageOrBuilder(); + } else { + return file_ == null ? + com.akaxin.proto.core.FileProto.File.getDefaultInstance() : file_; + } + } + /** + *
+       *上传文件资源<图片,语音,视频>
+       * 
+ * + * .core.File file = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.FileProto.File, com.akaxin.proto.core.FileProto.File.Builder, com.akaxin.proto.core.FileProto.FileOrBuilder> + getFileFieldBuilder() { + if (fileBuilder_ == null) { + fileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.FileProto.File, com.akaxin.proto.core.FileProto.File.Builder, com.akaxin.proto.core.FileProto.FileOrBuilder>( + getFile(), + getParentForChildren(), + isClean()); + file_ = null; + } + return fileBuilder_; + } + + private com.akaxin.proto.core.FileProto.FileDesc fileDesc_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.FileProto.FileDesc, com.akaxin.proto.core.FileProto.FileDesc.Builder, com.akaxin.proto.core.FileProto.FileDescOrBuilder> fileDescBuilder_; + /** + *
+       *文件资源的描述
+       * 
+ * + * .core.FileDesc fileDesc = 2; + */ + public boolean hasFileDesc() { + return fileDescBuilder_ != null || fileDesc_ != null; + } + /** + *
+       *文件资源的描述
+       * 
+ * + * .core.FileDesc fileDesc = 2; + */ + public com.akaxin.proto.core.FileProto.FileDesc getFileDesc() { + if (fileDescBuilder_ == null) { + return fileDesc_ == null ? com.akaxin.proto.core.FileProto.FileDesc.getDefaultInstance() : fileDesc_; + } else { + return fileDescBuilder_.getMessage(); + } + } + /** + *
+       *文件资源的描述
+       * 
+ * + * .core.FileDesc fileDesc = 2; + */ + public Builder setFileDesc(com.akaxin.proto.core.FileProto.FileDesc value) { + if (fileDescBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fileDesc_ = value; + onChanged(); + } else { + fileDescBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *文件资源的描述
+       * 
+ * + * .core.FileDesc fileDesc = 2; + */ + public Builder setFileDesc( + com.akaxin.proto.core.FileProto.FileDesc.Builder builderForValue) { + if (fileDescBuilder_ == null) { + fileDesc_ = builderForValue.build(); + onChanged(); + } else { + fileDescBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *文件资源的描述
+       * 
+ * + * .core.FileDesc fileDesc = 2; + */ + public Builder mergeFileDesc(com.akaxin.proto.core.FileProto.FileDesc value) { + if (fileDescBuilder_ == null) { + if (fileDesc_ != null) { + fileDesc_ = + com.akaxin.proto.core.FileProto.FileDesc.newBuilder(fileDesc_).mergeFrom(value).buildPartial(); + } else { + fileDesc_ = value; + } + onChanged(); + } else { + fileDescBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *文件资源的描述
+       * 
+ * + * .core.FileDesc fileDesc = 2; + */ + public Builder clearFileDesc() { + if (fileDescBuilder_ == null) { + fileDesc_ = null; + onChanged(); + } else { + fileDesc_ = null; + fileDescBuilder_ = null; + } + + return this; + } + /** + *
+       *文件资源的描述
+       * 
+ * + * .core.FileDesc fileDesc = 2; + */ + public com.akaxin.proto.core.FileProto.FileDesc.Builder getFileDescBuilder() { + + onChanged(); + return getFileDescFieldBuilder().getBuilder(); + } + /** + *
+       *文件资源的描述
+       * 
+ * + * .core.FileDesc fileDesc = 2; + */ + public com.akaxin.proto.core.FileProto.FileDescOrBuilder getFileDescOrBuilder() { + if (fileDescBuilder_ != null) { + return fileDescBuilder_.getMessageOrBuilder(); + } else { + return fileDesc_ == null ? + com.akaxin.proto.core.FileProto.FileDesc.getDefaultInstance() : fileDesc_; + } + } + /** + *
+       *文件资源的描述
+       * 
+ * + * .core.FileDesc fileDesc = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.FileProto.FileDesc, com.akaxin.proto.core.FileProto.FileDesc.Builder, com.akaxin.proto.core.FileProto.FileDescOrBuilder> + getFileDescFieldBuilder() { + if (fileDescBuilder_ == null) { + fileDescBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.FileProto.FileDesc, com.akaxin.proto.core.FileProto.FileDesc.Builder, com.akaxin.proto.core.FileProto.FileDescOrBuilder>( + getFileDesc(), + getParentForChildren(), + isClean()); + fileDesc_ = null; + } + return fileDescBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFileUploadRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiFileUploadRequest) + private static final com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest(); + } + + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFileUploadRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFileUploadRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiFileUploadResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFileUploadResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *上传资源标识ID
+     * 
+ * + * string file_id = 1; + */ + java.lang.String getFileId(); + /** + *
+     *上传资源标识ID
+     * 
+ * + * string file_id = 1; + */ + com.google.protobuf.ByteString + getFileIdBytes(); + } + /** + * Protobuf type {@code site.ApiFileUploadResponse} + */ + public static final class ApiFileUploadResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFileUploadResponse) + ApiFileUploadResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFileUploadResponse.newBuilder() to construct. + private ApiFileUploadResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFileUploadResponse() { + fileId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFileUploadResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + fileId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFileUploadProto.internal_static_site_ApiFileUploadResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFileUploadProto.internal_static_site_ApiFileUploadResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse.class, com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse.Builder.class); + } + + public static final int FILE_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object fileId_; + /** + *
+     *上传资源标识ID
+     * 
+ * + * string file_id = 1; + */ + public java.lang.String getFileId() { + java.lang.Object ref = fileId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fileId_ = s; + return s; + } + } + /** + *
+     *上传资源标识ID
+     * 
+ * + * string file_id = 1; + */ + public com.google.protobuf.ByteString + getFileIdBytes() { + java.lang.Object ref = fileId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getFileIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fileId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFileIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fileId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse other = (com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse) obj; + + boolean result = true; + result = result && getFileId() + .equals(other.getFileId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FILE_ID_FIELD_NUMBER; + hash = (53 * hash) + getFileId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFileUploadResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFileUploadResponse) + com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFileUploadProto.internal_static_site_ApiFileUploadResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFileUploadProto.internal_static_site_ApiFileUploadResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse.class, com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + fileId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFileUploadProto.internal_static_site_ApiFileUploadResponse_descriptor; + } + + public com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse build() { + com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse buildPartial() { + com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse result = new com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse(this); + result.fileId_ = fileId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse) { + return mergeFrom((com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse other) { + if (other == com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse.getDefaultInstance()) return this; + if (!other.getFileId().isEmpty()) { + fileId_ = other.fileId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object fileId_ = ""; + /** + *
+       *上传资源标识ID
+       * 
+ * + * string file_id = 1; + */ + public java.lang.String getFileId() { + java.lang.Object ref = fileId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fileId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *上传资源标识ID
+       * 
+ * + * string file_id = 1; + */ + public com.google.protobuf.ByteString + getFileIdBytes() { + java.lang.Object ref = fileId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *上传资源标识ID
+       * 
+ * + * string file_id = 1; + */ + public Builder setFileId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fileId_ = value; + onChanged(); + return this; + } + /** + *
+       *上传资源标识ID
+       * 
+ * + * string file_id = 1; + */ + public Builder clearFileId() { + + fileId_ = getDefaultInstance().getFileId(); + onChanged(); + return this; + } + /** + *
+       *上传资源标识ID
+       * 
+ * + * string file_id = 1; + */ + public Builder setFileIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fileId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFileUploadResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiFileUploadResponse) + private static final com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse(); + } + + public static com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFileUploadResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFileUploadResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFileUploadProto.ApiFileUploadResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFileUploadRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFileUploadRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFileUploadResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFileUploadResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032site/api_file_upload.proto\022\004site\032\017core" + + "/file.proto\"R\n\024ApiFileUploadRequest\022\030\n\004f" + + "ile\030\001 \001(\0132\n.core.File\022 \n\010fileDesc\030\002 \001(\0132" + + "\016.core.FileDesc\"(\n\025ApiFileUploadResponse" + + "\022\017\n\007file_id\030\001 \001(\t2Y\n\024ApiFileUploadServic" + + "e\022A\n\006upload\022\032.site.ApiFileUploadRequest\032" + + "\033.site.ApiFileUploadResponseB+\n\025com.akax" + + "in.proto.siteB\022ApiFileUploadProtob\006proto" + + "3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.FileProto.getDescriptor(), + }, assigner); + internal_static_site_ApiFileUploadRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiFileUploadRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFileUploadRequest_descriptor, + new java.lang.String[] { "File", "FileDesc", }); + internal_static_site_ApiFileUploadResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiFileUploadResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFileUploadResponse_descriptor, + new java.lang.String[] { "FileId", }); + com.akaxin.proto.core.FileProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendApplyCountProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendApplyCountProto.java new file mode 100755 index 0000000..08de4b6 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendApplyCountProto.java @@ -0,0 +1,930 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_friend_applyCount.proto + +package com.akaxin.proto.site; + +public final class ApiFriendApplyCountProto { + private ApiFriendApplyCountProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiFriendApplyCountRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendApplyCountRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiFriendApplyCountRequest} + */ + public static final class ApiFriendApplyCountRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendApplyCountRequest) + ApiFriendApplyCountRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendApplyCountRequest.newBuilder() to construct. + private ApiFriendApplyCountRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendApplyCountRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendApplyCountRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendApplyCountProto.internal_static_site_ApiFriendApplyCountRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendApplyCountProto.internal_static_site_ApiFriendApplyCountRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest.class, com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest other = (com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendApplyCountRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendApplyCountRequest) + com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendApplyCountProto.internal_static_site_ApiFriendApplyCountRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendApplyCountProto.internal_static_site_ApiFriendApplyCountRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest.class, com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendApplyCountProto.internal_static_site_ApiFriendApplyCountRequest_descriptor; + } + + public com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest build() { + com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest buildPartial() { + com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest result = new com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest) { + return mergeFrom((com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest other) { + if (other == com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendApplyCountRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendApplyCountRequest) + private static final com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest(); + } + + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendApplyCountRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendApplyCountRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiFriendApplyCountResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendApplyCountResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户好友申请的总数
+     * 
+ * + * int32 apply_count = 1; + */ + int getApplyCount(); + } + /** + * Protobuf type {@code site.ApiFriendApplyCountResponse} + */ + public static final class ApiFriendApplyCountResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendApplyCountResponse) + ApiFriendApplyCountResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendApplyCountResponse.newBuilder() to construct. + private ApiFriendApplyCountResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendApplyCountResponse() { + applyCount_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendApplyCountResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + applyCount_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendApplyCountProto.internal_static_site_ApiFriendApplyCountResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendApplyCountProto.internal_static_site_ApiFriendApplyCountResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse.class, com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse.Builder.class); + } + + public static final int APPLY_COUNT_FIELD_NUMBER = 1; + private int applyCount_; + /** + *
+     *用户好友申请的总数
+     * 
+ * + * int32 apply_count = 1; + */ + public int getApplyCount() { + return applyCount_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (applyCount_ != 0) { + output.writeInt32(1, applyCount_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (applyCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, applyCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse other = (com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse) obj; + + boolean result = true; + result = result && (getApplyCount() + == other.getApplyCount()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + APPLY_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getApplyCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendApplyCountResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendApplyCountResponse) + com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendApplyCountProto.internal_static_site_ApiFriendApplyCountResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendApplyCountProto.internal_static_site_ApiFriendApplyCountResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse.class, com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + applyCount_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendApplyCountProto.internal_static_site_ApiFriendApplyCountResponse_descriptor; + } + + public com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse build() { + com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse buildPartial() { + com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse result = new com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse(this); + result.applyCount_ = applyCount_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse) { + return mergeFrom((com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse other) { + if (other == com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse.getDefaultInstance()) return this; + if (other.getApplyCount() != 0) { + setApplyCount(other.getApplyCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int applyCount_ ; + /** + *
+       *用户好友申请的总数
+       * 
+ * + * int32 apply_count = 1; + */ + public int getApplyCount() { + return applyCount_; + } + /** + *
+       *用户好友申请的总数
+       * 
+ * + * int32 apply_count = 1; + */ + public Builder setApplyCount(int value) { + + applyCount_ = value; + onChanged(); + return this; + } + /** + *
+       *用户好友申请的总数
+       * 
+ * + * int32 apply_count = 1; + */ + public Builder clearApplyCount() { + + applyCount_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendApplyCountResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendApplyCountResponse) + private static final com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse(); + } + + public static com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendApplyCountResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendApplyCountResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendApplyCountProto.ApiFriendApplyCountResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendApplyCountRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendApplyCountRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendApplyCountResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendApplyCountResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n site/api_friend_applyCount.proto\022\004site" + + "\"\034\n\032ApiFriendApplyCountRequest\"2\n\033ApiFri" + + "endApplyCountResponse\022\023\n\013apply_count\030\001 \001" + + "(\0052o\n\032ApiFriendApplyCountService\022Q\n\nappl" + + "yCount\022 .site.ApiFriendApplyCountRequest" + + "\032!.site.ApiFriendApplyCountResponseB1\n\025c" + + "om.akaxin.proto.siteB\030ApiFriendApplyCoun" + + "tProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiFriendApplyCountRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiFriendApplyCountRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendApplyCountRequest_descriptor, + new java.lang.String[] { }); + internal_static_site_ApiFriendApplyCountResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiFriendApplyCountResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendApplyCountResponse_descriptor, + new java.lang.String[] { "ApplyCount", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendApplyListProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendApplyListProto.java new file mode 100755 index 0000000..38c18ae --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendApplyListProto.java @@ -0,0 +1,1338 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_friend_applyList.proto + +package com.akaxin.proto.site; + +public final class ApiFriendApplyListProto { + private ApiFriendApplyListProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiFriendApplyListRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendApplyListRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   *	string site_user_id = 1; 					//用户自身ID
+   * 
+ * + * Protobuf type {@code site.ApiFriendApplyListRequest} + */ + public static final class ApiFriendApplyListRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendApplyListRequest) + ApiFriendApplyListRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendApplyListRequest.newBuilder() to construct. + private ApiFriendApplyListRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendApplyListRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendApplyListRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendApplyListProto.internal_static_site_ApiFriendApplyListRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendApplyListProto.internal_static_site_ApiFriendApplyListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest.class, com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest other = (com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *	string site_user_id = 1; 					//用户自身ID
+     * 
+ * + * Protobuf type {@code site.ApiFriendApplyListRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendApplyListRequest) + com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendApplyListProto.internal_static_site_ApiFriendApplyListRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendApplyListProto.internal_static_site_ApiFriendApplyListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest.class, com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendApplyListProto.internal_static_site_ApiFriendApplyListRequest_descriptor; + } + + public com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest build() { + com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest buildPartial() { + com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest result = new com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest) { + return mergeFrom((com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest other) { + if (other == com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendApplyListRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendApplyListRequest) + private static final com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest(); + } + + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendApplyListRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendApplyListRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiFriendApplyListResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendApplyListResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *好友申请列表
+     * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + java.util.List + getListList(); + /** + *
+     *好友申请列表
+     * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + com.akaxin.proto.core.UserProto.ApplyUserProfile getList(int index); + /** + *
+     *好友申请列表
+     * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + int getListCount(); + /** + *
+     *好友申请列表
+     * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + java.util.List + getListOrBuilderList(); + /** + *
+     *好友申请列表
+     * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + com.akaxin.proto.core.UserProto.ApplyUserProfileOrBuilder getListOrBuilder( + int index); + } + /** + * Protobuf type {@code site.ApiFriendApplyListResponse} + */ + public static final class ApiFriendApplyListResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendApplyListResponse) + ApiFriendApplyListResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendApplyListResponse.newBuilder() to construct. + private ApiFriendApplyListResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendApplyListResponse() { + list_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendApplyListResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + list_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + list_.add( + input.readMessage(com.akaxin.proto.core.UserProto.ApplyUserProfile.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + list_ = java.util.Collections.unmodifiableList(list_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendApplyListProto.internal_static_site_ApiFriendApplyListResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendApplyListProto.internal_static_site_ApiFriendApplyListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse.class, com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse.Builder.class); + } + + public static final int LIST_FIELD_NUMBER = 1; + private java.util.List list_; + /** + *
+     *好友申请列表
+     * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public java.util.List getListList() { + return list_; + } + /** + *
+     *好友申请列表
+     * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public java.util.List + getListOrBuilderList() { + return list_; + } + /** + *
+     *好友申请列表
+     * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public int getListCount() { + return list_.size(); + } + /** + *
+     *好友申请列表
+     * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public com.akaxin.proto.core.UserProto.ApplyUserProfile getList(int index) { + return list_.get(index); + } + /** + *
+     *好友申请列表
+     * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public com.akaxin.proto.core.UserProto.ApplyUserProfileOrBuilder getListOrBuilder( + int index) { + return list_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < list_.size(); i++) { + output.writeMessage(1, list_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < list_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, list_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse other = (com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse) obj; + + boolean result = true; + result = result && getListList() + .equals(other.getListList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getListCount() > 0) { + hash = (37 * hash) + LIST_FIELD_NUMBER; + hash = (53 * hash) + getListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendApplyListResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendApplyListResponse) + com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendApplyListProto.internal_static_site_ApiFriendApplyListResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendApplyListProto.internal_static_site_ApiFriendApplyListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse.class, com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getListFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (listBuilder_ == null) { + list_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + listBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendApplyListProto.internal_static_site_ApiFriendApplyListResponse_descriptor; + } + + public com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse build() { + com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse buildPartial() { + com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse result = new com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse(this); + int from_bitField0_ = bitField0_; + if (listBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + list_ = java.util.Collections.unmodifiableList(list_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.list_ = list_; + } else { + result.list_ = listBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse) { + return mergeFrom((com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse other) { + if (other == com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse.getDefaultInstance()) return this; + if (listBuilder_ == null) { + if (!other.list_.isEmpty()) { + if (list_.isEmpty()) { + list_ = other.list_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureListIsMutable(); + list_.addAll(other.list_); + } + onChanged(); + } + } else { + if (!other.list_.isEmpty()) { + if (listBuilder_.isEmpty()) { + listBuilder_.dispose(); + listBuilder_ = null; + list_ = other.list_; + bitField0_ = (bitField0_ & ~0x00000001); + listBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getListFieldBuilder() : null; + } else { + listBuilder_.addAllMessages(other.list_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List list_ = + java.util.Collections.emptyList(); + private void ensureListIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + list_ = new java.util.ArrayList(list_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.UserProto.ApplyUserProfile, com.akaxin.proto.core.UserProto.ApplyUserProfile.Builder, com.akaxin.proto.core.UserProto.ApplyUserProfileOrBuilder> listBuilder_; + + /** + *
+       *好友申请列表
+       * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public java.util.List getListList() { + if (listBuilder_ == null) { + return java.util.Collections.unmodifiableList(list_); + } else { + return listBuilder_.getMessageList(); + } + } + /** + *
+       *好友申请列表
+       * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public int getListCount() { + if (listBuilder_ == null) { + return list_.size(); + } else { + return listBuilder_.getCount(); + } + } + /** + *
+       *好友申请列表
+       * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public com.akaxin.proto.core.UserProto.ApplyUserProfile getList(int index) { + if (listBuilder_ == null) { + return list_.get(index); + } else { + return listBuilder_.getMessage(index); + } + } + /** + *
+       *好友申请列表
+       * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public Builder setList( + int index, com.akaxin.proto.core.UserProto.ApplyUserProfile value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.set(index, value); + onChanged(); + } else { + listBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *好友申请列表
+       * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public Builder setList( + int index, com.akaxin.proto.core.UserProto.ApplyUserProfile.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.set(index, builderForValue.build()); + onChanged(); + } else { + listBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *好友申请列表
+       * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public Builder addList(com.akaxin.proto.core.UserProto.ApplyUserProfile value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.add(value); + onChanged(); + } else { + listBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *好友申请列表
+       * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public Builder addList( + int index, com.akaxin.proto.core.UserProto.ApplyUserProfile value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.add(index, value); + onChanged(); + } else { + listBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *好友申请列表
+       * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public Builder addList( + com.akaxin.proto.core.UserProto.ApplyUserProfile.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.add(builderForValue.build()); + onChanged(); + } else { + listBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *好友申请列表
+       * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public Builder addList( + int index, com.akaxin.proto.core.UserProto.ApplyUserProfile.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.add(index, builderForValue.build()); + onChanged(); + } else { + listBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *好友申请列表
+       * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public Builder addAllList( + java.lang.Iterable values) { + if (listBuilder_ == null) { + ensureListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, list_); + onChanged(); + } else { + listBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *好友申请列表
+       * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public Builder clearList() { + if (listBuilder_ == null) { + list_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + listBuilder_.clear(); + } + return this; + } + /** + *
+       *好友申请列表
+       * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public Builder removeList(int index) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.remove(index); + onChanged(); + } else { + listBuilder_.remove(index); + } + return this; + } + /** + *
+       *好友申请列表
+       * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public com.akaxin.proto.core.UserProto.ApplyUserProfile.Builder getListBuilder( + int index) { + return getListFieldBuilder().getBuilder(index); + } + /** + *
+       *好友申请列表
+       * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public com.akaxin.proto.core.UserProto.ApplyUserProfileOrBuilder getListOrBuilder( + int index) { + if (listBuilder_ == null) { + return list_.get(index); } else { + return listBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *好友申请列表
+       * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public java.util.List + getListOrBuilderList() { + if (listBuilder_ != null) { + return listBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(list_); + } + } + /** + *
+       *好友申请列表
+       * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public com.akaxin.proto.core.UserProto.ApplyUserProfile.Builder addListBuilder() { + return getListFieldBuilder().addBuilder( + com.akaxin.proto.core.UserProto.ApplyUserProfile.getDefaultInstance()); + } + /** + *
+       *好友申请列表
+       * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public com.akaxin.proto.core.UserProto.ApplyUserProfile.Builder addListBuilder( + int index) { + return getListFieldBuilder().addBuilder( + index, com.akaxin.proto.core.UserProto.ApplyUserProfile.getDefaultInstance()); + } + /** + *
+       *好友申请列表
+       * 
+ * + * repeated .core.ApplyUserProfile list = 1; + */ + public java.util.List + getListBuilderList() { + return getListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.UserProto.ApplyUserProfile, com.akaxin.proto.core.UserProto.ApplyUserProfile.Builder, com.akaxin.proto.core.UserProto.ApplyUserProfileOrBuilder> + getListFieldBuilder() { + if (listBuilder_ == null) { + listBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.UserProto.ApplyUserProfile, com.akaxin.proto.core.UserProto.ApplyUserProfile.Builder, com.akaxin.proto.core.UserProto.ApplyUserProfileOrBuilder>( + list_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + list_ = null; + } + return listBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendApplyListResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendApplyListResponse) + private static final com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse(); + } + + public static com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendApplyListResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendApplyListResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendApplyListProto.ApiFriendApplyListResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendApplyListRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendApplyListRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendApplyListResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendApplyListResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\037site/api_friend_applyList.proto\022\004site\032" + + "\017core/user.proto\"\033\n\031ApiFriendApplyListRe" + + "quest\"B\n\032ApiFriendApplyListResponse\022$\n\004l" + + "ist\030\001 \003(\0132\026.core.ApplyUserProfile2k\n\031Api" + + "FriendApplyListService\022N\n\tapplyList\022\037.si" + + "te.ApiFriendApplyListRequest\032 .site.ApiF" + + "riendApplyListResponseB0\n\025com.akaxin.pro" + + "to.siteB\027ApiFriendApplyListProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.UserProto.getDescriptor(), + }, assigner); + internal_static_site_ApiFriendApplyListRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiFriendApplyListRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendApplyListRequest_descriptor, + new java.lang.String[] { }); + internal_static_site_ApiFriendApplyListResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiFriendApplyListResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendApplyListResponse_descriptor, + new java.lang.String[] { "List", }); + com.akaxin.proto.core.UserProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendApplyProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendApplyProto.java new file mode 100755 index 0000000..dccf3f7 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendApplyProto.java @@ -0,0 +1,1192 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_friend_apply.proto + +package com.akaxin.proto.site; + +public final class ApiFriendApplyProto { + private ApiFriendApplyProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiFriendApplyRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendApplyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *添加的好友ID
+     * 
+ * + * string site_friend_id = 1; + */ + java.lang.String getSiteFriendId(); + /** + *
+     *添加的好友ID
+     * 
+ * + * string site_friend_id = 1; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + + /** + *
+     *申请添加的原因说明
+     * 
+ * + * string apply_reason = 2; + */ + java.lang.String getApplyReason(); + /** + *
+     *申请添加的原因说明
+     * 
+ * + * string apply_reason = 2; + */ + com.google.protobuf.ByteString + getApplyReasonBytes(); + } + /** + * Protobuf type {@code site.ApiFriendApplyRequest} + */ + public static final class ApiFriendApplyRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendApplyRequest) + ApiFriendApplyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendApplyRequest.newBuilder() to construct. + private ApiFriendApplyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendApplyRequest() { + siteFriendId_ = ""; + applyReason_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendApplyRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + applyReason_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendApplyProto.internal_static_site_ApiFriendApplyRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendApplyProto.internal_static_site_ApiFriendApplyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest.class, com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest.Builder.class); + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteFriendId_; + /** + *
+     *添加的好友ID
+     * 
+ * + * string site_friend_id = 1; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + *
+     *添加的好友ID
+     * 
+ * + * string site_friend_id = 1; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLY_REASON_FIELD_NUMBER = 2; + private volatile java.lang.Object applyReason_; + /** + *
+     *申请添加的原因说明
+     * 
+ * + * string apply_reason = 2; + */ + public java.lang.String getApplyReason() { + java.lang.Object ref = applyReason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applyReason_ = s; + return s; + } + } + /** + *
+     *申请添加的原因说明
+     * 
+ * + * string apply_reason = 2; + */ + public com.google.protobuf.ByteString + getApplyReasonBytes() { + java.lang.Object ref = applyReason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + applyReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteFriendId_); + } + if (!getApplyReasonBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, applyReason_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteFriendId_); + } + if (!getApplyReasonBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, applyReason_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest other = (com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest) obj; + + boolean result = true; + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && getApplyReason() + .equals(other.getApplyReason()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (37 * hash) + APPLY_REASON_FIELD_NUMBER; + hash = (53 * hash) + getApplyReason().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendApplyRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendApplyRequest) + com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendApplyProto.internal_static_site_ApiFriendApplyRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendApplyProto.internal_static_site_ApiFriendApplyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest.class, com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteFriendId_ = ""; + + applyReason_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendApplyProto.internal_static_site_ApiFriendApplyRequest_descriptor; + } + + public com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest build() { + com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest buildPartial() { + com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest result = new com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest(this); + result.siteFriendId_ = siteFriendId_; + result.applyReason_ = applyReason_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest) { + return mergeFrom((com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest other) { + if (other == com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest.getDefaultInstance()) return this; + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + if (!other.getApplyReason().isEmpty()) { + applyReason_ = other.applyReason_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + *
+       *添加的好友ID
+       * 
+ * + * string site_friend_id = 1; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *添加的好友ID
+       * 
+ * + * string site_friend_id = 1; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *添加的好友ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + *
+       *添加的好友ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + *
+       *添加的好友ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + + private java.lang.Object applyReason_ = ""; + /** + *
+       *申请添加的原因说明
+       * 
+ * + * string apply_reason = 2; + */ + public java.lang.String getApplyReason() { + java.lang.Object ref = applyReason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applyReason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *申请添加的原因说明
+       * 
+ * + * string apply_reason = 2; + */ + public com.google.protobuf.ByteString + getApplyReasonBytes() { + java.lang.Object ref = applyReason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + applyReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *申请添加的原因说明
+       * 
+ * + * string apply_reason = 2; + */ + public Builder setApplyReason( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + applyReason_ = value; + onChanged(); + return this; + } + /** + *
+       *申请添加的原因说明
+       * 
+ * + * string apply_reason = 2; + */ + public Builder clearApplyReason() { + + applyReason_ = getDefaultInstance().getApplyReason(); + onChanged(); + return this; + } + /** + *
+       *申请添加的原因说明
+       * 
+ * + * string apply_reason = 2; + */ + public Builder setApplyReasonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + applyReason_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendApplyRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendApplyRequest) + private static final com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest(); + } + + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendApplyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendApplyRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiFriendApplyResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendApplyResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiFriendApplyResponse} + */ + public static final class ApiFriendApplyResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendApplyResponse) + ApiFriendApplyResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendApplyResponse.newBuilder() to construct. + private ApiFriendApplyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendApplyResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendApplyResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendApplyProto.internal_static_site_ApiFriendApplyResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendApplyProto.internal_static_site_ApiFriendApplyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse.class, com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse other = (com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendApplyResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendApplyResponse) + com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendApplyProto.internal_static_site_ApiFriendApplyResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendApplyProto.internal_static_site_ApiFriendApplyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse.class, com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendApplyProto.internal_static_site_ApiFriendApplyResponse_descriptor; + } + + public com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse build() { + com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse buildPartial() { + com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse result = new com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse) { + return mergeFrom((com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse other) { + if (other == com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendApplyResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendApplyResponse) + private static final com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse(); + } + + public static com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendApplyResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendApplyResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendApplyProto.ApiFriendApplyResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendApplyRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendApplyRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendApplyResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendApplyResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033site/api_friend_apply.proto\022\004site\"E\n\025A" + + "piFriendApplyRequest\022\026\n\016site_friend_id\030\001" + + " \001(\t\022\024\n\014apply_reason\030\002 \001(\t\"\030\n\026ApiFriendA" + + "pplyResponse2[\n\025ApiFriendApplyService\022B\n" + + "\005apply\022\033.site.ApiFriendApplyRequest\032\034.si" + + "te.ApiFriendApplyResponseB,\n\025com.akaxin." + + "proto.siteB\023ApiFriendApplyProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiFriendApplyRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiFriendApplyRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendApplyRequest_descriptor, + new java.lang.String[] { "SiteFriendId", "ApplyReason", }); + internal_static_site_ApiFriendApplyResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiFriendApplyResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendApplyResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendApplyResultProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendApplyResultProto.java new file mode 100755 index 0000000..bf8a733 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendApplyResultProto.java @@ -0,0 +1,1105 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_friend_applyResult.proto + +package com.akaxin.proto.site; + +public final class ApiFriendApplyResultProto { + private ApiFriendApplyResultProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiFriendApplyResultRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendApplyResultRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *发送好友申请的用户
+     * 
+ * + * string site_friend_id = 1; + */ + java.lang.String getSiteFriendId(); + /** + *
+     *发送好友申请的用户
+     * 
+ * + * string site_friend_id = 1; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + + /** + *
+     *当前用户处理好友申请的结果
+     * 
+ * + * bool apply_result = 2; + */ + boolean getApplyResult(); + } + /** + * Protobuf type {@code site.ApiFriendApplyResultRequest} + */ + public static final class ApiFriendApplyResultRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendApplyResultRequest) + ApiFriendApplyResultRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendApplyResultRequest.newBuilder() to construct. + private ApiFriendApplyResultRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendApplyResultRequest() { + siteFriendId_ = ""; + applyResult_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendApplyResultRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + case 16: { + + applyResult_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendApplyResultProto.internal_static_site_ApiFriendApplyResultRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendApplyResultProto.internal_static_site_ApiFriendApplyResultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest.class, com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest.Builder.class); + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteFriendId_; + /** + *
+     *发送好友申请的用户
+     * 
+ * + * string site_friend_id = 1; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + *
+     *发送好友申请的用户
+     * 
+ * + * string site_friend_id = 1; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLY_RESULT_FIELD_NUMBER = 2; + private boolean applyResult_; + /** + *
+     *当前用户处理好友申请的结果
+     * 
+ * + * bool apply_result = 2; + */ + public boolean getApplyResult() { + return applyResult_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteFriendId_); + } + if (applyResult_ != false) { + output.writeBool(2, applyResult_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteFriendId_); + } + if (applyResult_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, applyResult_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest other = (com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest) obj; + + boolean result = true; + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && (getApplyResult() + == other.getApplyResult()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (37 * hash) + APPLY_RESULT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getApplyResult()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendApplyResultRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendApplyResultRequest) + com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendApplyResultProto.internal_static_site_ApiFriendApplyResultRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendApplyResultProto.internal_static_site_ApiFriendApplyResultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest.class, com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteFriendId_ = ""; + + applyResult_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendApplyResultProto.internal_static_site_ApiFriendApplyResultRequest_descriptor; + } + + public com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest build() { + com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest buildPartial() { + com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest result = new com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest(this); + result.siteFriendId_ = siteFriendId_; + result.applyResult_ = applyResult_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest) { + return mergeFrom((com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest other) { + if (other == com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest.getDefaultInstance()) return this; + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + if (other.getApplyResult() != false) { + setApplyResult(other.getApplyResult()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + *
+       *发送好友申请的用户
+       * 
+ * + * string site_friend_id = 1; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *发送好友申请的用户
+       * 
+ * + * string site_friend_id = 1; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *发送好友申请的用户
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + *
+       *发送好友申请的用户
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + *
+       *发送好友申请的用户
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + + private boolean applyResult_ ; + /** + *
+       *当前用户处理好友申请的结果
+       * 
+ * + * bool apply_result = 2; + */ + public boolean getApplyResult() { + return applyResult_; + } + /** + *
+       *当前用户处理好友申请的结果
+       * 
+ * + * bool apply_result = 2; + */ + public Builder setApplyResult(boolean value) { + + applyResult_ = value; + onChanged(); + return this; + } + /** + *
+       *当前用户处理好友申请的结果
+       * 
+ * + * bool apply_result = 2; + */ + public Builder clearApplyResult() { + + applyResult_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendApplyResultRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendApplyResultRequest) + private static final com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest(); + } + + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendApplyResultRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendApplyResultRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiFriendApplyResultResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendApplyResultResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiFriendApplyResultResponse} + */ + public static final class ApiFriendApplyResultResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendApplyResultResponse) + ApiFriendApplyResultResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendApplyResultResponse.newBuilder() to construct. + private ApiFriendApplyResultResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendApplyResultResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendApplyResultResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendApplyResultProto.internal_static_site_ApiFriendApplyResultResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendApplyResultProto.internal_static_site_ApiFriendApplyResultResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse.class, com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse other = (com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendApplyResultResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendApplyResultResponse) + com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendApplyResultProto.internal_static_site_ApiFriendApplyResultResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendApplyResultProto.internal_static_site_ApiFriendApplyResultResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse.class, com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendApplyResultProto.internal_static_site_ApiFriendApplyResultResponse_descriptor; + } + + public com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse build() { + com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse buildPartial() { + com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse result = new com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse) { + return mergeFrom((com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse other) { + if (other == com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendApplyResultResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendApplyResultResponse) + private static final com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse(); + } + + public static com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendApplyResultResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendApplyResultResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendApplyResultProto.ApiFriendApplyResultResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendApplyResultRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendApplyResultRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendApplyResultResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendApplyResultResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n!site/api_friend_applyResult.proto\022\004sit" + + "e\"K\n\033ApiFriendApplyResultRequest\022\026\n\016site" + + "_friend_id\030\001 \001(\t\022\024\n\014apply_result\030\002 \001(\010\"\036" + + "\n\034ApiFriendApplyResultResponse2s\n\033ApiFri" + + "endApplyResultService\022T\n\013applyResult\022!.s" + + "ite.ApiFriendApplyResultRequest\032\".site.A" + + "piFriendApplyResultResponseB2\n\025com.akaxi" + + "n.proto.siteB\031ApiFriendApplyResultProtob" + + "\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiFriendApplyResultRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiFriendApplyResultRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendApplyResultRequest_descriptor, + new java.lang.String[] { "SiteFriendId", "ApplyResult", }); + internal_static_site_ApiFriendApplyResultResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiFriendApplyResultResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendApplyResultResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendDeleteProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendDeleteProto.java new file mode 100755 index 0000000..03275e9 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendDeleteProto.java @@ -0,0 +1,1019 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_friend_delete.proto + +package com.akaxin.proto.site; + +public final class ApiFriendDeleteProto { + private ApiFriendDeleteProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiFriendDeleteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendDeleteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *当前用户删除的好友ID
+     * 
+ * + * string site_friend_id = 1; + */ + java.lang.String getSiteFriendId(); + /** + *
+     *当前用户删除的好友ID
+     * 
+ * + * string site_friend_id = 1; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + } + /** + * Protobuf type {@code site.ApiFriendDeleteRequest} + */ + public static final class ApiFriendDeleteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendDeleteRequest) + ApiFriendDeleteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendDeleteRequest.newBuilder() to construct. + private ApiFriendDeleteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendDeleteRequest() { + siteFriendId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendDeleteRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendDeleteProto.internal_static_site_ApiFriendDeleteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendDeleteProto.internal_static_site_ApiFriendDeleteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest.class, com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest.Builder.class); + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteFriendId_; + /** + *
+     *当前用户删除的好友ID
+     * 
+ * + * string site_friend_id = 1; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + *
+     *当前用户删除的好友ID
+     * 
+ * + * string site_friend_id = 1; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteFriendId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteFriendId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest other = (com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest) obj; + + boolean result = true; + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendDeleteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendDeleteRequest) + com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendDeleteProto.internal_static_site_ApiFriendDeleteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendDeleteProto.internal_static_site_ApiFriendDeleteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest.class, com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteFriendId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendDeleteProto.internal_static_site_ApiFriendDeleteRequest_descriptor; + } + + public com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest build() { + com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest buildPartial() { + com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest result = new com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest(this); + result.siteFriendId_ = siteFriendId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest) { + return mergeFrom((com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest other) { + if (other == com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest.getDefaultInstance()) return this; + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + *
+       *当前用户删除的好友ID
+       * 
+ * + * string site_friend_id = 1; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *当前用户删除的好友ID
+       * 
+ * + * string site_friend_id = 1; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *当前用户删除的好友ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + *
+       *当前用户删除的好友ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + *
+       *当前用户删除的好友ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendDeleteRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendDeleteRequest) + private static final com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest(); + } + + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendDeleteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendDeleteRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiFriendDeleteResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendDeleteResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiFriendDeleteResponse} + */ + public static final class ApiFriendDeleteResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendDeleteResponse) + ApiFriendDeleteResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendDeleteResponse.newBuilder() to construct. + private ApiFriendDeleteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendDeleteResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendDeleteResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendDeleteProto.internal_static_site_ApiFriendDeleteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendDeleteProto.internal_static_site_ApiFriendDeleteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse.class, com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse other = (com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendDeleteResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendDeleteResponse) + com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendDeleteProto.internal_static_site_ApiFriendDeleteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendDeleteProto.internal_static_site_ApiFriendDeleteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse.class, com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendDeleteProto.internal_static_site_ApiFriendDeleteResponse_descriptor; + } + + public com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse build() { + com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse buildPartial() { + com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse result = new com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse) { + return mergeFrom((com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse other) { + if (other == com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendDeleteResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendDeleteResponse) + private static final com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse(); + } + + public static com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendDeleteResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendDeleteResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendDeleteProto.ApiFriendDeleteResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendDeleteRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendDeleteRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendDeleteResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendDeleteResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034site/api_friend_delete.proto\022\004site\"0\n\026" + + "ApiFriendDeleteRequest\022\026\n\016site_friend_id" + + "\030\001 \001(\t\"\031\n\027ApiFriendDeleteResponse2_\n\026Api" + + "FriendDeleteService\022E\n\006delete\022\034.site.Api" + + "FriendDeleteRequest\032\035.site.ApiFriendDele" + + "teResponseB-\n\025com.akaxin.proto.siteB\024Api" + + "FriendDeleteProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiFriendDeleteRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiFriendDeleteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendDeleteRequest_descriptor, + new java.lang.String[] { "SiteFriendId", }); + internal_static_site_ApiFriendDeleteResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiFriendDeleteResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendDeleteResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendListProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendListProto.java new file mode 100755 index 0000000..58dcb42 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendListProto.java @@ -0,0 +1,1671 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_friend_list.proto + +package com.akaxin.proto.site; + +public final class ApiFriendListProto { + private ApiFriendListProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiFriendListRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendListRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户个人ID
+     * 
+ * + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + *
+     *用户个人ID
+     * 
+ * + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *分页:第几页
+     * 
+ * + * int32 page_number = 2; + */ + int getPageNumber(); + + /** + *
+     *分页:每页条数
+     * 
+ * + * int32 page_size = 3; + */ + int getPageSize(); + } + /** + * Protobuf type {@code site.ApiFriendListRequest} + */ + public static final class ApiFriendListRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendListRequest) + ApiFriendListRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendListRequest.newBuilder() to construct. + private ApiFriendListRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendListRequest() { + siteUserId_ = ""; + pageNumber_ = 0; + pageSize_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendListRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 16: { + + pageNumber_ = input.readInt32(); + break; + } + case 24: { + + pageSize_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendListProto.internal_static_site_ApiFriendListRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendListProto.internal_static_site_ApiFriendListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest.class, com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + *
+     *用户个人ID
+     * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *用户个人ID
+     * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_NUMBER_FIELD_NUMBER = 2; + private int pageNumber_; + /** + *
+     *分页:第几页
+     * 
+ * + * int32 page_number = 2; + */ + public int getPageNumber() { + return pageNumber_; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + *
+     *分页:每页条数
+     * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + if (pageNumber_ != 0) { + output.writeInt32(2, pageNumber_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + if (pageNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageNumber_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest other = (com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && (getPageNumber() + == other.getPageNumber()); + result = result && (getPageSize() + == other.getPageSize()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getPageNumber(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendListRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendListRequest) + com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendListProto.internal_static_site_ApiFriendListRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendListProto.internal_static_site_ApiFriendListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest.class, com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + pageNumber_ = 0; + + pageSize_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendListProto.internal_static_site_ApiFriendListRequest_descriptor; + } + + public com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest build() { + com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest buildPartial() { + com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest result = new com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest(this); + result.siteUserId_ = siteUserId_; + result.pageNumber_ = pageNumber_; + result.pageSize_ = pageSize_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest) { + return mergeFrom((com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest other) { + if (other == com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (other.getPageNumber() != 0) { + setPageNumber(other.getPageNumber()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *用户个人ID
+       * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户个人ID
+       * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户个人ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *用户个人ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *用户个人ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private int pageNumber_ ; + /** + *
+       *分页:第几页
+       * 
+ * + * int32 page_number = 2; + */ + public int getPageNumber() { + return pageNumber_; + } + /** + *
+       *分页:第几页
+       * 
+ * + * int32 page_number = 2; + */ + public Builder setPageNumber(int value) { + + pageNumber_ = value; + onChanged(); + return this; + } + /** + *
+       *分页:第几页
+       * 
+ * + * int32 page_number = 2; + */ + public Builder clearPageNumber() { + + pageNumber_ = 0; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+       *分页:每页条数
+       * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + /** + *
+       *分页:每页条数
+       * 
+ * + * int32 page_size = 3; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+       *分页:每页条数
+       * 
+ * + * int32 page_size = 3; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendListRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendListRequest) + private static final com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest(); + } + + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendListRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendListRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendListProto.ApiFriendListRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiFriendListResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendListResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *好友列表
+     * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + java.util.List + getListList(); + /** + *
+     *好友列表
+     * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + com.akaxin.proto.core.UserProto.SimpleUserProfile getList(int index); + /** + *
+     *好友列表
+     * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + int getListCount(); + /** + *
+     *好友列表
+     * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + java.util.List + getListOrBuilderList(); + /** + *
+     *好友列表
+     * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder getListOrBuilder( + int index); + } + /** + * Protobuf type {@code site.ApiFriendListResponse} + */ + public static final class ApiFriendListResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendListResponse) + ApiFriendListResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendListResponse.newBuilder() to construct. + private ApiFriendListResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendListResponse() { + list_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendListResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + list_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + list_.add( + input.readMessage(com.akaxin.proto.core.UserProto.SimpleUserProfile.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + list_ = java.util.Collections.unmodifiableList(list_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendListProto.internal_static_site_ApiFriendListResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendListProto.internal_static_site_ApiFriendListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse.class, com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse.Builder.class); + } + + public static final int LIST_FIELD_NUMBER = 1; + private java.util.List list_; + /** + *
+     *好友列表
+     * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public java.util.List getListList() { + return list_; + } + /** + *
+     *好友列表
+     * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public java.util.List + getListOrBuilderList() { + return list_; + } + /** + *
+     *好友列表
+     * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public int getListCount() { + return list_.size(); + } + /** + *
+     *好友列表
+     * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile getList(int index) { + return list_.get(index); + } + /** + *
+     *好友列表
+     * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder getListOrBuilder( + int index) { + return list_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < list_.size(); i++) { + output.writeMessage(1, list_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < list_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, list_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse other = (com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse) obj; + + boolean result = true; + result = result && getListList() + .equals(other.getListList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getListCount() > 0) { + hash = (37 * hash) + LIST_FIELD_NUMBER; + hash = (53 * hash) + getListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendListResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendListResponse) + com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendListProto.internal_static_site_ApiFriendListResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendListProto.internal_static_site_ApiFriendListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse.class, com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getListFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (listBuilder_ == null) { + list_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + listBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendListProto.internal_static_site_ApiFriendListResponse_descriptor; + } + + public com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse build() { + com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse buildPartial() { + com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse result = new com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse(this); + int from_bitField0_ = bitField0_; + if (listBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + list_ = java.util.Collections.unmodifiableList(list_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.list_ = list_; + } else { + result.list_ = listBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse) { + return mergeFrom((com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse other) { + if (other == com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse.getDefaultInstance()) return this; + if (listBuilder_ == null) { + if (!other.list_.isEmpty()) { + if (list_.isEmpty()) { + list_ = other.list_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureListIsMutable(); + list_.addAll(other.list_); + } + onChanged(); + } + } else { + if (!other.list_.isEmpty()) { + if (listBuilder_.isEmpty()) { + listBuilder_.dispose(); + listBuilder_ = null; + list_ = other.list_; + bitField0_ = (bitField0_ & ~0x00000001); + listBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getListFieldBuilder() : null; + } else { + listBuilder_.addAllMessages(other.list_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List list_ = + java.util.Collections.emptyList(); + private void ensureListIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + list_ = new java.util.ArrayList(list_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.UserProto.SimpleUserProfile, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder, com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder> listBuilder_; + + /** + *
+       *好友列表
+       * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public java.util.List getListList() { + if (listBuilder_ == null) { + return java.util.Collections.unmodifiableList(list_); + } else { + return listBuilder_.getMessageList(); + } + } + /** + *
+       *好友列表
+       * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public int getListCount() { + if (listBuilder_ == null) { + return list_.size(); + } else { + return listBuilder_.getCount(); + } + } + /** + *
+       *好友列表
+       * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile getList(int index) { + if (listBuilder_ == null) { + return list_.get(index); + } else { + return listBuilder_.getMessage(index); + } + } + /** + *
+       *好友列表
+       * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public Builder setList( + int index, com.akaxin.proto.core.UserProto.SimpleUserProfile value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.set(index, value); + onChanged(); + } else { + listBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *好友列表
+       * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public Builder setList( + int index, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.set(index, builderForValue.build()); + onChanged(); + } else { + listBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *好友列表
+       * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public Builder addList(com.akaxin.proto.core.UserProto.SimpleUserProfile value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.add(value); + onChanged(); + } else { + listBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *好友列表
+       * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public Builder addList( + int index, com.akaxin.proto.core.UserProto.SimpleUserProfile value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.add(index, value); + onChanged(); + } else { + listBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *好友列表
+       * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public Builder addList( + com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.add(builderForValue.build()); + onChanged(); + } else { + listBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *好友列表
+       * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public Builder addList( + int index, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.add(index, builderForValue.build()); + onChanged(); + } else { + listBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *好友列表
+       * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public Builder addAllList( + java.lang.Iterable values) { + if (listBuilder_ == null) { + ensureListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, list_); + onChanged(); + } else { + listBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *好友列表
+       * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public Builder clearList() { + if (listBuilder_ == null) { + list_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + listBuilder_.clear(); + } + return this; + } + /** + *
+       *好友列表
+       * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public Builder removeList(int index) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.remove(index); + onChanged(); + } else { + listBuilder_.remove(index); + } + return this; + } + /** + *
+       *好友列表
+       * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder getListBuilder( + int index) { + return getListFieldBuilder().getBuilder(index); + } + /** + *
+       *好友列表
+       * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder getListOrBuilder( + int index) { + if (listBuilder_ == null) { + return list_.get(index); } else { + return listBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *好友列表
+       * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public java.util.List + getListOrBuilderList() { + if (listBuilder_ != null) { + return listBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(list_); + } + } + /** + *
+       *好友列表
+       * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder addListBuilder() { + return getListFieldBuilder().addBuilder( + com.akaxin.proto.core.UserProto.SimpleUserProfile.getDefaultInstance()); + } + /** + *
+       *好友列表
+       * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder addListBuilder( + int index) { + return getListFieldBuilder().addBuilder( + index, com.akaxin.proto.core.UserProto.SimpleUserProfile.getDefaultInstance()); + } + /** + *
+       *好友列表
+       * 
+ * + * repeated .core.SimpleUserProfile list = 1; + */ + public java.util.List + getListBuilderList() { + return getListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.UserProto.SimpleUserProfile, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder, com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder> + getListFieldBuilder() { + if (listBuilder_ == null) { + listBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.UserProto.SimpleUserProfile, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder, com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder>( + list_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + list_ = null; + } + return listBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendListResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendListResponse) + private static final com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse(); + } + + public static com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendListResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendListResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendListProto.ApiFriendListResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendListRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendListRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendListResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendListResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032site/api_friend_list.proto\022\004site\032\017core" + + "/user.proto\"T\n\024ApiFriendListRequest\022\024\n\014s" + + "ite_user_id\030\001 \001(\t\022\023\n\013page_number\030\002 \001(\005\022\021" + + "\n\tpage_size\030\003 \001(\005\">\n\025ApiFriendListRespon" + + "se\022%\n\004list\030\001 \003(\0132\027.core.SimpleUserProfil" + + "e2W\n\024ApiFriendListService\022?\n\004list\022\032.site" + + ".ApiFriendListRequest\032\033.site.ApiFriendLi" + + "stResponseB+\n\025com.akaxin.proto.siteB\022Api" + + "FriendListProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.UserProto.getDescriptor(), + }, assigner); + internal_static_site_ApiFriendListRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiFriendListRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendListRequest_descriptor, + new java.lang.String[] { "SiteUserId", "PageNumber", "PageSize", }); + internal_static_site_ApiFriendListResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiFriendListResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendListResponse_descriptor, + new java.lang.String[] { "List", }); + com.akaxin.proto.core.UserProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendMuteProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendMuteProto.java new file mode 100755 index 0000000..5d40cf2 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendMuteProto.java @@ -0,0 +1,1104 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_friend_mute.proto + +package com.akaxin.proto.site; + +public final class ApiFriendMuteProto { + private ApiFriendMuteProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiFriendMuteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendMuteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + java.lang.String getSiteFriendId(); + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + } + /** + * Protobuf type {@code site.ApiFriendMuteRequest} + */ + public static final class ApiFriendMuteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendMuteRequest) + ApiFriendMuteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendMuteRequest.newBuilder() to construct. + private ApiFriendMuteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendMuteRequest() { + siteFriendId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendMuteRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendMuteProto.internal_static_site_ApiFriendMuteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendMuteProto.internal_static_site_ApiFriendMuteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest.class, com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest.Builder.class); + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteFriendId_; + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteFriendId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteFriendId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest other = (com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest) obj; + + boolean result = true; + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendMuteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendMuteRequest) + com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendMuteProto.internal_static_site_ApiFriendMuteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendMuteProto.internal_static_site_ApiFriendMuteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest.class, com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteFriendId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendMuteProto.internal_static_site_ApiFriendMuteRequest_descriptor; + } + + public com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest build() { + com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest buildPartial() { + com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest result = new com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest(this); + result.siteFriendId_ = siteFriendId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest) { + return mergeFrom((com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest other) { + if (other == com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest.getDefaultInstance()) return this; + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendMuteRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendMuteRequest) + private static final com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest(); + } + + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendMuteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendMuteRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiFriendMuteResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendMuteResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *消息免打扰 mute notifications
+     * 
+ * + * bool mute = 1; + */ + boolean getMute(); + } + /** + * Protobuf type {@code site.ApiFriendMuteResponse} + */ + public static final class ApiFriendMuteResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendMuteResponse) + ApiFriendMuteResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendMuteResponse.newBuilder() to construct. + private ApiFriendMuteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendMuteResponse() { + mute_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendMuteResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + mute_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendMuteProto.internal_static_site_ApiFriendMuteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendMuteProto.internal_static_site_ApiFriendMuteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse.class, com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse.Builder.class); + } + + public static final int MUTE_FIELD_NUMBER = 1; + private boolean mute_; + /** + *
+     *消息免打扰 mute notifications
+     * 
+ * + * bool mute = 1; + */ + public boolean getMute() { + return mute_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (mute_ != false) { + output.writeBool(1, mute_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mute_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, mute_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse other = (com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse) obj; + + boolean result = true; + result = result && (getMute() + == other.getMute()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMute()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendMuteResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendMuteResponse) + com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendMuteProto.internal_static_site_ApiFriendMuteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendMuteProto.internal_static_site_ApiFriendMuteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse.class, com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + mute_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendMuteProto.internal_static_site_ApiFriendMuteResponse_descriptor; + } + + public com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse build() { + com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse buildPartial() { + com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse result = new com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse(this); + result.mute_ = mute_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse) { + return mergeFrom((com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse other) { + if (other == com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse.getDefaultInstance()) return this; + if (other.getMute() != false) { + setMute(other.getMute()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean mute_ ; + /** + *
+       *消息免打扰 mute notifications
+       * 
+ * + * bool mute = 1; + */ + public boolean getMute() { + return mute_; + } + /** + *
+       *消息免打扰 mute notifications
+       * 
+ * + * bool mute = 1; + */ + public Builder setMute(boolean value) { + + mute_ = value; + onChanged(); + return this; + } + /** + *
+       *消息免打扰 mute notifications
+       * 
+ * + * bool mute = 1; + */ + public Builder clearMute() { + + mute_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendMuteResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendMuteResponse) + private static final com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse(); + } + + public static com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendMuteResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendMuteResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendMuteProto.ApiFriendMuteResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendMuteRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendMuteRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendMuteResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendMuteResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032site/api_friend_mute.proto\022\004site\".\n\024Ap" + + "iFriendMuteRequest\022\026\n\016site_friend_id\030\001 \001" + + "(\t\"%\n\025ApiFriendMuteResponse\022\014\n\004mute\030\001 \001(" + + "\0102W\n\024ApiFriendMuteService\022?\n\004mute\022\032.site" + + ".ApiFriendMuteRequest\032\033.site.ApiFriendMu" + + "teResponseB+\n\025com.akaxin.proto.siteB\022Api" + + "FriendMuteProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiFriendMuteRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiFriendMuteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendMuteRequest_descriptor, + new java.lang.String[] { "SiteFriendId", }); + internal_static_site_ApiFriendMuteResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiFriendMuteResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendMuteResponse_descriptor, + new java.lang.String[] { "Mute", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendProfileProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendProfileProto.java new file mode 100755 index 0000000..c7441c3 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendProfileProto.java @@ -0,0 +1,1754 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_friend_profile.proto + +package com.akaxin.proto.site; + +public final class ApiFriendProfileProto { + private ApiFriendProfileProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiFriendProfileRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendProfileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户身份的公钥,站点优先使用此值
+     * 
+ * + * string user_id_pubk = 1; + */ + java.lang.String getUserIdPubk(); + /** + *
+     *用户身份的公钥,站点优先使用此值
+     * 
+ * + * string user_id_pubk = 1; + */ + com.google.protobuf.ByteString + getUserIdPubkBytes(); + + /** + *
+     *用户在站点的ID,用户公钥为空情况,使用用户站点ID
+     * 
+ * + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + *
+     *用户在站点的ID,用户公钥为空情况,使用用户站点ID
+     * 
+ * + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + } + /** + * Protobuf type {@code site.ApiFriendProfileRequest} + */ + public static final class ApiFriendProfileRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendProfileRequest) + ApiFriendProfileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendProfileRequest.newBuilder() to construct. + private ApiFriendProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendProfileRequest() { + userIdPubk_ = ""; + siteUserId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendProfileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + userIdPubk_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendProfileProto.internal_static_site_ApiFriendProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendProfileProto.internal_static_site_ApiFriendProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest.class, com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest.Builder.class); + } + + public static final int USER_ID_PUBK_FIELD_NUMBER = 1; + private volatile java.lang.Object userIdPubk_; + /** + *
+     *用户身份的公钥,站点优先使用此值
+     * 
+ * + * string user_id_pubk = 1; + */ + public java.lang.String getUserIdPubk() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPubk_ = s; + return s; + } + } + /** + *
+     *用户身份的公钥,站点优先使用此值
+     * 
+ * + * string user_id_pubk = 1; + */ + public com.google.protobuf.ByteString + getUserIdPubkBytes() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + *
+     *用户在站点的ID,用户公钥为空情况,使用用户站点ID
+     * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *用户在站点的ID,用户公钥为空情况,使用用户站点ID
+     * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getUserIdPubkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userIdPubk_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUserIdPubkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userIdPubk_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest other = (com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest) obj; + + boolean result = true; + result = result && getUserIdPubk() + .equals(other.getUserIdPubk()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USER_ID_PUBK_FIELD_NUMBER; + hash = (53 * hash) + getUserIdPubk().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendProfileRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendProfileRequest) + com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendProfileProto.internal_static_site_ApiFriendProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendProfileProto.internal_static_site_ApiFriendProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest.class, com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + userIdPubk_ = ""; + + siteUserId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendProfileProto.internal_static_site_ApiFriendProfileRequest_descriptor; + } + + public com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest build() { + com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest buildPartial() { + com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest result = new com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest(this); + result.userIdPubk_ = userIdPubk_; + result.siteUserId_ = siteUserId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest) { + return mergeFrom((com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest other) { + if (other == com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest.getDefaultInstance()) return this; + if (!other.getUserIdPubk().isEmpty()) { + userIdPubk_ = other.userIdPubk_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object userIdPubk_ = ""; + /** + *
+       *用户身份的公钥,站点优先使用此值
+       * 
+ * + * string user_id_pubk = 1; + */ + public java.lang.String getUserIdPubk() { + java.lang.Object ref = userIdPubk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPubk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户身份的公钥,站点优先使用此值
+       * 
+ * + * string user_id_pubk = 1; + */ + public com.google.protobuf.ByteString + getUserIdPubkBytes() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户身份的公钥,站点优先使用此值
+       * 
+ * + * string user_id_pubk = 1; + */ + public Builder setUserIdPubk( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userIdPubk_ = value; + onChanged(); + return this; + } + /** + *
+       *用户身份的公钥,站点优先使用此值
+       * 
+ * + * string user_id_pubk = 1; + */ + public Builder clearUserIdPubk() { + + userIdPubk_ = getDefaultInstance().getUserIdPubk(); + onChanged(); + return this; + } + /** + *
+       *用户身份的公钥,站点优先使用此值
+       * 
+ * + * string user_id_pubk = 1; + */ + public Builder setUserIdPubkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userIdPubk_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *用户在站点的ID,用户公钥为空情况,使用用户站点ID
+       * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户在站点的ID,用户公钥为空情况,使用用户站点ID
+       * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户在站点的ID,用户公钥为空情况,使用用户站点ID
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *用户在站点的ID,用户公钥为空情况,使用用户站点ID
+       * 
+ * + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *用户在站点的ID,用户公钥为空情况,使用用户站点ID
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendProfileRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendProfileRequest) + private static final com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest(); + } + + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendProfileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendProfileRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiFriendProfileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendProfileResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户好友的信息
+     * 
+ * + * .core.UserProfile profile = 1; + */ + boolean hasProfile(); + /** + *
+     *用户好友的信息
+     * 
+ * + * .core.UserProfile profile = 1; + */ + com.akaxin.proto.core.UserProto.UserProfile getProfile(); + /** + *
+     *用户好友的信息
+     * 
+ * + * .core.UserProfile profile = 1; + */ + com.akaxin.proto.core.UserProto.UserProfileOrBuilder getProfileOrBuilder(); + + /** + *
+     *用户之间的关系
+     * 
+ * + * .core.UserRelation relation = 2; + */ + int getRelationValue(); + /** + *
+     *用户之间的关系
+     * 
+ * + * .core.UserRelation relation = 2; + */ + com.akaxin.proto.core.UserProto.UserRelation getRelation(); + + /** + *
+     *用户公钥,客户端称呼用户身份或者用户证书
+     * 
+ * + * string user_id_pubk = 3; + */ + java.lang.String getUserIdPubk(); + /** + *
+     *用户公钥,客户端称呼用户身份或者用户证书
+     * 
+ * + * string user_id_pubk = 3; + */ + com.google.protobuf.ByteString + getUserIdPubkBytes(); + } + /** + * Protobuf type {@code site.ApiFriendProfileResponse} + */ + public static final class ApiFriendProfileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendProfileResponse) + ApiFriendProfileResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendProfileResponse.newBuilder() to construct. + private ApiFriendProfileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendProfileResponse() { + relation_ = 0; + userIdPubk_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendProfileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.UserProto.UserProfile.Builder subBuilder = null; + if (profile_ != null) { + subBuilder = profile_.toBuilder(); + } + profile_ = input.readMessage(com.akaxin.proto.core.UserProto.UserProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(profile_); + profile_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + int rawValue = input.readEnum(); + + relation_ = rawValue; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + userIdPubk_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendProfileProto.internal_static_site_ApiFriendProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendProfileProto.internal_static_site_ApiFriendProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse.class, com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse.Builder.class); + } + + public static final int PROFILE_FIELD_NUMBER = 1; + private com.akaxin.proto.core.UserProto.UserProfile profile_; + /** + *
+     *用户好友的信息
+     * 
+ * + * .core.UserProfile profile = 1; + */ + public boolean hasProfile() { + return profile_ != null; + } + /** + *
+     *用户好友的信息
+     * 
+ * + * .core.UserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile getProfile() { + return profile_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : profile_; + } + /** + *
+     *用户好友的信息
+     * 
+ * + * .core.UserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getProfileOrBuilder() { + return getProfile(); + } + + public static final int RELATION_FIELD_NUMBER = 2; + private int relation_; + /** + *
+     *用户之间的关系
+     * 
+ * + * .core.UserRelation relation = 2; + */ + public int getRelationValue() { + return relation_; + } + /** + *
+     *用户之间的关系
+     * 
+ * + * .core.UserRelation relation = 2; + */ + public com.akaxin.proto.core.UserProto.UserRelation getRelation() { + com.akaxin.proto.core.UserProto.UserRelation result = com.akaxin.proto.core.UserProto.UserRelation.valueOf(relation_); + return result == null ? com.akaxin.proto.core.UserProto.UserRelation.UNRECOGNIZED : result; + } + + public static final int USER_ID_PUBK_FIELD_NUMBER = 3; + private volatile java.lang.Object userIdPubk_; + /** + *
+     *用户公钥,客户端称呼用户身份或者用户证书
+     * 
+ * + * string user_id_pubk = 3; + */ + public java.lang.String getUserIdPubk() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPubk_ = s; + return s; + } + } + /** + *
+     *用户公钥,客户端称呼用户身份或者用户证书
+     * 
+ * + * string user_id_pubk = 3; + */ + public com.google.protobuf.ByteString + getUserIdPubkBytes() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (profile_ != null) { + output.writeMessage(1, getProfile()); + } + if (relation_ != com.akaxin.proto.core.UserProto.UserRelation.RELATION_NONE.getNumber()) { + output.writeEnum(2, relation_); + } + if (!getUserIdPubkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userIdPubk_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (profile_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProfile()); + } + if (relation_ != com.akaxin.proto.core.UserProto.UserRelation.RELATION_NONE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, relation_); + } + if (!getUserIdPubkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userIdPubk_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse other = (com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse) obj; + + boolean result = true; + result = result && (hasProfile() == other.hasProfile()); + if (hasProfile()) { + result = result && getProfile() + .equals(other.getProfile()); + } + result = result && relation_ == other.relation_; + result = result && getUserIdPubk() + .equals(other.getUserIdPubk()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProfile()) { + hash = (37 * hash) + PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getProfile().hashCode(); + } + hash = (37 * hash) + RELATION_FIELD_NUMBER; + hash = (53 * hash) + relation_; + hash = (37 * hash) + USER_ID_PUBK_FIELD_NUMBER; + hash = (53 * hash) + getUserIdPubk().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendProfileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendProfileResponse) + com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendProfileProto.internal_static_site_ApiFriendProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendProfileProto.internal_static_site_ApiFriendProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse.class, com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (profileBuilder_ == null) { + profile_ = null; + } else { + profile_ = null; + profileBuilder_ = null; + } + relation_ = 0; + + userIdPubk_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendProfileProto.internal_static_site_ApiFriendProfileResponse_descriptor; + } + + public com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse build() { + com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse buildPartial() { + com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse result = new com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse(this); + if (profileBuilder_ == null) { + result.profile_ = profile_; + } else { + result.profile_ = profileBuilder_.build(); + } + result.relation_ = relation_; + result.userIdPubk_ = userIdPubk_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse) { + return mergeFrom((com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse other) { + if (other == com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse.getDefaultInstance()) return this; + if (other.hasProfile()) { + mergeProfile(other.getProfile()); + } + if (other.relation_ != 0) { + setRelationValue(other.getRelationValue()); + } + if (!other.getUserIdPubk().isEmpty()) { + userIdPubk_ = other.userIdPubk_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.core.UserProto.UserProfile profile_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> profileBuilder_; + /** + *
+       *用户好友的信息
+       * 
+ * + * .core.UserProfile profile = 1; + */ + public boolean hasProfile() { + return profileBuilder_ != null || profile_ != null; + } + /** + *
+       *用户好友的信息
+       * 
+ * + * .core.UserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile getProfile() { + if (profileBuilder_ == null) { + return profile_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : profile_; + } else { + return profileBuilder_.getMessage(); + } + } + /** + *
+       *用户好友的信息
+       * 
+ * + * .core.UserProfile profile = 1; + */ + public Builder setProfile(com.akaxin.proto.core.UserProto.UserProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profile_ = value; + onChanged(); + } else { + profileBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *用户好友的信息
+       * 
+ * + * .core.UserProfile profile = 1; + */ + public Builder setProfile( + com.akaxin.proto.core.UserProto.UserProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + profile_ = builderForValue.build(); + onChanged(); + } else { + profileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *用户好友的信息
+       * 
+ * + * .core.UserProfile profile = 1; + */ + public Builder mergeProfile(com.akaxin.proto.core.UserProto.UserProfile value) { + if (profileBuilder_ == null) { + if (profile_ != null) { + profile_ = + com.akaxin.proto.core.UserProto.UserProfile.newBuilder(profile_).mergeFrom(value).buildPartial(); + } else { + profile_ = value; + } + onChanged(); + } else { + profileBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *用户好友的信息
+       * 
+ * + * .core.UserProfile profile = 1; + */ + public Builder clearProfile() { + if (profileBuilder_ == null) { + profile_ = null; + onChanged(); + } else { + profile_ = null; + profileBuilder_ = null; + } + + return this; + } + /** + *
+       *用户好友的信息
+       * 
+ * + * .core.UserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile.Builder getProfileBuilder() { + + onChanged(); + return getProfileFieldBuilder().getBuilder(); + } + /** + *
+       *用户好友的信息
+       * 
+ * + * .core.UserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getProfileOrBuilder() { + if (profileBuilder_ != null) { + return profileBuilder_.getMessageOrBuilder(); + } else { + return profile_ == null ? + com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : profile_; + } + } + /** + *
+       *用户好友的信息
+       * 
+ * + * .core.UserProfile profile = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> + getProfileFieldBuilder() { + if (profileBuilder_ == null) { + profileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder>( + getProfile(), + getParentForChildren(), + isClean()); + profile_ = null; + } + return profileBuilder_; + } + + private int relation_ = 0; + /** + *
+       *用户之间的关系
+       * 
+ * + * .core.UserRelation relation = 2; + */ + public int getRelationValue() { + return relation_; + } + /** + *
+       *用户之间的关系
+       * 
+ * + * .core.UserRelation relation = 2; + */ + public Builder setRelationValue(int value) { + relation_ = value; + onChanged(); + return this; + } + /** + *
+       *用户之间的关系
+       * 
+ * + * .core.UserRelation relation = 2; + */ + public com.akaxin.proto.core.UserProto.UserRelation getRelation() { + com.akaxin.proto.core.UserProto.UserRelation result = com.akaxin.proto.core.UserProto.UserRelation.valueOf(relation_); + return result == null ? com.akaxin.proto.core.UserProto.UserRelation.UNRECOGNIZED : result; + } + /** + *
+       *用户之间的关系
+       * 
+ * + * .core.UserRelation relation = 2; + */ + public Builder setRelation(com.akaxin.proto.core.UserProto.UserRelation value) { + if (value == null) { + throw new NullPointerException(); + } + + relation_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       *用户之间的关系
+       * 
+ * + * .core.UserRelation relation = 2; + */ + public Builder clearRelation() { + + relation_ = 0; + onChanged(); + return this; + } + + private java.lang.Object userIdPubk_ = ""; + /** + *
+       *用户公钥,客户端称呼用户身份或者用户证书
+       * 
+ * + * string user_id_pubk = 3; + */ + public java.lang.String getUserIdPubk() { + java.lang.Object ref = userIdPubk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPubk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户公钥,客户端称呼用户身份或者用户证书
+       * 
+ * + * string user_id_pubk = 3; + */ + public com.google.protobuf.ByteString + getUserIdPubkBytes() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户公钥,客户端称呼用户身份或者用户证书
+       * 
+ * + * string user_id_pubk = 3; + */ + public Builder setUserIdPubk( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userIdPubk_ = value; + onChanged(); + return this; + } + /** + *
+       *用户公钥,客户端称呼用户身份或者用户证书
+       * 
+ * + * string user_id_pubk = 3; + */ + public Builder clearUserIdPubk() { + + userIdPubk_ = getDefaultInstance().getUserIdPubk(); + onChanged(); + return this; + } + /** + *
+       *用户公钥,客户端称呼用户身份或者用户证书
+       * 
+ * + * string user_id_pubk = 3; + */ + public Builder setUserIdPubkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userIdPubk_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendProfileResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendProfileResponse) + private static final com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse(); + } + + public static com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendProfileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendProfileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendProfileProto.ApiFriendProfileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendProfileRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendProfileRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendProfileResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendProfileResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\035site/api_friend_profile.proto\022\004site\032\017c" + + "ore/user.proto\"E\n\027ApiFriendProfileReques" + + "t\022\024\n\014user_id_pubk\030\001 \001(\t\022\024\n\014site_user_id\030" + + "\002 \001(\t\"z\n\030ApiFriendProfileResponse\022\"\n\007pro" + + "file\030\001 \001(\0132\021.core.UserProfile\022$\n\010relatio" + + "n\030\002 \001(\0162\022.core.UserRelation\022\024\n\014user_id_p" + + "ubk\030\003 \001(\t2c\n\027ApiFriendProfileService\022H\n\007" + + "profile\022\035.site.ApiFriendProfileRequest\032\036" + + ".site.ApiFriendProfileResponseB.\n\025com.ak" + + "axin.proto.siteB\025ApiFriendProfileProtob\006" + + "proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.UserProto.getDescriptor(), + }, assigner); + internal_static_site_ApiFriendProfileRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiFriendProfileRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendProfileRequest_descriptor, + new java.lang.String[] { "UserIdPubk", "SiteUserId", }); + internal_static_site_ApiFriendProfileResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiFriendProfileResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendProfileResponse_descriptor, + new java.lang.String[] { "Profile", "Relation", "UserIdPubk", }); + com.akaxin.proto.core.UserProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendRemarkProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendRemarkProto.java new file mode 100755 index 0000000..fd5831e --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendRemarkProto.java @@ -0,0 +1,1193 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_friend_remark.proto + +package com.akaxin.proto.site; + +public final class ApiFriendRemarkProto { + private ApiFriendRemarkProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiFriendRemarkRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendRemarkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + java.lang.String getSiteFriendId(); + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + + /** + *
+     *设置好友的别名
+     * 
+ * + * string alias_name = 2; + */ + java.lang.String getAliasName(); + /** + *
+     *设置好友的别名
+     * 
+ * + * string alias_name = 2; + */ + com.google.protobuf.ByteString + getAliasNameBytes(); + } + /** + * Protobuf type {@code site.ApiFriendRemarkRequest} + */ + public static final class ApiFriendRemarkRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendRemarkRequest) + ApiFriendRemarkRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendRemarkRequest.newBuilder() to construct. + private ApiFriendRemarkRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendRemarkRequest() { + siteFriendId_ = ""; + aliasName_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendRemarkRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + aliasName_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendRemarkProto.internal_static_site_ApiFriendRemarkRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendRemarkProto.internal_static_site_ApiFriendRemarkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest.class, com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest.Builder.class); + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteFriendId_; + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALIAS_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object aliasName_; + /** + *
+     *设置好友的别名
+     * 
+ * + * string alias_name = 2; + */ + public java.lang.String getAliasName() { + java.lang.Object ref = aliasName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + aliasName_ = s; + return s; + } + } + /** + *
+     *设置好友的别名
+     * 
+ * + * string alias_name = 2; + */ + public com.google.protobuf.ByteString + getAliasNameBytes() { + java.lang.Object ref = aliasName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + aliasName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteFriendId_); + } + if (!getAliasNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, aliasName_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteFriendId_); + } + if (!getAliasNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, aliasName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest other = (com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest) obj; + + boolean result = true; + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && getAliasName() + .equals(other.getAliasName()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (37 * hash) + ALIAS_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAliasName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendRemarkRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendRemarkRequest) + com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendRemarkProto.internal_static_site_ApiFriendRemarkRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendRemarkProto.internal_static_site_ApiFriendRemarkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest.class, com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteFriendId_ = ""; + + aliasName_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendRemarkProto.internal_static_site_ApiFriendRemarkRequest_descriptor; + } + + public com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest build() { + com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest buildPartial() { + com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest result = new com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest(this); + result.siteFriendId_ = siteFriendId_; + result.aliasName_ = aliasName_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest) { + return mergeFrom((com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest other) { + if (other == com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest.getDefaultInstance()) return this; + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + if (!other.getAliasName().isEmpty()) { + aliasName_ = other.aliasName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + + private java.lang.Object aliasName_ = ""; + /** + *
+       *设置好友的别名
+       * 
+ * + * string alias_name = 2; + */ + public java.lang.String getAliasName() { + java.lang.Object ref = aliasName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + aliasName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *设置好友的别名
+       * 
+ * + * string alias_name = 2; + */ + public com.google.protobuf.ByteString + getAliasNameBytes() { + java.lang.Object ref = aliasName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + aliasName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *设置好友的别名
+       * 
+ * + * string alias_name = 2; + */ + public Builder setAliasName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + aliasName_ = value; + onChanged(); + return this; + } + /** + *
+       *设置好友的别名
+       * 
+ * + * string alias_name = 2; + */ + public Builder clearAliasName() { + + aliasName_ = getDefaultInstance().getAliasName(); + onChanged(); + return this; + } + /** + *
+       *设置好友的别名
+       * 
+ * + * string alias_name = 2; + */ + public Builder setAliasNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + aliasName_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendRemarkRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendRemarkRequest) + private static final com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest(); + } + + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendRemarkRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendRemarkRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiFriendRemarkResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendRemarkResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiFriendRemarkResponse} + */ + public static final class ApiFriendRemarkResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendRemarkResponse) + ApiFriendRemarkResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendRemarkResponse.newBuilder() to construct. + private ApiFriendRemarkResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendRemarkResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendRemarkResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendRemarkProto.internal_static_site_ApiFriendRemarkResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendRemarkProto.internal_static_site_ApiFriendRemarkResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse.class, com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse other = (com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendRemarkResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendRemarkResponse) + com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendRemarkProto.internal_static_site_ApiFriendRemarkResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendRemarkProto.internal_static_site_ApiFriendRemarkResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse.class, com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendRemarkProto.internal_static_site_ApiFriendRemarkResponse_descriptor; + } + + public com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse build() { + com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse buildPartial() { + com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse result = new com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse) { + return mergeFrom((com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse other) { + if (other == com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendRemarkResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendRemarkResponse) + private static final com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse(); + } + + public static com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendRemarkResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendRemarkResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendRemarkProto.ApiFriendRemarkResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendRemarkRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendRemarkRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendRemarkResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendRemarkResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034site/api_friend_remark.proto\022\004site\"D\n\026" + + "ApiFriendRemarkRequest\022\026\n\016site_friend_id" + + "\030\001 \001(\t\022\022\n\nalias_name\030\002 \001(\t\"\031\n\027ApiFriendR" + + "emarkResponse2_\n\026ApiFriendRemarkService\022" + + "E\n\006remark\022\034.site.ApiFriendRemarkRequest\032" + + "\035.site.ApiFriendRemarkResponseB-\n\025com.ak" + + "axin.proto.siteB\024ApiFriendRemarkProtob\006p" + + "roto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiFriendRemarkRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiFriendRemarkRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendRemarkRequest_descriptor, + new java.lang.String[] { "SiteFriendId", "AliasName", }); + internal_static_site_ApiFriendRemarkResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiFriendRemarkResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendRemarkResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendSettingProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendSettingProto.java new file mode 100755 index 0000000..9ae6c3f --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendSettingProto.java @@ -0,0 +1,1105 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_friend_setting.proto + +package com.akaxin.proto.site; + +public final class ApiFriendSettingProto { + private ApiFriendSettingProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiFriendSettingRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendSettingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + java.lang.String getSiteFriendId(); + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + } + /** + * Protobuf type {@code site.ApiFriendSettingRequest} + */ + public static final class ApiFriendSettingRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendSettingRequest) + ApiFriendSettingRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendSettingRequest.newBuilder() to construct. + private ApiFriendSettingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendSettingRequest() { + siteFriendId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendSettingRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendSettingProto.internal_static_site_ApiFriendSettingRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendSettingProto.internal_static_site_ApiFriendSettingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest.class, com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest.Builder.class); + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteFriendId_; + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteFriendId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteFriendId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest other = (com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest) obj; + + boolean result = true; + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendSettingRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendSettingRequest) + com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendSettingProto.internal_static_site_ApiFriendSettingRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendSettingProto.internal_static_site_ApiFriendSettingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest.class, com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteFriendId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendSettingProto.internal_static_site_ApiFriendSettingRequest_descriptor; + } + + public com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest build() { + com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest buildPartial() { + com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest result = new com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest(this); + result.siteFriendId_ = siteFriendId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest) { + return mergeFrom((com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest other) { + if (other == com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest.getDefaultInstance()) return this; + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendSettingRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendSettingRequest) + private static final com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest(); + } + + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendSettingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendSettingRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiFriendSettingResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendSettingResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *消息免打扰 mute notifications
+     * 
+ * + * bool message_mute = 1; + */ + boolean getMessageMute(); + } + /** + * Protobuf type {@code site.ApiFriendSettingResponse} + */ + public static final class ApiFriendSettingResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendSettingResponse) + ApiFriendSettingResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendSettingResponse.newBuilder() to construct. + private ApiFriendSettingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendSettingResponse() { + messageMute_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendSettingResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + messageMute_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendSettingProto.internal_static_site_ApiFriendSettingResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendSettingProto.internal_static_site_ApiFriendSettingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse.class, com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse.Builder.class); + } + + public static final int MESSAGE_MUTE_FIELD_NUMBER = 1; + private boolean messageMute_; + /** + *
+     *消息免打扰 mute notifications
+     * 
+ * + * bool message_mute = 1; + */ + public boolean getMessageMute() { + return messageMute_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (messageMute_ != false) { + output.writeBool(1, messageMute_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (messageMute_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, messageMute_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse other = (com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse) obj; + + boolean result = true; + result = result && (getMessageMute() + == other.getMessageMute()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MESSAGE_MUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMessageMute()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendSettingResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendSettingResponse) + com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendSettingProto.internal_static_site_ApiFriendSettingResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendSettingProto.internal_static_site_ApiFriendSettingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse.class, com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + messageMute_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendSettingProto.internal_static_site_ApiFriendSettingResponse_descriptor; + } + + public com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse build() { + com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse buildPartial() { + com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse result = new com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse(this); + result.messageMute_ = messageMute_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse) { + return mergeFrom((com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse other) { + if (other == com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse.getDefaultInstance()) return this; + if (other.getMessageMute() != false) { + setMessageMute(other.getMessageMute()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean messageMute_ ; + /** + *
+       *消息免打扰 mute notifications
+       * 
+ * + * bool message_mute = 1; + */ + public boolean getMessageMute() { + return messageMute_; + } + /** + *
+       *消息免打扰 mute notifications
+       * 
+ * + * bool message_mute = 1; + */ + public Builder setMessageMute(boolean value) { + + messageMute_ = value; + onChanged(); + return this; + } + /** + *
+       *消息免打扰 mute notifications
+       * 
+ * + * bool message_mute = 1; + */ + public Builder clearMessageMute() { + + messageMute_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendSettingResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendSettingResponse) + private static final com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse(); + } + + public static com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendSettingResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendSettingResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendSettingProto.ApiFriendSettingResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendSettingRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendSettingRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendSettingResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendSettingResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\035site/api_friend_setting.proto\022\004site\"1\n" + + "\027ApiFriendSettingRequest\022\026\n\016site_friend_" + + "id\030\001 \001(\t\"0\n\030ApiFriendSettingResponse\022\024\n\014" + + "message_mute\030\001 \001(\0102c\n\027ApiFriendSettingSe" + + "rvice\022H\n\007setting\022\035.site.ApiFriendSetting" + + "Request\032\036.site.ApiFriendSettingResponseB" + + ".\n\025com.akaxin.proto.siteB\025ApiFriendSetti" + + "ngProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiFriendSettingRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiFriendSettingRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendSettingRequest_descriptor, + new java.lang.String[] { "SiteFriendId", }); + internal_static_site_ApiFriendSettingResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiFriendSettingResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendSettingResponse_descriptor, + new java.lang.String[] { "MessageMute", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendUpdateMuteProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendUpdateMuteProto.java new file mode 100755 index 0000000..6974c05 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendUpdateMuteProto.java @@ -0,0 +1,1104 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_friend_updateMute.proto + +package com.akaxin.proto.site; + +public final class ApiFriendUpdateMuteProto { + private ApiFriendUpdateMuteProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiFriendUpdateMuteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendUpdateMuteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + java.lang.String getSiteFriendId(); + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + + /** + *
+     *消息免打扰状态
+     * 
+ * + * bool mute = 2; + */ + boolean getMute(); + } + /** + * Protobuf type {@code site.ApiFriendUpdateMuteRequest} + */ + public static final class ApiFriendUpdateMuteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendUpdateMuteRequest) + ApiFriendUpdateMuteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendUpdateMuteRequest.newBuilder() to construct. + private ApiFriendUpdateMuteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendUpdateMuteRequest() { + siteFriendId_ = ""; + mute_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendUpdateMuteRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + case 16: { + + mute_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendUpdateMuteProto.internal_static_site_ApiFriendUpdateMuteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendUpdateMuteProto.internal_static_site_ApiFriendUpdateMuteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest.class, com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest.Builder.class); + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteFriendId_; + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MUTE_FIELD_NUMBER = 2; + private boolean mute_; + /** + *
+     *消息免打扰状态
+     * 
+ * + * bool mute = 2; + */ + public boolean getMute() { + return mute_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteFriendId_); + } + if (mute_ != false) { + output.writeBool(2, mute_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteFriendId_); + } + if (mute_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, mute_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest other = (com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest) obj; + + boolean result = true; + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && (getMute() + == other.getMute()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (37 * hash) + MUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMute()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendUpdateMuteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendUpdateMuteRequest) + com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendUpdateMuteProto.internal_static_site_ApiFriendUpdateMuteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendUpdateMuteProto.internal_static_site_ApiFriendUpdateMuteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest.class, com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteFriendId_ = ""; + + mute_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendUpdateMuteProto.internal_static_site_ApiFriendUpdateMuteRequest_descriptor; + } + + public com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest build() { + com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest buildPartial() { + com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest result = new com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest(this); + result.siteFriendId_ = siteFriendId_; + result.mute_ = mute_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest) { + return mergeFrom((com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest other) { + if (other == com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest.getDefaultInstance()) return this; + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + if (other.getMute() != false) { + setMute(other.getMute()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + + private boolean mute_ ; + /** + *
+       *消息免打扰状态
+       * 
+ * + * bool mute = 2; + */ + public boolean getMute() { + return mute_; + } + /** + *
+       *消息免打扰状态
+       * 
+ * + * bool mute = 2; + */ + public Builder setMute(boolean value) { + + mute_ = value; + onChanged(); + return this; + } + /** + *
+       *消息免打扰状态
+       * 
+ * + * bool mute = 2; + */ + public Builder clearMute() { + + mute_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendUpdateMuteRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendUpdateMuteRequest) + private static final com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest(); + } + + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendUpdateMuteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendUpdateMuteRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiFriendUpdateMuteResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendUpdateMuteResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiFriendUpdateMuteResponse} + */ + public static final class ApiFriendUpdateMuteResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendUpdateMuteResponse) + ApiFriendUpdateMuteResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendUpdateMuteResponse.newBuilder() to construct. + private ApiFriendUpdateMuteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendUpdateMuteResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendUpdateMuteResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendUpdateMuteProto.internal_static_site_ApiFriendUpdateMuteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendUpdateMuteProto.internal_static_site_ApiFriendUpdateMuteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse.class, com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse other = (com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendUpdateMuteResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendUpdateMuteResponse) + com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendUpdateMuteProto.internal_static_site_ApiFriendUpdateMuteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendUpdateMuteProto.internal_static_site_ApiFriendUpdateMuteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse.class, com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendUpdateMuteProto.internal_static_site_ApiFriendUpdateMuteResponse_descriptor; + } + + public com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse build() { + com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse buildPartial() { + com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse result = new com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse) { + return mergeFrom((com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse other) { + if (other == com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendUpdateMuteResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendUpdateMuteResponse) + private static final com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse(); + } + + public static com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendUpdateMuteResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendUpdateMuteResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendUpdateMuteProto.ApiFriendUpdateMuteResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendUpdateMuteRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendUpdateMuteRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendUpdateMuteResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendUpdateMuteResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n site/api_friend_updateMute.proto\022\004site" + + "\"B\n\032ApiFriendUpdateMuteRequest\022\026\n\016site_f" + + "riend_id\030\001 \001(\t\022\014\n\004mute\030\002 \001(\010\"\035\n\033ApiFrien" + + "dUpdateMuteResponse2o\n\032ApiFriendUpdateMu" + + "teService\022Q\n\nupdateMute\022 .site.ApiFriend" + + "UpdateMuteRequest\032!.site.ApiFriendUpdate" + + "MuteResponseB1\n\025com.akaxin.proto.siteB\030A" + + "piFriendUpdateMuteProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiFriendUpdateMuteRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiFriendUpdateMuteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendUpdateMuteRequest_descriptor, + new java.lang.String[] { "SiteFriendId", "Mute", }); + internal_static_site_ApiFriendUpdateMuteResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiFriendUpdateMuteResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendUpdateMuteResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendUpdateSettingProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendUpdateSettingProto.java new file mode 100755 index 0000000..2b42766 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiFriendUpdateSettingProto.java @@ -0,0 +1,1105 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_friend_updateSetting.proto + +package com.akaxin.proto.site; + +public final class ApiFriendUpdateSettingProto { + private ApiFriendUpdateSettingProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiFriendUpdateSettingRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendUpdateSettingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + java.lang.String getSiteFriendId(); + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + + /** + *
+     *消息免打扰 mute notifications
+     * 
+ * + * bool message_mute = 2; + */ + boolean getMessageMute(); + } + /** + * Protobuf type {@code site.ApiFriendUpdateSettingRequest} + */ + public static final class ApiFriendUpdateSettingRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendUpdateSettingRequest) + ApiFriendUpdateSettingRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendUpdateSettingRequest.newBuilder() to construct. + private ApiFriendUpdateSettingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendUpdateSettingRequest() { + siteFriendId_ = ""; + messageMute_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendUpdateSettingRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + case 16: { + + messageMute_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendUpdateSettingProto.internal_static_site_ApiFriendUpdateSettingRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendUpdateSettingProto.internal_static_site_ApiFriendUpdateSettingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest.class, com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest.Builder.class); + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteFriendId_; + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + *
+     *好友用户ID
+     * 
+ * + * string site_friend_id = 1; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MESSAGE_MUTE_FIELD_NUMBER = 2; + private boolean messageMute_; + /** + *
+     *消息免打扰 mute notifications
+     * 
+ * + * bool message_mute = 2; + */ + public boolean getMessageMute() { + return messageMute_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteFriendId_); + } + if (messageMute_ != false) { + output.writeBool(2, messageMute_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteFriendId_); + } + if (messageMute_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, messageMute_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest other = (com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest) obj; + + boolean result = true; + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && (getMessageMute() + == other.getMessageMute()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (37 * hash) + MESSAGE_MUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMessageMute()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendUpdateSettingRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendUpdateSettingRequest) + com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendUpdateSettingProto.internal_static_site_ApiFriendUpdateSettingRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendUpdateSettingProto.internal_static_site_ApiFriendUpdateSettingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest.class, com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteFriendId_ = ""; + + messageMute_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendUpdateSettingProto.internal_static_site_ApiFriendUpdateSettingRequest_descriptor; + } + + public com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest build() { + com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest buildPartial() { + com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest result = new com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest(this); + result.siteFriendId_ = siteFriendId_; + result.messageMute_ = messageMute_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest) { + return mergeFrom((com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest other) { + if (other == com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest.getDefaultInstance()) return this; + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + if (other.getMessageMute() != false) { + setMessageMute(other.getMessageMute()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + *
+       *好友用户ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + + private boolean messageMute_ ; + /** + *
+       *消息免打扰 mute notifications
+       * 
+ * + * bool message_mute = 2; + */ + public boolean getMessageMute() { + return messageMute_; + } + /** + *
+       *消息免打扰 mute notifications
+       * 
+ * + * bool message_mute = 2; + */ + public Builder setMessageMute(boolean value) { + + messageMute_ = value; + onChanged(); + return this; + } + /** + *
+       *消息免打扰 mute notifications
+       * 
+ * + * bool message_mute = 2; + */ + public Builder clearMessageMute() { + + messageMute_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendUpdateSettingRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendUpdateSettingRequest) + private static final com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest(); + } + + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendUpdateSettingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendUpdateSettingRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiFriendUpdateSettingResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiFriendUpdateSettingResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiFriendUpdateSettingResponse} + */ + public static final class ApiFriendUpdateSettingResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiFriendUpdateSettingResponse) + ApiFriendUpdateSettingResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiFriendUpdateSettingResponse.newBuilder() to construct. + private ApiFriendUpdateSettingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiFriendUpdateSettingResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiFriendUpdateSettingResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendUpdateSettingProto.internal_static_site_ApiFriendUpdateSettingResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendUpdateSettingProto.internal_static_site_ApiFriendUpdateSettingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse.class, com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse other = (com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiFriendUpdateSettingResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiFriendUpdateSettingResponse) + com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiFriendUpdateSettingProto.internal_static_site_ApiFriendUpdateSettingResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiFriendUpdateSettingProto.internal_static_site_ApiFriendUpdateSettingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse.class, com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiFriendUpdateSettingProto.internal_static_site_ApiFriendUpdateSettingResponse_descriptor; + } + + public com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse build() { + com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse buildPartial() { + com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse result = new com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse) { + return mergeFrom((com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse other) { + if (other == com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiFriendUpdateSettingResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiFriendUpdateSettingResponse) + private static final com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse(); + } + + public static com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiFriendUpdateSettingResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiFriendUpdateSettingResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiFriendUpdateSettingProto.ApiFriendUpdateSettingResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendUpdateSettingRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendUpdateSettingRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiFriendUpdateSettingResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiFriendUpdateSettingResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n#site/api_friend_updateSetting.proto\022\004s" + + "ite\"M\n\035ApiFriendUpdateSettingRequest\022\026\n\016" + + "site_friend_id\030\001 \001(\t\022\024\n\014message_mute\030\002 \001" + + "(\010\" \n\036ApiFriendUpdateSettingResponse2{\n\035" + + "ApiFriendUpdateSettingService\022Z\n\rupdateS" + + "etting\022#.site.ApiFriendUpdateSettingRequ" + + "est\032$.site.ApiFriendUpdateSettingRespons" + + "eB4\n\025com.akaxin.proto.siteB\033ApiFriendUpd" + + "ateSettingProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiFriendUpdateSettingRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiFriendUpdateSettingRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendUpdateSettingRequest_descriptor, + new java.lang.String[] { "SiteFriendId", "MessageMute", }); + internal_static_site_ApiFriendUpdateSettingResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiFriendUpdateSettingResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiFriendUpdateSettingResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupAddMemberProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupAddMemberProto.java new file mode 100755 index 0000000..58a36c1 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupAddMemberProto.java @@ -0,0 +1,1282 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_group_addMember.proto + +package com.akaxin.proto.site; + +public final class ApiGroupAddMemberProto { + private ApiGroupAddMemberProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiGroupAddMemberRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupAddMemberRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + java.lang.String getGroupId(); + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+     *群组中需要增加的用户ID
+     * 
+ * + * repeated string user_list = 2; + */ + java.util.List + getUserListList(); + /** + *
+     *群组中需要增加的用户ID
+     * 
+ * + * repeated string user_list = 2; + */ + int getUserListCount(); + /** + *
+     *群组中需要增加的用户ID
+     * 
+ * + * repeated string user_list = 2; + */ + java.lang.String getUserList(int index); + /** + *
+     *群组中需要增加的用户ID
+     * 
+ * + * repeated string user_list = 2; + */ + com.google.protobuf.ByteString + getUserListBytes(int index); + } + /** + * Protobuf type {@code site.ApiGroupAddMemberRequest} + */ + public static final class ApiGroupAddMemberRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupAddMemberRequest) + ApiGroupAddMemberRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupAddMemberRequest.newBuilder() to construct. + private ApiGroupAddMemberRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupAddMemberRequest() { + groupId_ = ""; + userList_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupAddMemberRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + groupId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + userList_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + userList_.add(s); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + userList_ = userList_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupAddMemberProto.internal_static_site_ApiGroupAddMemberRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupAddMemberProto.internal_static_site_ApiGroupAddMemberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest.class, com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest.Builder.class); + } + + private int bitField0_; + public static final int GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object groupId_; + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_LIST_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList userList_; + /** + *
+     *群组中需要增加的用户ID
+     * 
+ * + * repeated string user_list = 2; + */ + public com.google.protobuf.ProtocolStringList + getUserListList() { + return userList_; + } + /** + *
+     *群组中需要增加的用户ID
+     * 
+ * + * repeated string user_list = 2; + */ + public int getUserListCount() { + return userList_.size(); + } + /** + *
+     *群组中需要增加的用户ID
+     * 
+ * + * repeated string user_list = 2; + */ + public java.lang.String getUserList(int index) { + return userList_.get(index); + } + /** + *
+     *群组中需要增加的用户ID
+     * 
+ * + * repeated string user_list = 2; + */ + public com.google.protobuf.ByteString + getUserListBytes(int index) { + return userList_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupId_); + } + for (int i = 0; i < userList_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userList_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupId_); + } + { + int dataSize = 0; + for (int i = 0; i < userList_.size(); i++) { + dataSize += computeStringSizeNoTag(userList_.getRaw(i)); + } + size += dataSize; + size += 1 * getUserListList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest other = (com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest) obj; + + boolean result = true; + result = result && getGroupId() + .equals(other.getGroupId()); + result = result && getUserListList() + .equals(other.getUserListList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + if (getUserListCount() > 0) { + hash = (37 * hash) + USER_LIST_FIELD_NUMBER; + hash = (53 * hash) + getUserListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupAddMemberRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupAddMemberRequest) + com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupAddMemberProto.internal_static_site_ApiGroupAddMemberRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupAddMemberProto.internal_static_site_ApiGroupAddMemberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest.class, com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + groupId_ = ""; + + userList_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupAddMemberProto.internal_static_site_ApiGroupAddMemberRequest_descriptor; + } + + public com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest build() { + com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest buildPartial() { + com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest result = new com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.groupId_ = groupId_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + userList_ = userList_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.userList_ = userList_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest) { + return mergeFrom((com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest other) { + if (other == com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + onChanged(); + } + if (!other.userList_.isEmpty()) { + if (userList_.isEmpty()) { + userList_ = other.userList_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUserListIsMutable(); + userList_.addAll(other.userList_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object groupId_ = ""; + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupId_ = value; + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder clearGroupId() { + + groupId_ = getDefaultInstance().getGroupId(); + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList userList_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUserListIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + userList_ = new com.google.protobuf.LazyStringArrayList(userList_); + bitField0_ |= 0x00000002; + } + } + /** + *
+       *群组中需要增加的用户ID
+       * 
+ * + * repeated string user_list = 2; + */ + public com.google.protobuf.ProtocolStringList + getUserListList() { + return userList_.getUnmodifiableView(); + } + /** + *
+       *群组中需要增加的用户ID
+       * 
+ * + * repeated string user_list = 2; + */ + public int getUserListCount() { + return userList_.size(); + } + /** + *
+       *群组中需要增加的用户ID
+       * 
+ * + * repeated string user_list = 2; + */ + public java.lang.String getUserList(int index) { + return userList_.get(index); + } + /** + *
+       *群组中需要增加的用户ID
+       * 
+ * + * repeated string user_list = 2; + */ + public com.google.protobuf.ByteString + getUserListBytes(int index) { + return userList_.getByteString(index); + } + /** + *
+       *群组中需要增加的用户ID
+       * 
+ * + * repeated string user_list = 2; + */ + public Builder setUserList( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserListIsMutable(); + userList_.set(index, value); + onChanged(); + return this; + } + /** + *
+       *群组中需要增加的用户ID
+       * 
+ * + * repeated string user_list = 2; + */ + public Builder addUserList( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserListIsMutable(); + userList_.add(value); + onChanged(); + return this; + } + /** + *
+       *群组中需要增加的用户ID
+       * 
+ * + * repeated string user_list = 2; + */ + public Builder addAllUserList( + java.lang.Iterable values) { + ensureUserListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, userList_); + onChanged(); + return this; + } + /** + *
+       *群组中需要增加的用户ID
+       * 
+ * + * repeated string user_list = 2; + */ + public Builder clearUserList() { + userList_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       *群组中需要增加的用户ID
+       * 
+ * + * repeated string user_list = 2; + */ + public Builder addUserListBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUserListIsMutable(); + userList_.add(value); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupAddMemberRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupAddMemberRequest) + private static final com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest(); + } + + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupAddMemberRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupAddMemberRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiGroupAddMemberResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupAddMemberResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiGroupAddMemberResponse} + */ + public static final class ApiGroupAddMemberResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupAddMemberResponse) + ApiGroupAddMemberResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupAddMemberResponse.newBuilder() to construct. + private ApiGroupAddMemberResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupAddMemberResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupAddMemberResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupAddMemberProto.internal_static_site_ApiGroupAddMemberResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupAddMemberProto.internal_static_site_ApiGroupAddMemberResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse.class, com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse other = (com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupAddMemberResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupAddMemberResponse) + com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupAddMemberProto.internal_static_site_ApiGroupAddMemberResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupAddMemberProto.internal_static_site_ApiGroupAddMemberResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse.class, com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupAddMemberProto.internal_static_site_ApiGroupAddMemberResponse_descriptor; + } + + public com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse build() { + com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse buildPartial() { + com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse result = new com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse) { + return mergeFrom((com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse other) { + if (other == com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupAddMemberResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupAddMemberResponse) + private static final com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse(); + } + + public static com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupAddMemberResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupAddMemberResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupAddMemberProto.ApiGroupAddMemberResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupAddMemberRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupAddMemberRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupAddMemberResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupAddMemberResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\036site/api_group_addMember.proto\022\004site\"?" + + "\n\030ApiGroupAddMemberRequest\022\020\n\010group_id\030\001" + + " \001(\t\022\021\n\tuser_list\030\002 \003(\t\"\033\n\031ApiGroupAddMe" + + "mberResponse2h\n\030ApiGroupAddMemberService" + + "\022L\n\taddMember\022\036.site.ApiGroupAddMemberRe" + + "quest\032\037.site.ApiGroupAddMemberResponseB/" + + "\n\025com.akaxin.proto.siteB\026ApiGroupAddMemb" + + "erProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiGroupAddMemberRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiGroupAddMemberRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupAddMemberRequest_descriptor, + new java.lang.String[] { "GroupId", "UserList", }); + internal_static_site_ApiGroupAddMemberResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiGroupAddMemberResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupAddMemberResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupApplyTokenProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupApplyTokenProto.java new file mode 100755 index 0000000..4dc651a --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupApplyTokenProto.java @@ -0,0 +1,1281 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_group_applyToken.proto + +package com.akaxin.proto.site; + +public final class ApiGroupApplyTokenProto { + private ApiGroupApplyTokenProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiGroupApplyTokenRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupApplyTokenRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组id
+     * 
+ * + * string site_group_id = 1; + */ + java.lang.String getSiteGroupId(); + /** + *
+     *群组id
+     * 
+ * + * string site_group_id = 1; + */ + com.google.protobuf.ByteString + getSiteGroupIdBytes(); + } + /** + * Protobuf type {@code site.ApiGroupApplyTokenRequest} + */ + public static final class ApiGroupApplyTokenRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupApplyTokenRequest) + ApiGroupApplyTokenRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupApplyTokenRequest.newBuilder() to construct. + private ApiGroupApplyTokenRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupApplyTokenRequest() { + siteGroupId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupApplyTokenRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteGroupId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupApplyTokenProto.internal_static_site_ApiGroupApplyTokenRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupApplyTokenProto.internal_static_site_ApiGroupApplyTokenRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest.class, com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest.Builder.class); + } + + public static final int SITE_GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteGroupId_; + /** + *
+     *群组id
+     * 
+ * + * string site_group_id = 1; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } + } + /** + *
+     *群组id
+     * 
+ * + * string site_group_id = 1; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteGroupId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteGroupId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest other = (com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest) obj; + + boolean result = true; + result = result && getSiteGroupId() + .equals(other.getSiteGroupId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteGroupId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupApplyTokenRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupApplyTokenRequest) + com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupApplyTokenProto.internal_static_site_ApiGroupApplyTokenRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupApplyTokenProto.internal_static_site_ApiGroupApplyTokenRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest.class, com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteGroupId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupApplyTokenProto.internal_static_site_ApiGroupApplyTokenRequest_descriptor; + } + + public com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest build() { + com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest buildPartial() { + com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest result = new com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest(this); + result.siteGroupId_ = siteGroupId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest) { + return mergeFrom((com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest other) { + if (other == com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest.getDefaultInstance()) return this; + if (!other.getSiteGroupId().isEmpty()) { + siteGroupId_ = other.siteGroupId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteGroupId_ = ""; + /** + *
+       *群组id
+       * 
+ * + * string site_group_id = 1; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *群组id
+       * 
+ * + * string site_group_id = 1; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *群组id
+       * 
+ * + * string site_group_id = 1; + */ + public Builder setSiteGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteGroupId_ = value; + onChanged(); + return this; + } + /** + *
+       *群组id
+       * 
+ * + * string site_group_id = 1; + */ + public Builder clearSiteGroupId() { + + siteGroupId_ = getDefaultInstance().getSiteGroupId(); + onChanged(); + return this; + } + /** + *
+       *群组id
+       * 
+ * + * string site_group_id = 1; + */ + public Builder setSiteGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteGroupId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupApplyTokenRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupApplyTokenRequest) + private static final com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest(); + } + + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupApplyTokenRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupApplyTokenRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiGroupApplyTokenResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupApplyTokenResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *申请显示二维码使用的token
+     * 
+ * + * string token = 1; + */ + java.lang.String getToken(); + /** + *
+     *申请显示二维码使用的token
+     * 
+ * + * string token = 1; + */ + com.google.protobuf.ByteString + getTokenBytes(); + + /** + *
+     *单位毫秒
+     * 
+ * + * int64 expire_time = 2; + */ + long getExpireTime(); + } + /** + * Protobuf type {@code site.ApiGroupApplyTokenResponse} + */ + public static final class ApiGroupApplyTokenResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupApplyTokenResponse) + ApiGroupApplyTokenResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupApplyTokenResponse.newBuilder() to construct. + private ApiGroupApplyTokenResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupApplyTokenResponse() { + token_ = ""; + expireTime_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupApplyTokenResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + token_ = s; + break; + } + case 16: { + + expireTime_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupApplyTokenProto.internal_static_site_ApiGroupApplyTokenResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupApplyTokenProto.internal_static_site_ApiGroupApplyTokenResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse.class, com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse.Builder.class); + } + + public static final int TOKEN_FIELD_NUMBER = 1; + private volatile java.lang.Object token_; + /** + *
+     *申请显示二维码使用的token
+     * 
+ * + * string token = 1; + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } + } + /** + *
+     *申请显示二维码使用的token
+     * 
+ * + * string token = 1; + */ + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRE_TIME_FIELD_NUMBER = 2; + private long expireTime_; + /** + *
+     *单位毫秒
+     * 
+ * + * int64 expire_time = 2; + */ + public long getExpireTime() { + return expireTime_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, token_); + } + if (expireTime_ != 0L) { + output.writeInt64(2, expireTime_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, token_); + } + if (expireTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, expireTime_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse other = (com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse) obj; + + boolean result = true; + result = result && getToken() + .equals(other.getToken()); + result = result && (getExpireTime() + == other.getExpireTime()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getExpireTime()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupApplyTokenResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupApplyTokenResponse) + com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupApplyTokenProto.internal_static_site_ApiGroupApplyTokenResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupApplyTokenProto.internal_static_site_ApiGroupApplyTokenResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse.class, com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + token_ = ""; + + expireTime_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupApplyTokenProto.internal_static_site_ApiGroupApplyTokenResponse_descriptor; + } + + public com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse build() { + com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse buildPartial() { + com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse result = new com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse(this); + result.token_ = token_; + result.expireTime_ = expireTime_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse) { + return mergeFrom((com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse other) { + if (other == com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse.getDefaultInstance()) return this; + if (!other.getToken().isEmpty()) { + token_ = other.token_; + onChanged(); + } + if (other.getExpireTime() != 0L) { + setExpireTime(other.getExpireTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object token_ = ""; + /** + *
+       *申请显示二维码使用的token
+       * 
+ * + * string token = 1; + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *申请显示二维码使用的token
+       * 
+ * + * string token = 1; + */ + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *申请显示二维码使用的token
+       * 
+ * + * string token = 1; + */ + public Builder setToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + token_ = value; + onChanged(); + return this; + } + /** + *
+       *申请显示二维码使用的token
+       * 
+ * + * string token = 1; + */ + public Builder clearToken() { + + token_ = getDefaultInstance().getToken(); + onChanged(); + return this; + } + /** + *
+       *申请显示二维码使用的token
+       * 
+ * + * string token = 1; + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + token_ = value; + onChanged(); + return this; + } + + private long expireTime_ ; + /** + *
+       *单位毫秒
+       * 
+ * + * int64 expire_time = 2; + */ + public long getExpireTime() { + return expireTime_; + } + /** + *
+       *单位毫秒
+       * 
+ * + * int64 expire_time = 2; + */ + public Builder setExpireTime(long value) { + + expireTime_ = value; + onChanged(); + return this; + } + /** + *
+       *单位毫秒
+       * 
+ * + * int64 expire_time = 2; + */ + public Builder clearExpireTime() { + + expireTime_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupApplyTokenResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupApplyTokenResponse) + private static final com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse(); + } + + public static com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupApplyTokenResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupApplyTokenResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupApplyTokenProto.ApiGroupApplyTokenResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupApplyTokenRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupApplyTokenRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupApplyTokenResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupApplyTokenResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\037site/api_group_applyToken.proto\022\004site\032" + + "\020core/group.proto\"2\n\031ApiGroupApplyTokenR" + + "equest\022\025\n\rsite_group_id\030\001 \001(\t\"@\n\032ApiGrou" + + "pApplyTokenResponse\022\r\n\005token\030\001 \001(\t\022\023\n\013ex" + + "pire_time\030\002 \001(\0032l\n\031ApiGroupApplyTokenSer" + + "vice\022O\n\napplyToken\022\037.site.ApiGroupApplyT" + + "okenRequest\032 .site.ApiGroupApplyTokenRes" + + "ponseB0\n\025com.akaxin.proto.siteB\027ApiGroup" + + "ApplyTokenProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.GroupProto.getDescriptor(), + }, assigner); + internal_static_site_ApiGroupApplyTokenRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiGroupApplyTokenRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupApplyTokenRequest_descriptor, + new java.lang.String[] { "SiteGroupId", }); + internal_static_site_ApiGroupApplyTokenResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiGroupApplyTokenResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupApplyTokenResponse_descriptor, + new java.lang.String[] { "Token", "ExpireTime", }); + com.akaxin.proto.core.GroupProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupCreateProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupCreateProto.java new file mode 100755 index 0000000..70a3e39 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupCreateProto.java @@ -0,0 +1,1540 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_group_create.proto + +package com.akaxin.proto.site; + +public final class ApiGroupCreateProto { + private ApiGroupCreateProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiGroupCreateRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupCreateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *初始建群,增加的群成员
+     * 
+ * + * repeated string site_user_ids = 1; + */ + java.util.List + getSiteUserIdsList(); + /** + *
+     *初始建群,增加的群成员
+     * 
+ * + * repeated string site_user_ids = 1; + */ + int getSiteUserIdsCount(); + /** + *
+     *初始建群,增加的群成员
+     * 
+ * + * repeated string site_user_ids = 1; + */ + java.lang.String getSiteUserIds(int index); + /** + *
+     *初始建群,增加的群成员
+     * 
+ * + * repeated string site_user_ids = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdsBytes(int index); + + /** + *
+     *群名称
+     * 
+ * + * string group_name = 2; + */ + java.lang.String getGroupName(); + /** + *
+     *群名称
+     * 
+ * + * string group_name = 2; + */ + com.google.protobuf.ByteString + getGroupNameBytes(); + } + /** + * Protobuf type {@code site.ApiGroupCreateRequest} + */ + public static final class ApiGroupCreateRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupCreateRequest) + ApiGroupCreateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupCreateRequest.newBuilder() to construct. + private ApiGroupCreateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupCreateRequest() { + siteUserIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + groupName_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupCreateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + siteUserIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + siteUserIds_.add(s); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + groupName_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + siteUserIds_ = siteUserIds_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupCreateProto.internal_static_site_ApiGroupCreateRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupCreateProto.internal_static_site_ApiGroupCreateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest.class, com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest.Builder.class); + } + + private int bitField0_; + public static final int SITE_USER_IDS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList siteUserIds_; + /** + *
+     *初始建群,增加的群成员
+     * 
+ * + * repeated string site_user_ids = 1; + */ + public com.google.protobuf.ProtocolStringList + getSiteUserIdsList() { + return siteUserIds_; + } + /** + *
+     *初始建群,增加的群成员
+     * 
+ * + * repeated string site_user_ids = 1; + */ + public int getSiteUserIdsCount() { + return siteUserIds_.size(); + } + /** + *
+     *初始建群,增加的群成员
+     * 
+ * + * repeated string site_user_ids = 1; + */ + public java.lang.String getSiteUserIds(int index) { + return siteUserIds_.get(index); + } + /** + *
+     *初始建群,增加的群成员
+     * 
+ * + * repeated string site_user_ids = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdsBytes(int index) { + return siteUserIds_.getByteString(index); + } + + public static final int GROUP_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object groupName_; + /** + *
+     *群名称
+     * 
+ * + * string group_name = 2; + */ + public java.lang.String getGroupName() { + java.lang.Object ref = groupName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupName_ = s; + return s; + } + } + /** + *
+     *群名称
+     * 
+ * + * string group_name = 2; + */ + public com.google.protobuf.ByteString + getGroupNameBytes() { + java.lang.Object ref = groupName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < siteUserIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserIds_.getRaw(i)); + } + if (!getGroupNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, groupName_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < siteUserIds_.size(); i++) { + dataSize += computeStringSizeNoTag(siteUserIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getSiteUserIdsList().size(); + } + if (!getGroupNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, groupName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest other = (com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest) obj; + + boolean result = true; + result = result && getSiteUserIdsList() + .equals(other.getSiteUserIdsList()); + result = result && getGroupName() + .equals(other.getGroupName()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSiteUserIdsCount() > 0) { + hash = (37 * hash) + SITE_USER_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserIdsList().hashCode(); + } + hash = (37 * hash) + GROUP_NAME_FIELD_NUMBER; + hash = (53 * hash) + getGroupName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupCreateRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupCreateRequest) + com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupCreateProto.internal_static_site_ApiGroupCreateRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupCreateProto.internal_static_site_ApiGroupCreateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest.class, com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + groupName_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupCreateProto.internal_static_site_ApiGroupCreateRequest_descriptor; + } + + public com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest build() { + com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest buildPartial() { + com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest result = new com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + siteUserIds_ = siteUserIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.siteUserIds_ = siteUserIds_; + result.groupName_ = groupName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest) { + return mergeFrom((com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest other) { + if (other == com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest.getDefaultInstance()) return this; + if (!other.siteUserIds_.isEmpty()) { + if (siteUserIds_.isEmpty()) { + siteUserIds_ = other.siteUserIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSiteUserIdsIsMutable(); + siteUserIds_.addAll(other.siteUserIds_); + } + onChanged(); + } + if (!other.getGroupName().isEmpty()) { + groupName_ = other.groupName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList siteUserIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureSiteUserIdsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + siteUserIds_ = new com.google.protobuf.LazyStringArrayList(siteUserIds_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       *初始建群,增加的群成员
+       * 
+ * + * repeated string site_user_ids = 1; + */ + public com.google.protobuf.ProtocolStringList + getSiteUserIdsList() { + return siteUserIds_.getUnmodifiableView(); + } + /** + *
+       *初始建群,增加的群成员
+       * 
+ * + * repeated string site_user_ids = 1; + */ + public int getSiteUserIdsCount() { + return siteUserIds_.size(); + } + /** + *
+       *初始建群,增加的群成员
+       * 
+ * + * repeated string site_user_ids = 1; + */ + public java.lang.String getSiteUserIds(int index) { + return siteUserIds_.get(index); + } + /** + *
+       *初始建群,增加的群成员
+       * 
+ * + * repeated string site_user_ids = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdsBytes(int index) { + return siteUserIds_.getByteString(index); + } + /** + *
+       *初始建群,增加的群成员
+       * 
+ * + * repeated string site_user_ids = 1; + */ + public Builder setSiteUserIds( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSiteUserIdsIsMutable(); + siteUserIds_.set(index, value); + onChanged(); + return this; + } + /** + *
+       *初始建群,增加的群成员
+       * 
+ * + * repeated string site_user_ids = 1; + */ + public Builder addSiteUserIds( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSiteUserIdsIsMutable(); + siteUserIds_.add(value); + onChanged(); + return this; + } + /** + *
+       *初始建群,增加的群成员
+       * 
+ * + * repeated string site_user_ids = 1; + */ + public Builder addAllSiteUserIds( + java.lang.Iterable values) { + ensureSiteUserIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, siteUserIds_); + onChanged(); + return this; + } + /** + *
+       *初始建群,增加的群成员
+       * 
+ * + * repeated string site_user_ids = 1; + */ + public Builder clearSiteUserIds() { + siteUserIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       *初始建群,增加的群成员
+       * 
+ * + * repeated string site_user_ids = 1; + */ + public Builder addSiteUserIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSiteUserIdsIsMutable(); + siteUserIds_.add(value); + onChanged(); + return this; + } + + private java.lang.Object groupName_ = ""; + /** + *
+       *群名称
+       * 
+ * + * string group_name = 2; + */ + public java.lang.String getGroupName() { + java.lang.Object ref = groupName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *群名称
+       * 
+ * + * string group_name = 2; + */ + public com.google.protobuf.ByteString + getGroupNameBytes() { + java.lang.Object ref = groupName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *群名称
+       * 
+ * + * string group_name = 2; + */ + public Builder setGroupName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupName_ = value; + onChanged(); + return this; + } + /** + *
+       *群名称
+       * 
+ * + * string group_name = 2; + */ + public Builder clearGroupName() { + + groupName_ = getDefaultInstance().getGroupName(); + onChanged(); + return this; + } + /** + *
+       *群名称
+       * 
+ * + * string group_name = 2; + */ + public Builder setGroupNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupName_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupCreateRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupCreateRequest) + private static final com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest(); + } + + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupCreateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupCreateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiGroupCreateResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupCreateResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组信息
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + boolean hasProfile(); + /** + *
+     *群组信息
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + com.akaxin.proto.core.GroupProto.GroupProfile getProfile(); + /** + *
+     *群组信息
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder getProfileOrBuilder(); + } + /** + * Protobuf type {@code site.ApiGroupCreateResponse} + */ + public static final class ApiGroupCreateResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupCreateResponse) + ApiGroupCreateResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupCreateResponse.newBuilder() to construct. + private ApiGroupCreateResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupCreateResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupCreateResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.GroupProto.GroupProfile.Builder subBuilder = null; + if (profile_ != null) { + subBuilder = profile_.toBuilder(); + } + profile_ = input.readMessage(com.akaxin.proto.core.GroupProto.GroupProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(profile_); + profile_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupCreateProto.internal_static_site_ApiGroupCreateResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupCreateProto.internal_static_site_ApiGroupCreateResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse.class, com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse.Builder.class); + } + + public static final int PROFILE_FIELD_NUMBER = 1; + private com.akaxin.proto.core.GroupProto.GroupProfile profile_; + /** + *
+     *群组信息
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + public boolean hasProfile() { + return profile_ != null; + } + /** + *
+     *群组信息
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile getProfile() { + return profile_ == null ? com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance() : profile_; + } + /** + *
+     *群组信息
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder getProfileOrBuilder() { + return getProfile(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (profile_ != null) { + output.writeMessage(1, getProfile()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (profile_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProfile()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse other = (com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse) obj; + + boolean result = true; + result = result && (hasProfile() == other.hasProfile()); + if (hasProfile()) { + result = result && getProfile() + .equals(other.getProfile()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProfile()) { + hash = (37 * hash) + PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getProfile().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupCreateResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupCreateResponse) + com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupCreateProto.internal_static_site_ApiGroupCreateResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupCreateProto.internal_static_site_ApiGroupCreateResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse.class, com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (profileBuilder_ == null) { + profile_ = null; + } else { + profile_ = null; + profileBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupCreateProto.internal_static_site_ApiGroupCreateResponse_descriptor; + } + + public com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse build() { + com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse buildPartial() { + com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse result = new com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse(this); + if (profileBuilder_ == null) { + result.profile_ = profile_; + } else { + result.profile_ = profileBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse) { + return mergeFrom((com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse other) { + if (other == com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse.getDefaultInstance()) return this; + if (other.hasProfile()) { + mergeProfile(other.getProfile()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.core.GroupProto.GroupProfile profile_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupProfile, com.akaxin.proto.core.GroupProto.GroupProfile.Builder, com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder> profileBuilder_; + /** + *
+       *群组信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public boolean hasProfile() { + return profileBuilder_ != null || profile_ != null; + } + /** + *
+       *群组信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile getProfile() { + if (profileBuilder_ == null) { + return profile_ == null ? com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance() : profile_; + } else { + return profileBuilder_.getMessage(); + } + } + /** + *
+       *群组信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public Builder setProfile(com.akaxin.proto.core.GroupProto.GroupProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profile_ = value; + onChanged(); + } else { + profileBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群组信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public Builder setProfile( + com.akaxin.proto.core.GroupProto.GroupProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + profile_ = builderForValue.build(); + onChanged(); + } else { + profileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群组信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public Builder mergeProfile(com.akaxin.proto.core.GroupProto.GroupProfile value) { + if (profileBuilder_ == null) { + if (profile_ != null) { + profile_ = + com.akaxin.proto.core.GroupProto.GroupProfile.newBuilder(profile_).mergeFrom(value).buildPartial(); + } else { + profile_ = value; + } + onChanged(); + } else { + profileBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群组信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public Builder clearProfile() { + if (profileBuilder_ == null) { + profile_ = null; + onChanged(); + } else { + profile_ = null; + profileBuilder_ = null; + } + + return this; + } + /** + *
+       *群组信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile.Builder getProfileBuilder() { + + onChanged(); + return getProfileFieldBuilder().getBuilder(); + } + /** + *
+       *群组信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder getProfileOrBuilder() { + if (profileBuilder_ != null) { + return profileBuilder_.getMessageOrBuilder(); + } else { + return profile_ == null ? + com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance() : profile_; + } + } + /** + *
+       *群组信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupProfile, com.akaxin.proto.core.GroupProto.GroupProfile.Builder, com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder> + getProfileFieldBuilder() { + if (profileBuilder_ == null) { + profileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupProfile, com.akaxin.proto.core.GroupProto.GroupProfile.Builder, com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder>( + getProfile(), + getParentForChildren(), + isClean()); + profile_ = null; + } + return profileBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupCreateResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupCreateResponse) + private static final com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse(); + } + + public static com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupCreateResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupCreateResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupCreateProto.ApiGroupCreateResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupCreateRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupCreateRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupCreateResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupCreateResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033site/api_group_create.proto\022\004site\032\020cor" + + "e/group.proto\"B\n\025ApiGroupCreateRequest\022\025" + + "\n\rsite_user_ids\030\001 \003(\t\022\022\n\ngroup_name\030\002 \001(" + + "\t\"=\n\026ApiGroupCreateResponse\022#\n\007profile\030\001" + + " \001(\0132\022.core.GroupProfile2\\\n\025ApiGroupCrea" + + "teService\022C\n\006create\022\033.site.ApiGroupCreat" + + "eRequest\032\034.site.ApiGroupCreateResponseB," + + "\n\025com.akaxin.proto.siteB\023ApiGroupCreateP" + + "rotob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.GroupProto.getDescriptor(), + }, assigner); + internal_static_site_ApiGroupCreateRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiGroupCreateRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupCreateRequest_descriptor, + new java.lang.String[] { "SiteUserIds", "GroupName", }); + internal_static_site_ApiGroupCreateResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiGroupCreateResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupCreateResponse_descriptor, + new java.lang.String[] { "Profile", }); + com.akaxin.proto.core.GroupProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupDeleteProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupDeleteProto.java new file mode 100755 index 0000000..7f10e54 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupDeleteProto.java @@ -0,0 +1,1019 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_group_delete.proto + +package com.akaxin.proto.site; + +public final class ApiGroupDeleteProto { + private ApiGroupDeleteProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiGroupDeleteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupDeleteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *删除的群组ID
+     * 
+ * + * string group_id = 1; + */ + java.lang.String getGroupId(); + /** + *
+     *删除的群组ID
+     * 
+ * + * string group_id = 1; + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + } + /** + * Protobuf type {@code site.ApiGroupDeleteRequest} + */ + public static final class ApiGroupDeleteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupDeleteRequest) + ApiGroupDeleteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupDeleteRequest.newBuilder() to construct. + private ApiGroupDeleteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupDeleteRequest() { + groupId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupDeleteRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + groupId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupDeleteProto.internal_static_site_ApiGroupDeleteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupDeleteProto.internal_static_site_ApiGroupDeleteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest.class, com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object groupId_; + /** + *
+     *删除的群组ID
+     * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+     *删除的群组ID
+     * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest other = (com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest) obj; + + boolean result = true; + result = result && getGroupId() + .equals(other.getGroupId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupDeleteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupDeleteRequest) + com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupDeleteProto.internal_static_site_ApiGroupDeleteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupDeleteProto.internal_static_site_ApiGroupDeleteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest.class, com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + groupId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupDeleteProto.internal_static_site_ApiGroupDeleteRequest_descriptor; + } + + public com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest build() { + com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest buildPartial() { + com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest result = new com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest(this); + result.groupId_ = groupId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest) { + return mergeFrom((com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest other) { + if (other == com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object groupId_ = ""; + /** + *
+       *删除的群组ID
+       * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *删除的群组ID
+       * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *删除的群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupId_ = value; + onChanged(); + return this; + } + /** + *
+       *删除的群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder clearGroupId() { + + groupId_ = getDefaultInstance().getGroupId(); + onChanged(); + return this; + } + /** + *
+       *删除的群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupDeleteRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupDeleteRequest) + private static final com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest(); + } + + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupDeleteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupDeleteRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiGroupDeleteResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupDeleteResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiGroupDeleteResponse} + */ + public static final class ApiGroupDeleteResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupDeleteResponse) + ApiGroupDeleteResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupDeleteResponse.newBuilder() to construct. + private ApiGroupDeleteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupDeleteResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupDeleteResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupDeleteProto.internal_static_site_ApiGroupDeleteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupDeleteProto.internal_static_site_ApiGroupDeleteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse.class, com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse other = (com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupDeleteResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupDeleteResponse) + com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupDeleteProto.internal_static_site_ApiGroupDeleteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupDeleteProto.internal_static_site_ApiGroupDeleteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse.class, com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupDeleteProto.internal_static_site_ApiGroupDeleteResponse_descriptor; + } + + public com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse build() { + com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse buildPartial() { + com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse result = new com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse) { + return mergeFrom((com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse other) { + if (other == com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupDeleteResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupDeleteResponse) + private static final com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse(); + } + + public static com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupDeleteResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupDeleteResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupDeleteProto.ApiGroupDeleteResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupDeleteRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupDeleteRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupDeleteResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupDeleteResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033site/api_group_delete.proto\022\004site\")\n\025A" + + "piGroupDeleteRequest\022\020\n\010group_id\030\001 \001(\t\"\030" + + "\n\026ApiGroupDeleteResponse2\\\n\025ApiGroupDele" + + "teService\022C\n\006delete\022\033.site.ApiGroupDelet" + + "eRequest\032\034.site.ApiGroupDeleteResponseB," + + "\n\025com.akaxin.proto.siteB\023ApiGroupDeleteP" + + "rotob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiGroupDeleteRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiGroupDeleteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupDeleteRequest_descriptor, + new java.lang.String[] { "GroupId", }); + internal_static_site_ApiGroupDeleteResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiGroupDeleteResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupDeleteResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupJoinByTokenProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupJoinByTokenProto.java new file mode 100755 index 0000000..fb9231a --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupJoinByTokenProto.java @@ -0,0 +1,1196 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_group_joinByToken.proto + +package com.akaxin.proto.site; + +public final class ApiGroupJoinByTokenProto { + private ApiGroupJoinByTokenProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiGroupJoinByTokenRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupJoinByTokenRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组id
+     * 
+ * + * string site_group_id = 1; + */ + java.lang.String getSiteGroupId(); + /** + *
+     *群组id
+     * 
+ * + * string site_group_id = 1; + */ + com.google.protobuf.ByteString + getSiteGroupIdBytes(); + + /** + *
+     *群token
+     * 
+ * + * string token = 2; + */ + java.lang.String getToken(); + /** + *
+     *群token
+     * 
+ * + * string token = 2; + */ + com.google.protobuf.ByteString + getTokenBytes(); + } + /** + * Protobuf type {@code site.ApiGroupJoinByTokenRequest} + */ + public static final class ApiGroupJoinByTokenRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupJoinByTokenRequest) + ApiGroupJoinByTokenRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupJoinByTokenRequest.newBuilder() to construct. + private ApiGroupJoinByTokenRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupJoinByTokenRequest() { + siteGroupId_ = ""; + token_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupJoinByTokenRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteGroupId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + token_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupJoinByTokenProto.internal_static_site_ApiGroupJoinByTokenRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupJoinByTokenProto.internal_static_site_ApiGroupJoinByTokenRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest.class, com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest.Builder.class); + } + + public static final int SITE_GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteGroupId_; + /** + *
+     *群组id
+     * 
+ * + * string site_group_id = 1; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } + } + /** + *
+     *群组id
+     * 
+ * + * string site_group_id = 1; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object token_; + /** + *
+     *群token
+     * 
+ * + * string token = 2; + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } + } + /** + *
+     *群token
+     * 
+ * + * string token = 2; + */ + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteGroupId_); + } + if (!getTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, token_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteGroupId_); + } + if (!getTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, token_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest other = (com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest) obj; + + boolean result = true; + result = result && getSiteGroupId() + .equals(other.getSiteGroupId()); + result = result && getToken() + .equals(other.getToken()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteGroupId().hashCode(); + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupJoinByTokenRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupJoinByTokenRequest) + com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupJoinByTokenProto.internal_static_site_ApiGroupJoinByTokenRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupJoinByTokenProto.internal_static_site_ApiGroupJoinByTokenRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest.class, com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteGroupId_ = ""; + + token_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupJoinByTokenProto.internal_static_site_ApiGroupJoinByTokenRequest_descriptor; + } + + public com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest build() { + com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest buildPartial() { + com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest result = new com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest(this); + result.siteGroupId_ = siteGroupId_; + result.token_ = token_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest) { + return mergeFrom((com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest other) { + if (other == com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest.getDefaultInstance()) return this; + if (!other.getSiteGroupId().isEmpty()) { + siteGroupId_ = other.siteGroupId_; + onChanged(); + } + if (!other.getToken().isEmpty()) { + token_ = other.token_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteGroupId_ = ""; + /** + *
+       *群组id
+       * 
+ * + * string site_group_id = 1; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *群组id
+       * 
+ * + * string site_group_id = 1; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *群组id
+       * 
+ * + * string site_group_id = 1; + */ + public Builder setSiteGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteGroupId_ = value; + onChanged(); + return this; + } + /** + *
+       *群组id
+       * 
+ * + * string site_group_id = 1; + */ + public Builder clearSiteGroupId() { + + siteGroupId_ = getDefaultInstance().getSiteGroupId(); + onChanged(); + return this; + } + /** + *
+       *群组id
+       * 
+ * + * string site_group_id = 1; + */ + public Builder setSiteGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteGroupId_ = value; + onChanged(); + return this; + } + + private java.lang.Object token_ = ""; + /** + *
+       *群token
+       * 
+ * + * string token = 2; + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *群token
+       * 
+ * + * string token = 2; + */ + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *群token
+       * 
+ * + * string token = 2; + */ + public Builder setToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + token_ = value; + onChanged(); + return this; + } + /** + *
+       *群token
+       * 
+ * + * string token = 2; + */ + public Builder clearToken() { + + token_ = getDefaultInstance().getToken(); + onChanged(); + return this; + } + /** + *
+       *群token
+       * 
+ * + * string token = 2; + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + token_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupJoinByTokenRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupJoinByTokenRequest) + private static final com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest(); + } + + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupJoinByTokenRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupJoinByTokenRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiGroupJoinByTokenResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupJoinByTokenResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiGroupJoinByTokenResponse} + */ + public static final class ApiGroupJoinByTokenResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupJoinByTokenResponse) + ApiGroupJoinByTokenResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupJoinByTokenResponse.newBuilder() to construct. + private ApiGroupJoinByTokenResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupJoinByTokenResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupJoinByTokenResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupJoinByTokenProto.internal_static_site_ApiGroupJoinByTokenResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupJoinByTokenProto.internal_static_site_ApiGroupJoinByTokenResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse.class, com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse other = (com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupJoinByTokenResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupJoinByTokenResponse) + com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupJoinByTokenProto.internal_static_site_ApiGroupJoinByTokenResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupJoinByTokenProto.internal_static_site_ApiGroupJoinByTokenResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse.class, com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupJoinByTokenProto.internal_static_site_ApiGroupJoinByTokenResponse_descriptor; + } + + public com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse build() { + com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse buildPartial() { + com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse result = new com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse) { + return mergeFrom((com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse other) { + if (other == com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupJoinByTokenResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupJoinByTokenResponse) + private static final com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse(); + } + + public static com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupJoinByTokenResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupJoinByTokenResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupJoinByTokenProto.ApiGroupJoinByTokenResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupJoinByTokenRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupJoinByTokenRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupJoinByTokenResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupJoinByTokenResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n site/api_group_joinByToken.proto\022\004site" + + "\032\020core/group.proto\"B\n\032ApiGroupJoinByToke" + + "nRequest\022\025\n\rsite_group_id\030\001 \001(\t\022\r\n\005token" + + "\030\002 \001(\t\"\035\n\033ApiGroupJoinByTokenResponse2p\n" + + "\032ApiGroupJoinByTokenService\022R\n\013joinByTok" + + "en\022 .site.ApiGroupJoinByTokenRequest\032!.s" + + "ite.ApiGroupJoinByTokenResponseB1\n\025com.a" + + "kaxin.proto.siteB\030ApiGroupJoinByTokenPro" + + "tob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.GroupProto.getDescriptor(), + }, assigner); + internal_static_site_ApiGroupJoinByTokenRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiGroupJoinByTokenRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupJoinByTokenRequest_descriptor, + new java.lang.String[] { "SiteGroupId", "Token", }); + internal_static_site_ApiGroupJoinByTokenResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiGroupJoinByTokenResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupJoinByTokenResponse_descriptor, + new java.lang.String[] { }); + com.akaxin.proto.core.GroupProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupListProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupListProto.java new file mode 100755 index 0000000..573e028 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupListProto.java @@ -0,0 +1,1671 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_group_list.proto + +package com.akaxin.proto.site; + +public final class ApiGroupListProto { + private ApiGroupListProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiGroupListRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupListRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *获取列表的用户
+     * 
+ * + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + *
+     *获取列表的用户
+     * 
+ * + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *第几页
+     * 
+ * + * int32 page_number = 2; + */ + int getPageNumber(); + + /** + *
+     *最大只支持200,每页的条数
+     * 
+ * + * int32 page_size = 3; + */ + int getPageSize(); + } + /** + * Protobuf type {@code site.ApiGroupListRequest} + */ + public static final class ApiGroupListRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupListRequest) + ApiGroupListRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupListRequest.newBuilder() to construct. + private ApiGroupListRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupListRequest() { + siteUserId_ = ""; + pageNumber_ = 0; + pageSize_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupListRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 16: { + + pageNumber_ = input.readInt32(); + break; + } + case 24: { + + pageSize_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupListProto.internal_static_site_ApiGroupListRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupListProto.internal_static_site_ApiGroupListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest.class, com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + *
+     *获取列表的用户
+     * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *获取列表的用户
+     * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_NUMBER_FIELD_NUMBER = 2; + private int pageNumber_; + /** + *
+     *第几页
+     * 
+ * + * int32 page_number = 2; + */ + public int getPageNumber() { + return pageNumber_; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + *
+     *最大只支持200,每页的条数
+     * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + if (pageNumber_ != 0) { + output.writeInt32(2, pageNumber_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + if (pageNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageNumber_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest other = (com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && (getPageNumber() + == other.getPageNumber()); + result = result && (getPageSize() + == other.getPageSize()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getPageNumber(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupListRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupListRequest) + com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupListProto.internal_static_site_ApiGroupListRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupListProto.internal_static_site_ApiGroupListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest.class, com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + pageNumber_ = 0; + + pageSize_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupListProto.internal_static_site_ApiGroupListRequest_descriptor; + } + + public com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest build() { + com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest buildPartial() { + com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest result = new com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest(this); + result.siteUserId_ = siteUserId_; + result.pageNumber_ = pageNumber_; + result.pageSize_ = pageSize_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest) { + return mergeFrom((com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest other) { + if (other == com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (other.getPageNumber() != 0) { + setPageNumber(other.getPageNumber()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *获取列表的用户
+       * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *获取列表的用户
+       * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *获取列表的用户
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *获取列表的用户
+       * 
+ * + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *获取列表的用户
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private int pageNumber_ ; + /** + *
+       *第几页
+       * 
+ * + * int32 page_number = 2; + */ + public int getPageNumber() { + return pageNumber_; + } + /** + *
+       *第几页
+       * 
+ * + * int32 page_number = 2; + */ + public Builder setPageNumber(int value) { + + pageNumber_ = value; + onChanged(); + return this; + } + /** + *
+       *第几页
+       * 
+ * + * int32 page_number = 2; + */ + public Builder clearPageNumber() { + + pageNumber_ = 0; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+       *最大只支持200,每页的条数
+       * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + /** + *
+       *最大只支持200,每页的条数
+       * 
+ * + * int32 page_size = 3; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+       *最大只支持200,每页的条数
+       * 
+ * + * int32 page_size = 3; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupListRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupListRequest) + private static final com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest(); + } + + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupListRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupListRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupListProto.ApiGroupListRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiGroupListResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupListResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + java.util.List + getListList(); + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + com.akaxin.proto.core.GroupProto.SimpleGroupProfile getList(int index); + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + int getListCount(); + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + java.util.List + getListOrBuilderList(); + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + com.akaxin.proto.core.GroupProto.SimpleGroupProfileOrBuilder getListOrBuilder( + int index); + } + /** + * Protobuf type {@code site.ApiGroupListResponse} + */ + public static final class ApiGroupListResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupListResponse) + ApiGroupListResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupListResponse.newBuilder() to construct. + private ApiGroupListResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupListResponse() { + list_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupListResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + list_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + list_.add( + input.readMessage(com.akaxin.proto.core.GroupProto.SimpleGroupProfile.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + list_ = java.util.Collections.unmodifiableList(list_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupListProto.internal_static_site_ApiGroupListResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupListProto.internal_static_site_ApiGroupListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse.class, com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse.Builder.class); + } + + public static final int LIST_FIELD_NUMBER = 1; + private java.util.List list_; + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public java.util.List getListList() { + return list_; + } + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public java.util.List + getListOrBuilderList() { + return list_; + } + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public int getListCount() { + return list_.size(); + } + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public com.akaxin.proto.core.GroupProto.SimpleGroupProfile getList(int index) { + return list_.get(index); + } + /** + *
+     *用户的群列表
+     * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public com.akaxin.proto.core.GroupProto.SimpleGroupProfileOrBuilder getListOrBuilder( + int index) { + return list_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < list_.size(); i++) { + output.writeMessage(1, list_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < list_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, list_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse other = (com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse) obj; + + boolean result = true; + result = result && getListList() + .equals(other.getListList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getListCount() > 0) { + hash = (37 * hash) + LIST_FIELD_NUMBER; + hash = (53 * hash) + getListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupListResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupListResponse) + com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupListProto.internal_static_site_ApiGroupListResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupListProto.internal_static_site_ApiGroupListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse.class, com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getListFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (listBuilder_ == null) { + list_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + listBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupListProto.internal_static_site_ApiGroupListResponse_descriptor; + } + + public com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse build() { + com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse buildPartial() { + com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse result = new com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse(this); + int from_bitField0_ = bitField0_; + if (listBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + list_ = java.util.Collections.unmodifiableList(list_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.list_ = list_; + } else { + result.list_ = listBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse) { + return mergeFrom((com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse other) { + if (other == com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse.getDefaultInstance()) return this; + if (listBuilder_ == null) { + if (!other.list_.isEmpty()) { + if (list_.isEmpty()) { + list_ = other.list_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureListIsMutable(); + list_.addAll(other.list_); + } + onChanged(); + } + } else { + if (!other.list_.isEmpty()) { + if (listBuilder_.isEmpty()) { + listBuilder_.dispose(); + listBuilder_ = null; + list_ = other.list_; + bitField0_ = (bitField0_ & ~0x00000001); + listBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getListFieldBuilder() : null; + } else { + listBuilder_.addAllMessages(other.list_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List list_ = + java.util.Collections.emptyList(); + private void ensureListIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + list_ = new java.util.ArrayList(list_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.SimpleGroupProfile, com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder, com.akaxin.proto.core.GroupProto.SimpleGroupProfileOrBuilder> listBuilder_; + + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public java.util.List getListList() { + if (listBuilder_ == null) { + return java.util.Collections.unmodifiableList(list_); + } else { + return listBuilder_.getMessageList(); + } + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public int getListCount() { + if (listBuilder_ == null) { + return list_.size(); + } else { + return listBuilder_.getCount(); + } + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public com.akaxin.proto.core.GroupProto.SimpleGroupProfile getList(int index) { + if (listBuilder_ == null) { + return list_.get(index); + } else { + return listBuilder_.getMessage(index); + } + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public Builder setList( + int index, com.akaxin.proto.core.GroupProto.SimpleGroupProfile value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.set(index, value); + onChanged(); + } else { + listBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public Builder setList( + int index, com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.set(index, builderForValue.build()); + onChanged(); + } else { + listBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public Builder addList(com.akaxin.proto.core.GroupProto.SimpleGroupProfile value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.add(value); + onChanged(); + } else { + listBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public Builder addList( + int index, com.akaxin.proto.core.GroupProto.SimpleGroupProfile value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.add(index, value); + onChanged(); + } else { + listBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public Builder addList( + com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.add(builderForValue.build()); + onChanged(); + } else { + listBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public Builder addList( + int index, com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.add(index, builderForValue.build()); + onChanged(); + } else { + listBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public Builder addAllList( + java.lang.Iterable values) { + if (listBuilder_ == null) { + ensureListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, list_); + onChanged(); + } else { + listBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public Builder clearList() { + if (listBuilder_ == null) { + list_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + listBuilder_.clear(); + } + return this; + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public Builder removeList(int index) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.remove(index); + onChanged(); + } else { + listBuilder_.remove(index); + } + return this; + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder getListBuilder( + int index) { + return getListFieldBuilder().getBuilder(index); + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public com.akaxin.proto.core.GroupProto.SimpleGroupProfileOrBuilder getListOrBuilder( + int index) { + if (listBuilder_ == null) { + return list_.get(index); } else { + return listBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public java.util.List + getListOrBuilderList() { + if (listBuilder_ != null) { + return listBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(list_); + } + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder addListBuilder() { + return getListFieldBuilder().addBuilder( + com.akaxin.proto.core.GroupProto.SimpleGroupProfile.getDefaultInstance()); + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder addListBuilder( + int index) { + return getListFieldBuilder().addBuilder( + index, com.akaxin.proto.core.GroupProto.SimpleGroupProfile.getDefaultInstance()); + } + /** + *
+       *用户的群列表
+       * 
+ * + * repeated .core.SimpleGroupProfile list = 1; + */ + public java.util.List + getListBuilderList() { + return getListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.SimpleGroupProfile, com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder, com.akaxin.proto.core.GroupProto.SimpleGroupProfileOrBuilder> + getListFieldBuilder() { + if (listBuilder_ == null) { + listBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.SimpleGroupProfile, com.akaxin.proto.core.GroupProto.SimpleGroupProfile.Builder, com.akaxin.proto.core.GroupProto.SimpleGroupProfileOrBuilder>( + list_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + list_ = null; + } + return listBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupListResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupListResponse) + private static final com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse(); + } + + public static com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupListResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupListResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupListProto.ApiGroupListResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupListRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupListRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupListResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupListResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031site/api_group_list.proto\022\004site\032\020core/" + + "group.proto\"S\n\023ApiGroupListRequest\022\024\n\014si" + + "te_user_id\030\001 \001(\t\022\023\n\013page_number\030\002 \001(\005\022\021\n" + + "\tpage_size\030\003 \001(\005\">\n\024ApiGroupListResponse" + + "\022&\n\004list\030\001 \003(\0132\030.core.SimpleGroupProfile" + + "2T\n\023ApiGroupListService\022=\n\004list\022\031.site.A" + + "piGroupListRequest\032\032.site.ApiGroupListRe" + + "sponseB*\n\025com.akaxin.proto.siteB\021ApiGrou" + + "pListProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.GroupProto.getDescriptor(), + }, assigner); + internal_static_site_ApiGroupListRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiGroupListRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupListRequest_descriptor, + new java.lang.String[] { "SiteUserId", "PageNumber", "PageSize", }); + internal_static_site_ApiGroupListResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiGroupListResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupListResponse_descriptor, + new java.lang.String[] { "List", }); + com.akaxin.proto.core.GroupProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupMembersProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupMembersProto.java new file mode 100755 index 0000000..4dd1c3b --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupMembersProto.java @@ -0,0 +1,1504 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_group_members.proto + +package com.akaxin.proto.site; + +public final class ApiGroupMembersProto { + private ApiGroupMembersProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiGroupMembersRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupMembersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + java.lang.String getGroupId(); + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + } + /** + * Protobuf type {@code site.ApiGroupMembersRequest} + */ + public static final class ApiGroupMembersRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupMembersRequest) + ApiGroupMembersRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupMembersRequest.newBuilder() to construct. + private ApiGroupMembersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupMembersRequest() { + groupId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupMembersRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + groupId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupMembersProto.internal_static_site_ApiGroupMembersRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupMembersProto.internal_static_site_ApiGroupMembersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest.class, com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object groupId_; + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest other = (com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest) obj; + + boolean result = true; + result = result && getGroupId() + .equals(other.getGroupId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupMembersRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupMembersRequest) + com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupMembersProto.internal_static_site_ApiGroupMembersRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupMembersProto.internal_static_site_ApiGroupMembersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest.class, com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + groupId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupMembersProto.internal_static_site_ApiGroupMembersRequest_descriptor; + } + + public com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest build() { + com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest buildPartial() { + com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest result = new com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest(this); + result.groupId_ = groupId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest) { + return mergeFrom((com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest other) { + if (other == com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object groupId_ = ""; + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupId_ = value; + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder clearGroupId() { + + groupId_ = getDefaultInstance().getGroupId(); + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupMembersRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupMembersRequest) + private static final com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest(); + } + + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupMembersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupMembersRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiGroupMembersResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupMembersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + java.util.List + getListList(); + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + com.akaxin.proto.core.GroupProto.GroupMemberProfile getList(int index); + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + int getListCount(); + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + java.util.List + getListOrBuilderList(); + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder getListOrBuilder( + int index); + } + /** + * Protobuf type {@code site.ApiGroupMembersResponse} + */ + public static final class ApiGroupMembersResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupMembersResponse) + ApiGroupMembersResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupMembersResponse.newBuilder() to construct. + private ApiGroupMembersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupMembersResponse() { + list_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupMembersResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + list_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + list_.add( + input.readMessage(com.akaxin.proto.core.GroupProto.GroupMemberProfile.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + list_ = java.util.Collections.unmodifiableList(list_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupMembersProto.internal_static_site_ApiGroupMembersResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupMembersProto.internal_static_site_ApiGroupMembersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse.class, com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse.Builder.class); + } + + public static final int LIST_FIELD_NUMBER = 1; + private java.util.List list_; + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public java.util.List getListList() { + return list_; + } + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public java.util.List + getListOrBuilderList() { + return list_; + } + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public int getListCount() { + return list_.size(); + } + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile getList(int index) { + return list_.get(index); + } + /** + *
+     *群组成员信息
+     * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder getListOrBuilder( + int index) { + return list_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < list_.size(); i++) { + output.writeMessage(1, list_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < list_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, list_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse other = (com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse) obj; + + boolean result = true; + result = result && getListList() + .equals(other.getListList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getListCount() > 0) { + hash = (37 * hash) + LIST_FIELD_NUMBER; + hash = (53 * hash) + getListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupMembersResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupMembersResponse) + com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupMembersProto.internal_static_site_ApiGroupMembersResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupMembersProto.internal_static_site_ApiGroupMembersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse.class, com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getListFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (listBuilder_ == null) { + list_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + listBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupMembersProto.internal_static_site_ApiGroupMembersResponse_descriptor; + } + + public com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse build() { + com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse buildPartial() { + com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse result = new com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse(this); + int from_bitField0_ = bitField0_; + if (listBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + list_ = java.util.Collections.unmodifiableList(list_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.list_ = list_; + } else { + result.list_ = listBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse) { + return mergeFrom((com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse other) { + if (other == com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse.getDefaultInstance()) return this; + if (listBuilder_ == null) { + if (!other.list_.isEmpty()) { + if (list_.isEmpty()) { + list_ = other.list_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureListIsMutable(); + list_.addAll(other.list_); + } + onChanged(); + } + } else { + if (!other.list_.isEmpty()) { + if (listBuilder_.isEmpty()) { + listBuilder_.dispose(); + listBuilder_ = null; + list_ = other.list_; + bitField0_ = (bitField0_ & ~0x00000001); + listBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getListFieldBuilder() : null; + } else { + listBuilder_.addAllMessages(other.list_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List list_ = + java.util.Collections.emptyList(); + private void ensureListIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + list_ = new java.util.ArrayList(list_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupMemberProfile, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder, com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder> listBuilder_; + + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public java.util.List getListList() { + if (listBuilder_ == null) { + return java.util.Collections.unmodifiableList(list_); + } else { + return listBuilder_.getMessageList(); + } + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public int getListCount() { + if (listBuilder_ == null) { + return list_.size(); + } else { + return listBuilder_.getCount(); + } + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile getList(int index) { + if (listBuilder_ == null) { + return list_.get(index); + } else { + return listBuilder_.getMessage(index); + } + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public Builder setList( + int index, com.akaxin.proto.core.GroupProto.GroupMemberProfile value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.set(index, value); + onChanged(); + } else { + listBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public Builder setList( + int index, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.set(index, builderForValue.build()); + onChanged(); + } else { + listBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public Builder addList(com.akaxin.proto.core.GroupProto.GroupMemberProfile value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.add(value); + onChanged(); + } else { + listBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public Builder addList( + int index, com.akaxin.proto.core.GroupProto.GroupMemberProfile value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListIsMutable(); + list_.add(index, value); + onChanged(); + } else { + listBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public Builder addList( + com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.add(builderForValue.build()); + onChanged(); + } else { + listBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public Builder addList( + int index, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder builderForValue) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.add(index, builderForValue.build()); + onChanged(); + } else { + listBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public Builder addAllList( + java.lang.Iterable values) { + if (listBuilder_ == null) { + ensureListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, list_); + onChanged(); + } else { + listBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public Builder clearList() { + if (listBuilder_ == null) { + list_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + listBuilder_.clear(); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public Builder removeList(int index) { + if (listBuilder_ == null) { + ensureListIsMutable(); + list_.remove(index); + onChanged(); + } else { + listBuilder_.remove(index); + } + return this; + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder getListBuilder( + int index) { + return getListFieldBuilder().getBuilder(index); + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder getListOrBuilder( + int index) { + if (listBuilder_ == null) { + return list_.get(index); } else { + return listBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public java.util.List + getListOrBuilderList() { + if (listBuilder_ != null) { + return listBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(list_); + } + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder addListBuilder() { + return getListFieldBuilder().addBuilder( + com.akaxin.proto.core.GroupProto.GroupMemberProfile.getDefaultInstance()); + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder addListBuilder( + int index) { + return getListFieldBuilder().addBuilder( + index, com.akaxin.proto.core.GroupProto.GroupMemberProfile.getDefaultInstance()); + } + /** + *
+       *群组成员信息
+       * 
+ * + * repeated .core.GroupMemberProfile list = 1; + */ + public java.util.List + getListBuilderList() { + return getListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupMemberProfile, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder, com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder> + getListFieldBuilder() { + if (listBuilder_ == null) { + listBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupMemberProfile, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder, com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder>( + list_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + list_ = null; + } + return listBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupMembersResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupMembersResponse) + private static final com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse(); + } + + public static com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupMembersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupMembersResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupMembersProto.ApiGroupMembersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupMembersRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupMembersRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupMembersResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupMembersResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034site/api_group_members.proto\022\004site\032\020co" + + "re/group.proto\"*\n\026ApiGroupMembersRequest" + + "\022\020\n\010group_id\030\001 \001(\t\"A\n\027ApiGroupMembersRes" + + "ponse\022&\n\004list\030\001 \003(\0132\030.core.GroupMemberPr" + + "ofile2`\n\026ApiGroupMembersService\022F\n\007membe" + + "rs\022\034.site.ApiGroupMembersRequest\032\035.site." + + "ApiGroupMembersResponseB-\n\025com.akaxin.pr" + + "oto.siteB\024ApiGroupMembersProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.GroupProto.getDescriptor(), + }, assigner); + internal_static_site_ApiGroupMembersRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiGroupMembersRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupMembersRequest_descriptor, + new java.lang.String[] { "GroupId", }); + internal_static_site_ApiGroupMembersResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiGroupMembersResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupMembersResponse_descriptor, + new java.lang.String[] { "List", }); + com.akaxin.proto.core.GroupProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupMuteProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupMuteProto.java new file mode 100755 index 0000000..cfb2cd5 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupMuteProto.java @@ -0,0 +1,1104 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_group_mute.proto + +package com.akaxin.proto.site; + +public final class ApiGroupMuteProto { + private ApiGroupMuteProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiGroupMuteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupMuteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *当前用户获取群组ID的资料信息
+     * 
+ * + * string site_group_id = 1; + */ + java.lang.String getSiteGroupId(); + /** + *
+     *当前用户获取群组ID的资料信息
+     * 
+ * + * string site_group_id = 1; + */ + com.google.protobuf.ByteString + getSiteGroupIdBytes(); + } + /** + * Protobuf type {@code site.ApiGroupMuteRequest} + */ + public static final class ApiGroupMuteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupMuteRequest) + ApiGroupMuteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupMuteRequest.newBuilder() to construct. + private ApiGroupMuteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupMuteRequest() { + siteGroupId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupMuteRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteGroupId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupMuteProto.internal_static_site_ApiGroupMuteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupMuteProto.internal_static_site_ApiGroupMuteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest.class, com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest.Builder.class); + } + + public static final int SITE_GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteGroupId_; + /** + *
+     *当前用户获取群组ID的资料信息
+     * 
+ * + * string site_group_id = 1; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } + } + /** + *
+     *当前用户获取群组ID的资料信息
+     * 
+ * + * string site_group_id = 1; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteGroupId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteGroupId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest other = (com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest) obj; + + boolean result = true; + result = result && getSiteGroupId() + .equals(other.getSiteGroupId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteGroupId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupMuteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupMuteRequest) + com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupMuteProto.internal_static_site_ApiGroupMuteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupMuteProto.internal_static_site_ApiGroupMuteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest.class, com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteGroupId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupMuteProto.internal_static_site_ApiGroupMuteRequest_descriptor; + } + + public com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest build() { + com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest buildPartial() { + com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest result = new com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest(this); + result.siteGroupId_ = siteGroupId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest) { + return mergeFrom((com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest other) { + if (other == com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest.getDefaultInstance()) return this; + if (!other.getSiteGroupId().isEmpty()) { + siteGroupId_ = other.siteGroupId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteGroupId_ = ""; + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string site_group_id = 1; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string site_group_id = 1; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string site_group_id = 1; + */ + public Builder setSiteGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteGroupId_ = value; + onChanged(); + return this; + } + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string site_group_id = 1; + */ + public Builder clearSiteGroupId() { + + siteGroupId_ = getDefaultInstance().getSiteGroupId(); + onChanged(); + return this; + } + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string site_group_id = 1; + */ + public Builder setSiteGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteGroupId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupMuteRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupMuteRequest) + private static final com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest(); + } + + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupMuteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupMuteRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiGroupMuteResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupMuteResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *消息免打扰 mute notifications
+     * 
+ * + * bool mute = 1; + */ + boolean getMute(); + } + /** + * Protobuf type {@code site.ApiGroupMuteResponse} + */ + public static final class ApiGroupMuteResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupMuteResponse) + ApiGroupMuteResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupMuteResponse.newBuilder() to construct. + private ApiGroupMuteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupMuteResponse() { + mute_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupMuteResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + mute_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupMuteProto.internal_static_site_ApiGroupMuteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupMuteProto.internal_static_site_ApiGroupMuteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse.class, com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse.Builder.class); + } + + public static final int MUTE_FIELD_NUMBER = 1; + private boolean mute_; + /** + *
+     *消息免打扰 mute notifications
+     * 
+ * + * bool mute = 1; + */ + public boolean getMute() { + return mute_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (mute_ != false) { + output.writeBool(1, mute_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mute_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, mute_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse other = (com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse) obj; + + boolean result = true; + result = result && (getMute() + == other.getMute()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMute()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupMuteResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupMuteResponse) + com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupMuteProto.internal_static_site_ApiGroupMuteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupMuteProto.internal_static_site_ApiGroupMuteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse.class, com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + mute_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupMuteProto.internal_static_site_ApiGroupMuteResponse_descriptor; + } + + public com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse build() { + com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse buildPartial() { + com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse result = new com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse(this); + result.mute_ = mute_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse) { + return mergeFrom((com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse other) { + if (other == com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse.getDefaultInstance()) return this; + if (other.getMute() != false) { + setMute(other.getMute()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean mute_ ; + /** + *
+       *消息免打扰 mute notifications
+       * 
+ * + * bool mute = 1; + */ + public boolean getMute() { + return mute_; + } + /** + *
+       *消息免打扰 mute notifications
+       * 
+ * + * bool mute = 1; + */ + public Builder setMute(boolean value) { + + mute_ = value; + onChanged(); + return this; + } + /** + *
+       *消息免打扰 mute notifications
+       * 
+ * + * bool mute = 1; + */ + public Builder clearMute() { + + mute_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupMuteResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupMuteResponse) + private static final com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse(); + } + + public static com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupMuteResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupMuteResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupMuteProto.ApiGroupMuteResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupMuteRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupMuteRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupMuteResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupMuteResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031site/api_group_mute.proto\022\004site\",\n\023Api" + + "GroupMuteRequest\022\025\n\rsite_group_id\030\001 \001(\t\"" + + "$\n\024ApiGroupMuteResponse\022\014\n\004mute\030\001 \001(\0102T\n" + + "\023ApiGroupMuteService\022=\n\004mute\022\031.site.ApiG" + + "roupMuteRequest\032\032.site.ApiGroupMuteRespo" + + "nseB*\n\025com.akaxin.proto.siteB\021ApiGroupMu" + + "teProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiGroupMuteRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiGroupMuteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupMuteRequest_descriptor, + new java.lang.String[] { "SiteGroupId", }); + internal_static_site_ApiGroupMuteResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiGroupMuteResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupMuteResponse_descriptor, + new java.lang.String[] { "Mute", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupNonMembersProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupNonMembersProto.java new file mode 100755 index 0000000..71fa3a9 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupNonMembersProto.java @@ -0,0 +1,1672 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_group_nonMembers.proto + +package com.akaxin.proto.site; + +public final class ApiGroupNonMembersProto { + private ApiGroupNonMembersProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiGroupNonMembersRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupNonMembersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + java.lang.String getGroupId(); + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+     *第几页
+     * 
+ * + * int32 page_number = 2; + */ + int getPageNumber(); + + /** + *
+     *每页的条数
+     * 
+ * + * int32 page_size = 3; + */ + int getPageSize(); + } + /** + * Protobuf type {@code site.ApiGroupNonMembersRequest} + */ + public static final class ApiGroupNonMembersRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupNonMembersRequest) + ApiGroupNonMembersRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupNonMembersRequest.newBuilder() to construct. + private ApiGroupNonMembersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupNonMembersRequest() { + groupId_ = ""; + pageNumber_ = 0; + pageSize_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupNonMembersRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + groupId_ = s; + break; + } + case 16: { + + pageNumber_ = input.readInt32(); + break; + } + case 24: { + + pageSize_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupNonMembersProto.internal_static_site_ApiGroupNonMembersRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupNonMembersProto.internal_static_site_ApiGroupNonMembersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest.class, com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object groupId_; + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_NUMBER_FIELD_NUMBER = 2; + private int pageNumber_; + /** + *
+     *第几页
+     * 
+ * + * int32 page_number = 2; + */ + public int getPageNumber() { + return pageNumber_; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + *
+     *每页的条数
+     * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupId_); + } + if (pageNumber_ != 0) { + output.writeInt32(2, pageNumber_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupId_); + } + if (pageNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageNumber_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest other = (com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest) obj; + + boolean result = true; + result = result && getGroupId() + .equals(other.getGroupId()); + result = result && (getPageNumber() + == other.getPageNumber()); + result = result && (getPageSize() + == other.getPageSize()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getPageNumber(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupNonMembersRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupNonMembersRequest) + com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupNonMembersProto.internal_static_site_ApiGroupNonMembersRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupNonMembersProto.internal_static_site_ApiGroupNonMembersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest.class, com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + groupId_ = ""; + + pageNumber_ = 0; + + pageSize_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupNonMembersProto.internal_static_site_ApiGroupNonMembersRequest_descriptor; + } + + public com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest build() { + com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest buildPartial() { + com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest result = new com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest(this); + result.groupId_ = groupId_; + result.pageNumber_ = pageNumber_; + result.pageSize_ = pageSize_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest) { + return mergeFrom((com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest other) { + if (other == com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + onChanged(); + } + if (other.getPageNumber() != 0) { + setPageNumber(other.getPageNumber()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object groupId_ = ""; + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupId_ = value; + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder clearGroupId() { + + groupId_ = getDefaultInstance().getGroupId(); + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupId_ = value; + onChanged(); + return this; + } + + private int pageNumber_ ; + /** + *
+       *第几页
+       * 
+ * + * int32 page_number = 2; + */ + public int getPageNumber() { + return pageNumber_; + } + /** + *
+       *第几页
+       * 
+ * + * int32 page_number = 2; + */ + public Builder setPageNumber(int value) { + + pageNumber_ = value; + onChanged(); + return this; + } + /** + *
+       *第几页
+       * 
+ * + * int32 page_number = 2; + */ + public Builder clearPageNumber() { + + pageNumber_ = 0; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+       *每页的条数
+       * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + /** + *
+       *每页的条数
+       * 
+ * + * int32 page_size = 3; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+       *每页的条数
+       * 
+ * + * int32 page_size = 3; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupNonMembersRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupNonMembersRequest) + private static final com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest(); + } + + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupNonMembersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupNonMembersRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiGroupNonMembersResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupNonMembersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组成员列表
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + java.util.List + getProfileList(); + /** + *
+     *群组成员列表
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + com.akaxin.proto.core.UserProto.SimpleUserProfile getProfile(int index); + /** + *
+     *群组成员列表
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + int getProfileCount(); + /** + *
+     *群组成员列表
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + java.util.List + getProfileOrBuilderList(); + /** + *
+     *群组成员列表
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder getProfileOrBuilder( + int index); + } + /** + * Protobuf type {@code site.ApiGroupNonMembersResponse} + */ + public static final class ApiGroupNonMembersResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupNonMembersResponse) + ApiGroupNonMembersResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupNonMembersResponse.newBuilder() to construct. + private ApiGroupNonMembersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupNonMembersResponse() { + profile_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupNonMembersResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + profile_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + profile_.add( + input.readMessage(com.akaxin.proto.core.UserProto.SimpleUserProfile.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + profile_ = java.util.Collections.unmodifiableList(profile_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupNonMembersProto.internal_static_site_ApiGroupNonMembersResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupNonMembersProto.internal_static_site_ApiGroupNonMembersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse.class, com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse.Builder.class); + } + + public static final int PROFILE_FIELD_NUMBER = 1; + private java.util.List profile_; + /** + *
+     *群组成员列表
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public java.util.List getProfileList() { + return profile_; + } + /** + *
+     *群组成员列表
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public java.util.List + getProfileOrBuilderList() { + return profile_; + } + /** + *
+     *群组成员列表
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public int getProfileCount() { + return profile_.size(); + } + /** + *
+     *群组成员列表
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile getProfile(int index) { + return profile_.get(index); + } + /** + *
+     *群组成员列表
+     * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder getProfileOrBuilder( + int index) { + return profile_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < profile_.size(); i++) { + output.writeMessage(1, profile_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < profile_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, profile_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse other = (com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse) obj; + + boolean result = true; + result = result && getProfileList() + .equals(other.getProfileList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProfileCount() > 0) { + hash = (37 * hash) + PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getProfileList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupNonMembersResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupNonMembersResponse) + com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupNonMembersProto.internal_static_site_ApiGroupNonMembersResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupNonMembersProto.internal_static_site_ApiGroupNonMembersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse.class, com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getProfileFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (profileBuilder_ == null) { + profile_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + profileBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupNonMembersProto.internal_static_site_ApiGroupNonMembersResponse_descriptor; + } + + public com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse build() { + com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse buildPartial() { + com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse result = new com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse(this); + int from_bitField0_ = bitField0_; + if (profileBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + profile_ = java.util.Collections.unmodifiableList(profile_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.profile_ = profile_; + } else { + result.profile_ = profileBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse) { + return mergeFrom((com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse other) { + if (other == com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse.getDefaultInstance()) return this; + if (profileBuilder_ == null) { + if (!other.profile_.isEmpty()) { + if (profile_.isEmpty()) { + profile_ = other.profile_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProfileIsMutable(); + profile_.addAll(other.profile_); + } + onChanged(); + } + } else { + if (!other.profile_.isEmpty()) { + if (profileBuilder_.isEmpty()) { + profileBuilder_.dispose(); + profileBuilder_ = null; + profile_ = other.profile_; + bitField0_ = (bitField0_ & ~0x00000001); + profileBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProfileFieldBuilder() : null; + } else { + profileBuilder_.addAllMessages(other.profile_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List profile_ = + java.util.Collections.emptyList(); + private void ensureProfileIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + profile_ = new java.util.ArrayList(profile_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.UserProto.SimpleUserProfile, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder, com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder> profileBuilder_; + + /** + *
+       *群组成员列表
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public java.util.List getProfileList() { + if (profileBuilder_ == null) { + return java.util.Collections.unmodifiableList(profile_); + } else { + return profileBuilder_.getMessageList(); + } + } + /** + *
+       *群组成员列表
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public int getProfileCount() { + if (profileBuilder_ == null) { + return profile_.size(); + } else { + return profileBuilder_.getCount(); + } + } + /** + *
+       *群组成员列表
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile getProfile(int index) { + if (profileBuilder_ == null) { + return profile_.get(index); + } else { + return profileBuilder_.getMessage(index); + } + } + /** + *
+       *群组成员列表
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public Builder setProfile( + int index, com.akaxin.proto.core.UserProto.SimpleUserProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProfileIsMutable(); + profile_.set(index, value); + onChanged(); + } else { + profileBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *群组成员列表
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public Builder setProfile( + int index, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + ensureProfileIsMutable(); + profile_.set(index, builderForValue.build()); + onChanged(); + } else { + profileBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *群组成员列表
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public Builder addProfile(com.akaxin.proto.core.UserProto.SimpleUserProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProfileIsMutable(); + profile_.add(value); + onChanged(); + } else { + profileBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *群组成员列表
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public Builder addProfile( + int index, com.akaxin.proto.core.UserProto.SimpleUserProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProfileIsMutable(); + profile_.add(index, value); + onChanged(); + } else { + profileBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *群组成员列表
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public Builder addProfile( + com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + ensureProfileIsMutable(); + profile_.add(builderForValue.build()); + onChanged(); + } else { + profileBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *群组成员列表
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public Builder addProfile( + int index, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + ensureProfileIsMutable(); + profile_.add(index, builderForValue.build()); + onChanged(); + } else { + profileBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *群组成员列表
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public Builder addAllProfile( + java.lang.Iterable values) { + if (profileBuilder_ == null) { + ensureProfileIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, profile_); + onChanged(); + } else { + profileBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *群组成员列表
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public Builder clearProfile() { + if (profileBuilder_ == null) { + profile_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + profileBuilder_.clear(); + } + return this; + } + /** + *
+       *群组成员列表
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public Builder removeProfile(int index) { + if (profileBuilder_ == null) { + ensureProfileIsMutable(); + profile_.remove(index); + onChanged(); + } else { + profileBuilder_.remove(index); + } + return this; + } + /** + *
+       *群组成员列表
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder getProfileBuilder( + int index) { + return getProfileFieldBuilder().getBuilder(index); + } + /** + *
+       *群组成员列表
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder getProfileOrBuilder( + int index) { + if (profileBuilder_ == null) { + return profile_.get(index); } else { + return profileBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *群组成员列表
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public java.util.List + getProfileOrBuilderList() { + if (profileBuilder_ != null) { + return profileBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(profile_); + } + } + /** + *
+       *群组成员列表
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder addProfileBuilder() { + return getProfileFieldBuilder().addBuilder( + com.akaxin.proto.core.UserProto.SimpleUserProfile.getDefaultInstance()); + } + /** + *
+       *群组成员列表
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder addProfileBuilder( + int index) { + return getProfileFieldBuilder().addBuilder( + index, com.akaxin.proto.core.UserProto.SimpleUserProfile.getDefaultInstance()); + } + /** + *
+       *群组成员列表
+       * 
+ * + * repeated .core.SimpleUserProfile profile = 1; + */ + public java.util.List + getProfileBuilderList() { + return getProfileFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.UserProto.SimpleUserProfile, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder, com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder> + getProfileFieldBuilder() { + if (profileBuilder_ == null) { + profileBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.UserProto.SimpleUserProfile, com.akaxin.proto.core.UserProto.SimpleUserProfile.Builder, com.akaxin.proto.core.UserProto.SimpleUserProfileOrBuilder>( + profile_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + profile_ = null; + } + return profileBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupNonMembersResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupNonMembersResponse) + private static final com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse(); + } + + public static com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupNonMembersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupNonMembersResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupNonMembersProto.ApiGroupNonMembersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupNonMembersRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupNonMembersRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupNonMembersResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupNonMembersResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\037site/api_group_nonMembers.proto\022\004site\032" + + "\017core/user.proto\"U\n\031ApiGroupNonMembersRe" + + "quest\022\020\n\010group_id\030\001 \001(\t\022\023\n\013page_number\030\002" + + " \001(\005\022\021\n\tpage_size\030\003 \001(\005\"F\n\032ApiGroupNonMe" + + "mbersResponse\022(\n\007profile\030\001 \003(\0132\027.core.Si" + + "mpleUserProfile2l\n\031ApiGroupNonMembersSer" + + "vice\022O\n\nnonMembers\022\037.site.ApiGroupNonMem" + + "bersRequest\032 .site.ApiGroupNonMembersRes" + + "ponseB0\n\025com.akaxin.proto.siteB\027ApiGroup" + + "NonMembersProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.UserProto.getDescriptor(), + }, assigner); + internal_static_site_ApiGroupNonMembersRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiGroupNonMembersRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupNonMembersRequest_descriptor, + new java.lang.String[] { "GroupId", "PageNumber", "PageSize", }); + internal_static_site_ApiGroupNonMembersResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiGroupNonMembersResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupNonMembersResponse_descriptor, + new java.lang.String[] { "Profile", }); + com.akaxin.proto.core.UserProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupProfileProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupProfileProto.java new file mode 100755 index 0000000..134c461 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupProfileProto.java @@ -0,0 +1,2189 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_group_profile.proto + +package com.akaxin.proto.site; + +public final class ApiGroupProfileProto { + private ApiGroupProfileProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiGroupProfileRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupProfileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *当前用户获取群组ID的资料信息
+     * 
+ * + * string group_id = 1; + */ + java.lang.String getGroupId(); + /** + *
+     *当前用户获取群组ID的资料信息
+     * 
+ * + * string group_id = 1; + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + } + /** + * Protobuf type {@code site.ApiGroupProfileRequest} + */ + public static final class ApiGroupProfileRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupProfileRequest) + ApiGroupProfileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupProfileRequest.newBuilder() to construct. + private ApiGroupProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupProfileRequest() { + groupId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupProfileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + groupId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupProfileProto.internal_static_site_ApiGroupProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupProfileProto.internal_static_site_ApiGroupProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest.class, com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object groupId_; + /** + *
+     *当前用户获取群组ID的资料信息
+     * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+     *当前用户获取群组ID的资料信息
+     * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest other = (com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest) obj; + + boolean result = true; + result = result && getGroupId() + .equals(other.getGroupId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupProfileRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupProfileRequest) + com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupProfileProto.internal_static_site_ApiGroupProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupProfileProto.internal_static_site_ApiGroupProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest.class, com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + groupId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupProfileProto.internal_static_site_ApiGroupProfileRequest_descriptor; + } + + public com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest build() { + com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest buildPartial() { + com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest result = new com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest(this); + result.groupId_ = groupId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest) { + return mergeFrom((com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest other) { + if (other == com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object groupId_ = ""; + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupId_ = value; + onChanged(); + return this; + } + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string group_id = 1; + */ + public Builder clearGroupId() { + + groupId_ = getDefaultInstance().getGroupId(); + onChanged(); + return this; + } + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupProfileRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupProfileRequest) + private static final com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest(); + } + + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupProfileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupProfileRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiGroupProfileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupProfileResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组资料页信息
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + boolean hasProfile(); + /** + *
+     *群组资料页信息
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + com.akaxin.proto.core.GroupProto.GroupProfile getProfile(); + /** + *
+     *群组资料页信息
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder getProfileOrBuilder(); + + /** + *
+     *群组创建者信息
+     * 
+ * + * .core.UserProfile owner = 2; + */ + boolean hasOwner(); + /** + *
+     *群组创建者信息
+     * 
+ * + * .core.UserProfile owner = 2; + */ + com.akaxin.proto.core.UserProto.UserProfile getOwner(); + /** + *
+     *群组创建者信息
+     * 
+ * + * .core.UserProfile owner = 2; + */ + com.akaxin.proto.core.UserProto.UserProfileOrBuilder getOwnerOrBuilder(); + + /** + *
+     *群组的成员数量
+     * 
+ * + * int32 group_member_count = 3; + */ + int getGroupMemberCount(); + + /** + *
+     *群成员
+     * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + java.util.List + getGroupLastestMemberList(); + /** + *
+     *群成员
+     * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + com.akaxin.proto.core.GroupProto.GroupMemberProfile getGroupLastestMember(int index); + /** + *
+     *群成员
+     * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + int getGroupLastestMemberCount(); + /** + *
+     *群成员
+     * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + java.util.List + getGroupLastestMemberOrBuilderList(); + /** + *
+     *群成员
+     * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder getGroupLastestMemberOrBuilder( + int index); + + /** + *
+     *关闭邀请新用户群聊 true:打开  false:关闭
+     * 
+ * + * bool close_invite_group_chat = 5; + */ + boolean getCloseInviteGroupChat(); + } + /** + * Protobuf type {@code site.ApiGroupProfileResponse} + */ + public static final class ApiGroupProfileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupProfileResponse) + ApiGroupProfileResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupProfileResponse.newBuilder() to construct. + private ApiGroupProfileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupProfileResponse() { + groupMemberCount_ = 0; + groupLastestMember_ = java.util.Collections.emptyList(); + closeInviteGroupChat_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupProfileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.GroupProto.GroupProfile.Builder subBuilder = null; + if (profile_ != null) { + subBuilder = profile_.toBuilder(); + } + profile_ = input.readMessage(com.akaxin.proto.core.GroupProto.GroupProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(profile_); + profile_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.akaxin.proto.core.UserProto.UserProfile.Builder subBuilder = null; + if (owner_ != null) { + subBuilder = owner_.toBuilder(); + } + owner_ = input.readMessage(com.akaxin.proto.core.UserProto.UserProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(owner_); + owner_ = subBuilder.buildPartial(); + } + + break; + } + case 24: { + + groupMemberCount_ = input.readInt32(); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + groupLastestMember_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + groupLastestMember_.add( + input.readMessage(com.akaxin.proto.core.GroupProto.GroupMemberProfile.parser(), extensionRegistry)); + break; + } + case 40: { + + closeInviteGroupChat_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + groupLastestMember_ = java.util.Collections.unmodifiableList(groupLastestMember_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupProfileProto.internal_static_site_ApiGroupProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupProfileProto.internal_static_site_ApiGroupProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse.class, com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse.Builder.class); + } + + private int bitField0_; + public static final int PROFILE_FIELD_NUMBER = 1; + private com.akaxin.proto.core.GroupProto.GroupProfile profile_; + /** + *
+     *群组资料页信息
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + public boolean hasProfile() { + return profile_ != null; + } + /** + *
+     *群组资料页信息
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile getProfile() { + return profile_ == null ? com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance() : profile_; + } + /** + *
+     *群组资料页信息
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder getProfileOrBuilder() { + return getProfile(); + } + + public static final int OWNER_FIELD_NUMBER = 2; + private com.akaxin.proto.core.UserProto.UserProfile owner_; + /** + *
+     *群组创建者信息
+     * 
+ * + * .core.UserProfile owner = 2; + */ + public boolean hasOwner() { + return owner_ != null; + } + /** + *
+     *群组创建者信息
+     * 
+ * + * .core.UserProfile owner = 2; + */ + public com.akaxin.proto.core.UserProto.UserProfile getOwner() { + return owner_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : owner_; + } + /** + *
+     *群组创建者信息
+     * 
+ * + * .core.UserProfile owner = 2; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getOwnerOrBuilder() { + return getOwner(); + } + + public static final int GROUP_MEMBER_COUNT_FIELD_NUMBER = 3; + private int groupMemberCount_; + /** + *
+     *群组的成员数量
+     * 
+ * + * int32 group_member_count = 3; + */ + public int getGroupMemberCount() { + return groupMemberCount_; + } + + public static final int GROUP_LASTEST_MEMBER_FIELD_NUMBER = 4; + private java.util.List groupLastestMember_; + /** + *
+     *群成员
+     * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public java.util.List getGroupLastestMemberList() { + return groupLastestMember_; + } + /** + *
+     *群成员
+     * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public java.util.List + getGroupLastestMemberOrBuilderList() { + return groupLastestMember_; + } + /** + *
+     *群成员
+     * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public int getGroupLastestMemberCount() { + return groupLastestMember_.size(); + } + /** + *
+     *群成员
+     * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile getGroupLastestMember(int index) { + return groupLastestMember_.get(index); + } + /** + *
+     *群成员
+     * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder getGroupLastestMemberOrBuilder( + int index) { + return groupLastestMember_.get(index); + } + + public static final int CLOSE_INVITE_GROUP_CHAT_FIELD_NUMBER = 5; + private boolean closeInviteGroupChat_; + /** + *
+     *关闭邀请新用户群聊 true:打开  false:关闭
+     * 
+ * + * bool close_invite_group_chat = 5; + */ + public boolean getCloseInviteGroupChat() { + return closeInviteGroupChat_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (profile_ != null) { + output.writeMessage(1, getProfile()); + } + if (owner_ != null) { + output.writeMessage(2, getOwner()); + } + if (groupMemberCount_ != 0) { + output.writeInt32(3, groupMemberCount_); + } + for (int i = 0; i < groupLastestMember_.size(); i++) { + output.writeMessage(4, groupLastestMember_.get(i)); + } + if (closeInviteGroupChat_ != false) { + output.writeBool(5, closeInviteGroupChat_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (profile_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProfile()); + } + if (owner_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getOwner()); + } + if (groupMemberCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, groupMemberCount_); + } + for (int i = 0; i < groupLastestMember_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, groupLastestMember_.get(i)); + } + if (closeInviteGroupChat_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, closeInviteGroupChat_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse other = (com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse) obj; + + boolean result = true; + result = result && (hasProfile() == other.hasProfile()); + if (hasProfile()) { + result = result && getProfile() + .equals(other.getProfile()); + } + result = result && (hasOwner() == other.hasOwner()); + if (hasOwner()) { + result = result && getOwner() + .equals(other.getOwner()); + } + result = result && (getGroupMemberCount() + == other.getGroupMemberCount()); + result = result && getGroupLastestMemberList() + .equals(other.getGroupLastestMemberList()); + result = result && (getCloseInviteGroupChat() + == other.getCloseInviteGroupChat()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProfile()) { + hash = (37 * hash) + PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getProfile().hashCode(); + } + if (hasOwner()) { + hash = (37 * hash) + OWNER_FIELD_NUMBER; + hash = (53 * hash) + getOwner().hashCode(); + } + hash = (37 * hash) + GROUP_MEMBER_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getGroupMemberCount(); + if (getGroupLastestMemberCount() > 0) { + hash = (37 * hash) + GROUP_LASTEST_MEMBER_FIELD_NUMBER; + hash = (53 * hash) + getGroupLastestMemberList().hashCode(); + } + hash = (37 * hash) + CLOSE_INVITE_GROUP_CHAT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCloseInviteGroupChat()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupProfileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupProfileResponse) + com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupProfileProto.internal_static_site_ApiGroupProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupProfileProto.internal_static_site_ApiGroupProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse.class, com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getGroupLastestMemberFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (profileBuilder_ == null) { + profile_ = null; + } else { + profile_ = null; + profileBuilder_ = null; + } + if (ownerBuilder_ == null) { + owner_ = null; + } else { + owner_ = null; + ownerBuilder_ = null; + } + groupMemberCount_ = 0; + + if (groupLastestMemberBuilder_ == null) { + groupLastestMember_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + groupLastestMemberBuilder_.clear(); + } + closeInviteGroupChat_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupProfileProto.internal_static_site_ApiGroupProfileResponse_descriptor; + } + + public com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse build() { + com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse buildPartial() { + com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse result = new com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (profileBuilder_ == null) { + result.profile_ = profile_; + } else { + result.profile_ = profileBuilder_.build(); + } + if (ownerBuilder_ == null) { + result.owner_ = owner_; + } else { + result.owner_ = ownerBuilder_.build(); + } + result.groupMemberCount_ = groupMemberCount_; + if (groupLastestMemberBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + groupLastestMember_ = java.util.Collections.unmodifiableList(groupLastestMember_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.groupLastestMember_ = groupLastestMember_; + } else { + result.groupLastestMember_ = groupLastestMemberBuilder_.build(); + } + result.closeInviteGroupChat_ = closeInviteGroupChat_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse) { + return mergeFrom((com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse other) { + if (other == com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse.getDefaultInstance()) return this; + if (other.hasProfile()) { + mergeProfile(other.getProfile()); + } + if (other.hasOwner()) { + mergeOwner(other.getOwner()); + } + if (other.getGroupMemberCount() != 0) { + setGroupMemberCount(other.getGroupMemberCount()); + } + if (groupLastestMemberBuilder_ == null) { + if (!other.groupLastestMember_.isEmpty()) { + if (groupLastestMember_.isEmpty()) { + groupLastestMember_ = other.groupLastestMember_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureGroupLastestMemberIsMutable(); + groupLastestMember_.addAll(other.groupLastestMember_); + } + onChanged(); + } + } else { + if (!other.groupLastestMember_.isEmpty()) { + if (groupLastestMemberBuilder_.isEmpty()) { + groupLastestMemberBuilder_.dispose(); + groupLastestMemberBuilder_ = null; + groupLastestMember_ = other.groupLastestMember_; + bitField0_ = (bitField0_ & ~0x00000008); + groupLastestMemberBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getGroupLastestMemberFieldBuilder() : null; + } else { + groupLastestMemberBuilder_.addAllMessages(other.groupLastestMember_); + } + } + } + if (other.getCloseInviteGroupChat() != false) { + setCloseInviteGroupChat(other.getCloseInviteGroupChat()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.akaxin.proto.core.GroupProto.GroupProfile profile_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupProfile, com.akaxin.proto.core.GroupProto.GroupProfile.Builder, com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder> profileBuilder_; + /** + *
+       *群组资料页信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public boolean hasProfile() { + return profileBuilder_ != null || profile_ != null; + } + /** + *
+       *群组资料页信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile getProfile() { + if (profileBuilder_ == null) { + return profile_ == null ? com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance() : profile_; + } else { + return profileBuilder_.getMessage(); + } + } + /** + *
+       *群组资料页信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public Builder setProfile(com.akaxin.proto.core.GroupProto.GroupProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profile_ = value; + onChanged(); + } else { + profileBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群组资料页信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public Builder setProfile( + com.akaxin.proto.core.GroupProto.GroupProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + profile_ = builderForValue.build(); + onChanged(); + } else { + profileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群组资料页信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public Builder mergeProfile(com.akaxin.proto.core.GroupProto.GroupProfile value) { + if (profileBuilder_ == null) { + if (profile_ != null) { + profile_ = + com.akaxin.proto.core.GroupProto.GroupProfile.newBuilder(profile_).mergeFrom(value).buildPartial(); + } else { + profile_ = value; + } + onChanged(); + } else { + profileBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群组资料页信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public Builder clearProfile() { + if (profileBuilder_ == null) { + profile_ = null; + onChanged(); + } else { + profile_ = null; + profileBuilder_ = null; + } + + return this; + } + /** + *
+       *群组资料页信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile.Builder getProfileBuilder() { + + onChanged(); + return getProfileFieldBuilder().getBuilder(); + } + /** + *
+       *群组资料页信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder getProfileOrBuilder() { + if (profileBuilder_ != null) { + return profileBuilder_.getMessageOrBuilder(); + } else { + return profile_ == null ? + com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance() : profile_; + } + } + /** + *
+       *群组资料页信息
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupProfile, com.akaxin.proto.core.GroupProto.GroupProfile.Builder, com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder> + getProfileFieldBuilder() { + if (profileBuilder_ == null) { + profileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupProfile, com.akaxin.proto.core.GroupProto.GroupProfile.Builder, com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder>( + getProfile(), + getParentForChildren(), + isClean()); + profile_ = null; + } + return profileBuilder_; + } + + private com.akaxin.proto.core.UserProto.UserProfile owner_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> ownerBuilder_; + /** + *
+       *群组创建者信息
+       * 
+ * + * .core.UserProfile owner = 2; + */ + public boolean hasOwner() { + return ownerBuilder_ != null || owner_ != null; + } + /** + *
+       *群组创建者信息
+       * 
+ * + * .core.UserProfile owner = 2; + */ + public com.akaxin.proto.core.UserProto.UserProfile getOwner() { + if (ownerBuilder_ == null) { + return owner_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : owner_; + } else { + return ownerBuilder_.getMessage(); + } + } + /** + *
+       *群组创建者信息
+       * 
+ * + * .core.UserProfile owner = 2; + */ + public Builder setOwner(com.akaxin.proto.core.UserProto.UserProfile value) { + if (ownerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + owner_ = value; + onChanged(); + } else { + ownerBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群组创建者信息
+       * 
+ * + * .core.UserProfile owner = 2; + */ + public Builder setOwner( + com.akaxin.proto.core.UserProto.UserProfile.Builder builderForValue) { + if (ownerBuilder_ == null) { + owner_ = builderForValue.build(); + onChanged(); + } else { + ownerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群组创建者信息
+       * 
+ * + * .core.UserProfile owner = 2; + */ + public Builder mergeOwner(com.akaxin.proto.core.UserProto.UserProfile value) { + if (ownerBuilder_ == null) { + if (owner_ != null) { + owner_ = + com.akaxin.proto.core.UserProto.UserProfile.newBuilder(owner_).mergeFrom(value).buildPartial(); + } else { + owner_ = value; + } + onChanged(); + } else { + ownerBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群组创建者信息
+       * 
+ * + * .core.UserProfile owner = 2; + */ + public Builder clearOwner() { + if (ownerBuilder_ == null) { + owner_ = null; + onChanged(); + } else { + owner_ = null; + ownerBuilder_ = null; + } + + return this; + } + /** + *
+       *群组创建者信息
+       * 
+ * + * .core.UserProfile owner = 2; + */ + public com.akaxin.proto.core.UserProto.UserProfile.Builder getOwnerBuilder() { + + onChanged(); + return getOwnerFieldBuilder().getBuilder(); + } + /** + *
+       *群组创建者信息
+       * 
+ * + * .core.UserProfile owner = 2; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getOwnerOrBuilder() { + if (ownerBuilder_ != null) { + return ownerBuilder_.getMessageOrBuilder(); + } else { + return owner_ == null ? + com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : owner_; + } + } + /** + *
+       *群组创建者信息
+       * 
+ * + * .core.UserProfile owner = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> + getOwnerFieldBuilder() { + if (ownerBuilder_ == null) { + ownerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder>( + getOwner(), + getParentForChildren(), + isClean()); + owner_ = null; + } + return ownerBuilder_; + } + + private int groupMemberCount_ ; + /** + *
+       *群组的成员数量
+       * 
+ * + * int32 group_member_count = 3; + */ + public int getGroupMemberCount() { + return groupMemberCount_; + } + /** + *
+       *群组的成员数量
+       * 
+ * + * int32 group_member_count = 3; + */ + public Builder setGroupMemberCount(int value) { + + groupMemberCount_ = value; + onChanged(); + return this; + } + /** + *
+       *群组的成员数量
+       * 
+ * + * int32 group_member_count = 3; + */ + public Builder clearGroupMemberCount() { + + groupMemberCount_ = 0; + onChanged(); + return this; + } + + private java.util.List groupLastestMember_ = + java.util.Collections.emptyList(); + private void ensureGroupLastestMemberIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + groupLastestMember_ = new java.util.ArrayList(groupLastestMember_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupMemberProfile, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder, com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder> groupLastestMemberBuilder_; + + /** + *
+       *群成员
+       * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public java.util.List getGroupLastestMemberList() { + if (groupLastestMemberBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupLastestMember_); + } else { + return groupLastestMemberBuilder_.getMessageList(); + } + } + /** + *
+       *群成员
+       * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public int getGroupLastestMemberCount() { + if (groupLastestMemberBuilder_ == null) { + return groupLastestMember_.size(); + } else { + return groupLastestMemberBuilder_.getCount(); + } + } + /** + *
+       *群成员
+       * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile getGroupLastestMember(int index) { + if (groupLastestMemberBuilder_ == null) { + return groupLastestMember_.get(index); + } else { + return groupLastestMemberBuilder_.getMessage(index); + } + } + /** + *
+       *群成员
+       * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public Builder setGroupLastestMember( + int index, com.akaxin.proto.core.GroupProto.GroupMemberProfile value) { + if (groupLastestMemberBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupLastestMemberIsMutable(); + groupLastestMember_.set(index, value); + onChanged(); + } else { + groupLastestMemberBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *群成员
+       * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public Builder setGroupLastestMember( + int index, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder builderForValue) { + if (groupLastestMemberBuilder_ == null) { + ensureGroupLastestMemberIsMutable(); + groupLastestMember_.set(index, builderForValue.build()); + onChanged(); + } else { + groupLastestMemberBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *群成员
+       * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public Builder addGroupLastestMember(com.akaxin.proto.core.GroupProto.GroupMemberProfile value) { + if (groupLastestMemberBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupLastestMemberIsMutable(); + groupLastestMember_.add(value); + onChanged(); + } else { + groupLastestMemberBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *群成员
+       * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public Builder addGroupLastestMember( + int index, com.akaxin.proto.core.GroupProto.GroupMemberProfile value) { + if (groupLastestMemberBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupLastestMemberIsMutable(); + groupLastestMember_.add(index, value); + onChanged(); + } else { + groupLastestMemberBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *群成员
+       * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public Builder addGroupLastestMember( + com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder builderForValue) { + if (groupLastestMemberBuilder_ == null) { + ensureGroupLastestMemberIsMutable(); + groupLastestMember_.add(builderForValue.build()); + onChanged(); + } else { + groupLastestMemberBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *群成员
+       * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public Builder addGroupLastestMember( + int index, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder builderForValue) { + if (groupLastestMemberBuilder_ == null) { + ensureGroupLastestMemberIsMutable(); + groupLastestMember_.add(index, builderForValue.build()); + onChanged(); + } else { + groupLastestMemberBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *群成员
+       * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public Builder addAllGroupLastestMember( + java.lang.Iterable values) { + if (groupLastestMemberBuilder_ == null) { + ensureGroupLastestMemberIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, groupLastestMember_); + onChanged(); + } else { + groupLastestMemberBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *群成员
+       * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public Builder clearGroupLastestMember() { + if (groupLastestMemberBuilder_ == null) { + groupLastestMember_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + groupLastestMemberBuilder_.clear(); + } + return this; + } + /** + *
+       *群成员
+       * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public Builder removeGroupLastestMember(int index) { + if (groupLastestMemberBuilder_ == null) { + ensureGroupLastestMemberIsMutable(); + groupLastestMember_.remove(index); + onChanged(); + } else { + groupLastestMemberBuilder_.remove(index); + } + return this; + } + /** + *
+       *群成员
+       * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder getGroupLastestMemberBuilder( + int index) { + return getGroupLastestMemberFieldBuilder().getBuilder(index); + } + /** + *
+       *群成员
+       * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder getGroupLastestMemberOrBuilder( + int index) { + if (groupLastestMemberBuilder_ == null) { + return groupLastestMember_.get(index); } else { + return groupLastestMemberBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *群成员
+       * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public java.util.List + getGroupLastestMemberOrBuilderList() { + if (groupLastestMemberBuilder_ != null) { + return groupLastestMemberBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupLastestMember_); + } + } + /** + *
+       *群成员
+       * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder addGroupLastestMemberBuilder() { + return getGroupLastestMemberFieldBuilder().addBuilder( + com.akaxin.proto.core.GroupProto.GroupMemberProfile.getDefaultInstance()); + } + /** + *
+       *群成员
+       * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder addGroupLastestMemberBuilder( + int index) { + return getGroupLastestMemberFieldBuilder().addBuilder( + index, com.akaxin.proto.core.GroupProto.GroupMemberProfile.getDefaultInstance()); + } + /** + *
+       *群成员
+       * 
+ * + * repeated .core.GroupMemberProfile group_lastest_member = 4; + */ + public java.util.List + getGroupLastestMemberBuilderList() { + return getGroupLastestMemberFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupMemberProfile, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder, com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder> + getGroupLastestMemberFieldBuilder() { + if (groupLastestMemberBuilder_ == null) { + groupLastestMemberBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupMemberProfile, com.akaxin.proto.core.GroupProto.GroupMemberProfile.Builder, com.akaxin.proto.core.GroupProto.GroupMemberProfileOrBuilder>( + groupLastestMember_, + ((bitField0_ & 0x00000008) == 0x00000008), + getParentForChildren(), + isClean()); + groupLastestMember_ = null; + } + return groupLastestMemberBuilder_; + } + + private boolean closeInviteGroupChat_ ; + /** + *
+       *关闭邀请新用户群聊 true:打开  false:关闭
+       * 
+ * + * bool close_invite_group_chat = 5; + */ + public boolean getCloseInviteGroupChat() { + return closeInviteGroupChat_; + } + /** + *
+       *关闭邀请新用户群聊 true:打开  false:关闭
+       * 
+ * + * bool close_invite_group_chat = 5; + */ + public Builder setCloseInviteGroupChat(boolean value) { + + closeInviteGroupChat_ = value; + onChanged(); + return this; + } + /** + *
+       *关闭邀请新用户群聊 true:打开  false:关闭
+       * 
+ * + * bool close_invite_group_chat = 5; + */ + public Builder clearCloseInviteGroupChat() { + + closeInviteGroupChat_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupProfileResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupProfileResponse) + private static final com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse(); + } + + public static com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupProfileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupProfileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupProfileProto.ApiGroupProfileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupProfileRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupProfileRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupProfileResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupProfileResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034site/api_group_profile.proto\022\004site\032\017co" + + "re/user.proto\032\020core/group.proto\"*\n\026ApiGr" + + "oupProfileRequest\022\020\n\010group_id\030\001 \001(\t\"\325\001\n\027" + + "ApiGroupProfileResponse\022#\n\007profile\030\001 \001(\013" + + "2\022.core.GroupProfile\022 \n\005owner\030\002 \001(\0132\021.co" + + "re.UserProfile\022\032\n\022group_member_count\030\003 \001" + + "(\005\0226\n\024group_lastest_member\030\004 \003(\0132\030.core." + + "GroupMemberProfile\022\037\n\027close_invite_group" + + "_chat\030\005 \001(\0102`\n\026ApiGroupProfileService\022F\n" + + "\007profile\022\034.site.ApiGroupProfileRequest\032\035" + + ".site.ApiGroupProfileResponseB-\n\025com.aka" + + "xin.proto.siteB\024ApiGroupProfileProtob\006pr" + + "oto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.UserProto.getDescriptor(), + com.akaxin.proto.core.GroupProto.getDescriptor(), + }, assigner); + internal_static_site_ApiGroupProfileRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiGroupProfileRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupProfileRequest_descriptor, + new java.lang.String[] { "GroupId", }); + internal_static_site_ApiGroupProfileResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiGroupProfileResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupProfileResponse_descriptor, + new java.lang.String[] { "Profile", "Owner", "GroupMemberCount", "GroupLastestMember", "CloseInviteGroupChat", }); + com.akaxin.proto.core.UserProto.getDescriptor(); + com.akaxin.proto.core.GroupProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupQuitProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupQuitProto.java new file mode 100755 index 0000000..0254f12 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupQuitProto.java @@ -0,0 +1,1018 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_group_quit.proto + +package com.akaxin.proto.site; + +public final class ApiGroupQuitProto { + private ApiGroupQuitProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiGroupQuitRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupQuitRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *当前用户退出的群组
+     * 
+ * + * string group_id = 1; + */ + java.lang.String getGroupId(); + /** + *
+     *当前用户退出的群组
+     * 
+ * + * string group_id = 1; + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + } + /** + * Protobuf type {@code site.ApiGroupQuitRequest} + */ + public static final class ApiGroupQuitRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupQuitRequest) + ApiGroupQuitRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupQuitRequest.newBuilder() to construct. + private ApiGroupQuitRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupQuitRequest() { + groupId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupQuitRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + groupId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupQuitProto.internal_static_site_ApiGroupQuitRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupQuitProto.internal_static_site_ApiGroupQuitRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest.class, com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object groupId_; + /** + *
+     *当前用户退出的群组
+     * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+     *当前用户退出的群组
+     * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest other = (com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest) obj; + + boolean result = true; + result = result && getGroupId() + .equals(other.getGroupId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupQuitRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupQuitRequest) + com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupQuitProto.internal_static_site_ApiGroupQuitRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupQuitProto.internal_static_site_ApiGroupQuitRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest.class, com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + groupId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupQuitProto.internal_static_site_ApiGroupQuitRequest_descriptor; + } + + public com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest build() { + com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest buildPartial() { + com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest result = new com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest(this); + result.groupId_ = groupId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest) { + return mergeFrom((com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest other) { + if (other == com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object groupId_ = ""; + /** + *
+       *当前用户退出的群组
+       * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *当前用户退出的群组
+       * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *当前用户退出的群组
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupId_ = value; + onChanged(); + return this; + } + /** + *
+       *当前用户退出的群组
+       * 
+ * + * string group_id = 1; + */ + public Builder clearGroupId() { + + groupId_ = getDefaultInstance().getGroupId(); + onChanged(); + return this; + } + /** + *
+       *当前用户退出的群组
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupQuitRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupQuitRequest) + private static final com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest(); + } + + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupQuitRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupQuitRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiGroupQuitResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupQuitResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiGroupQuitResponse} + */ + public static final class ApiGroupQuitResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupQuitResponse) + ApiGroupQuitResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupQuitResponse.newBuilder() to construct. + private ApiGroupQuitResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupQuitResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupQuitResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupQuitProto.internal_static_site_ApiGroupQuitResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupQuitProto.internal_static_site_ApiGroupQuitResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse.class, com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse other = (com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupQuitResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupQuitResponse) + com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupQuitProto.internal_static_site_ApiGroupQuitResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupQuitProto.internal_static_site_ApiGroupQuitResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse.class, com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupQuitProto.internal_static_site_ApiGroupQuitResponse_descriptor; + } + + public com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse build() { + com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse buildPartial() { + com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse result = new com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse) { + return mergeFrom((com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse other) { + if (other == com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupQuitResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupQuitResponse) + private static final com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse(); + } + + public static com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupQuitResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupQuitResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupQuitProto.ApiGroupQuitResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupQuitRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupQuitRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupQuitResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupQuitResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031site/api_group_quit.proto\022\004site\"\'\n\023Api" + + "GroupQuitRequest\022\020\n\010group_id\030\001 \001(\t\"\026\n\024Ap" + + "iGroupQuitResponse2U\n\023ApiGroupQuitServic" + + "e\022>\n\005quite\022\031.site.ApiGroupQuitRequest\032\032." + + "site.ApiGroupQuitResponseB*\n\025com.akaxin." + + "proto.siteB\021ApiGroupQuitProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiGroupQuitRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiGroupQuitRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupQuitRequest_descriptor, + new java.lang.String[] { "GroupId", }); + internal_static_site_ApiGroupQuitResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiGroupQuitResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupQuitResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupRemoveMemberProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupRemoveMemberProto.java new file mode 100755 index 0000000..4c45532 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupRemoveMemberProto.java @@ -0,0 +1,1283 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_group_removeMember.proto + +package com.akaxin.proto.site; + +public final class ApiGroupRemoveMemberProto { + private ApiGroupRemoveMemberProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiGroupRemoveMemberRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupRemoveMemberRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + java.lang.String getGroupId(); + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+     *需要删除的群组成员
+     * 
+ * + * repeated string site_user_id = 2; + */ + java.util.List + getSiteUserIdList(); + /** + *
+     *需要删除的群组成员
+     * 
+ * + * repeated string site_user_id = 2; + */ + int getSiteUserIdCount(); + /** + *
+     *需要删除的群组成员
+     * 
+ * + * repeated string site_user_id = 2; + */ + java.lang.String getSiteUserId(int index); + /** + *
+     *需要删除的群组成员
+     * 
+ * + * repeated string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(int index); + } + /** + * Protobuf type {@code site.ApiGroupRemoveMemberRequest} + */ + public static final class ApiGroupRemoveMemberRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupRemoveMemberRequest) + ApiGroupRemoveMemberRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupRemoveMemberRequest.newBuilder() to construct. + private ApiGroupRemoveMemberRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupRemoveMemberRequest() { + groupId_ = ""; + siteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupRemoveMemberRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + groupId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + siteUserId_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + siteUserId_.add(s); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + siteUserId_ = siteUserId_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupRemoveMemberProto.internal_static_site_ApiGroupRemoveMemberRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupRemoveMemberProto.internal_static_site_ApiGroupRemoveMemberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest.class, com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest.Builder.class); + } + + private int bitField0_; + public static final int GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object groupId_; + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList siteUserId_; + /** + *
+     *需要删除的群组成员
+     * 
+ * + * repeated string site_user_id = 2; + */ + public com.google.protobuf.ProtocolStringList + getSiteUserIdList() { + return siteUserId_; + } + /** + *
+     *需要删除的群组成员
+     * 
+ * + * repeated string site_user_id = 2; + */ + public int getSiteUserIdCount() { + return siteUserId_.size(); + } + /** + *
+     *需要删除的群组成员
+     * 
+ * + * repeated string site_user_id = 2; + */ + public java.lang.String getSiteUserId(int index) { + return siteUserId_.get(index); + } + /** + *
+     *需要删除的群组成员
+     * 
+ * + * repeated string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes(int index) { + return siteUserId_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupId_); + } + for (int i = 0; i < siteUserId_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupId_); + } + { + int dataSize = 0; + for (int i = 0; i < siteUserId_.size(); i++) { + dataSize += computeStringSizeNoTag(siteUserId_.getRaw(i)); + } + size += dataSize; + size += 1 * getSiteUserIdList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest other = (com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest) obj; + + boolean result = true; + result = result && getGroupId() + .equals(other.getGroupId()); + result = result && getSiteUserIdList() + .equals(other.getSiteUserIdList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + if (getSiteUserIdCount() > 0) { + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserIdList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupRemoveMemberRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupRemoveMemberRequest) + com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupRemoveMemberProto.internal_static_site_ApiGroupRemoveMemberRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupRemoveMemberProto.internal_static_site_ApiGroupRemoveMemberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest.class, com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + groupId_ = ""; + + siteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupRemoveMemberProto.internal_static_site_ApiGroupRemoveMemberRequest_descriptor; + } + + public com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest build() { + com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest buildPartial() { + com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest result = new com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.groupId_ = groupId_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + siteUserId_ = siteUserId_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.siteUserId_ = siteUserId_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest) { + return mergeFrom((com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest other) { + if (other == com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + onChanged(); + } + if (!other.siteUserId_.isEmpty()) { + if (siteUserId_.isEmpty()) { + siteUserId_ = other.siteUserId_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSiteUserIdIsMutable(); + siteUserId_.addAll(other.siteUserId_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object groupId_ = ""; + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupId_ = value; + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder clearGroupId() { + + groupId_ = getDefaultInstance().getGroupId(); + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList siteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureSiteUserIdIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + siteUserId_ = new com.google.protobuf.LazyStringArrayList(siteUserId_); + bitField0_ |= 0x00000002; + } + } + /** + *
+       *需要删除的群组成员
+       * 
+ * + * repeated string site_user_id = 2; + */ + public com.google.protobuf.ProtocolStringList + getSiteUserIdList() { + return siteUserId_.getUnmodifiableView(); + } + /** + *
+       *需要删除的群组成员
+       * 
+ * + * repeated string site_user_id = 2; + */ + public int getSiteUserIdCount() { + return siteUserId_.size(); + } + /** + *
+       *需要删除的群组成员
+       * 
+ * + * repeated string site_user_id = 2; + */ + public java.lang.String getSiteUserId(int index) { + return siteUserId_.get(index); + } + /** + *
+       *需要删除的群组成员
+       * 
+ * + * repeated string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes(int index) { + return siteUserId_.getByteString(index); + } + /** + *
+       *需要删除的群组成员
+       * 
+ * + * repeated string site_user_id = 2; + */ + public Builder setSiteUserId( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSiteUserIdIsMutable(); + siteUserId_.set(index, value); + onChanged(); + return this; + } + /** + *
+       *需要删除的群组成员
+       * 
+ * + * repeated string site_user_id = 2; + */ + public Builder addSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSiteUserIdIsMutable(); + siteUserId_.add(value); + onChanged(); + return this; + } + /** + *
+       *需要删除的群组成员
+       * 
+ * + * repeated string site_user_id = 2; + */ + public Builder addAllSiteUserId( + java.lang.Iterable values) { + ensureSiteUserIdIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, siteUserId_); + onChanged(); + return this; + } + /** + *
+       *需要删除的群组成员
+       * 
+ * + * repeated string site_user_id = 2; + */ + public Builder clearSiteUserId() { + siteUserId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       *需要删除的群组成员
+       * 
+ * + * repeated string site_user_id = 2; + */ + public Builder addSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSiteUserIdIsMutable(); + siteUserId_.add(value); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupRemoveMemberRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupRemoveMemberRequest) + private static final com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest(); + } + + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupRemoveMemberRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupRemoveMemberRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiGroupRemoveMemberResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupRemoveMemberResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiGroupRemoveMemberResponse} + */ + public static final class ApiGroupRemoveMemberResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupRemoveMemberResponse) + ApiGroupRemoveMemberResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupRemoveMemberResponse.newBuilder() to construct. + private ApiGroupRemoveMemberResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupRemoveMemberResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupRemoveMemberResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupRemoveMemberProto.internal_static_site_ApiGroupRemoveMemberResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupRemoveMemberProto.internal_static_site_ApiGroupRemoveMemberResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse.class, com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse other = (com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupRemoveMemberResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupRemoveMemberResponse) + com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupRemoveMemberProto.internal_static_site_ApiGroupRemoveMemberResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupRemoveMemberProto.internal_static_site_ApiGroupRemoveMemberResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse.class, com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupRemoveMemberProto.internal_static_site_ApiGroupRemoveMemberResponse_descriptor; + } + + public com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse build() { + com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse buildPartial() { + com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse result = new com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse) { + return mergeFrom((com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse other) { + if (other == com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupRemoveMemberResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupRemoveMemberResponse) + private static final com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse(); + } + + public static com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupRemoveMemberResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupRemoveMemberResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupRemoveMemberProto.ApiGroupRemoveMemberResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupRemoveMemberRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupRemoveMemberRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupRemoveMemberResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupRemoveMemberResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n!site/api_group_removeMember.proto\022\004sit" + + "e\"E\n\033ApiGroupRemoveMemberRequest\022\020\n\010grou" + + "p_id\030\001 \001(\t\022\024\n\014site_user_id\030\002 \003(\t\"\036\n\034ApiG" + + "roupRemoveMemberResponse2s\n\032ApiGroupRemo" + + "veMemberMember\022U\n\014removeMember\022!.site.Ap" + + "iGroupRemoveMemberRequest\032\".site.ApiGrou" + + "pRemoveMemberResponseB2\n\025com.akaxin.prot" + + "o.siteB\031ApiGroupRemoveMemberProtob\006proto" + + "3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiGroupRemoveMemberRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiGroupRemoveMemberRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupRemoveMemberRequest_descriptor, + new java.lang.String[] { "GroupId", "SiteUserId", }); + internal_static_site_ApiGroupRemoveMemberResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiGroupRemoveMemberResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupRemoveMemberResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupSettingProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupSettingProto.java new file mode 100755 index 0000000..184fe3a --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupSettingProto.java @@ -0,0 +1,1105 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_group_setting.proto + +package com.akaxin.proto.site; + +public final class ApiGroupSettingProto { + private ApiGroupSettingProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiGroupSettingRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupSettingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *当前用户获取群组ID的资料信息
+     * 
+ * + * string group_id = 1; + */ + java.lang.String getGroupId(); + /** + *
+     *当前用户获取群组ID的资料信息
+     * 
+ * + * string group_id = 1; + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + } + /** + * Protobuf type {@code site.ApiGroupSettingRequest} + */ + public static final class ApiGroupSettingRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupSettingRequest) + ApiGroupSettingRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupSettingRequest.newBuilder() to construct. + private ApiGroupSettingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupSettingRequest() { + groupId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupSettingRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + groupId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupSettingProto.internal_static_site_ApiGroupSettingRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupSettingProto.internal_static_site_ApiGroupSettingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest.class, com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object groupId_; + /** + *
+     *当前用户获取群组ID的资料信息
+     * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+     *当前用户获取群组ID的资料信息
+     * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest other = (com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest) obj; + + boolean result = true; + result = result && getGroupId() + .equals(other.getGroupId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupSettingRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupSettingRequest) + com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupSettingProto.internal_static_site_ApiGroupSettingRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupSettingProto.internal_static_site_ApiGroupSettingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest.class, com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + groupId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupSettingProto.internal_static_site_ApiGroupSettingRequest_descriptor; + } + + public com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest build() { + com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest buildPartial() { + com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest result = new com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest(this); + result.groupId_ = groupId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest) { + return mergeFrom((com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest other) { + if (other == com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object groupId_ = ""; + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupId_ = value; + onChanged(); + return this; + } + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string group_id = 1; + */ + public Builder clearGroupId() { + + groupId_ = getDefaultInstance().getGroupId(); + onChanged(); + return this; + } + /** + *
+       *当前用户获取群组ID的资料信息
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupSettingRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupSettingRequest) + private static final com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest(); + } + + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupSettingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupSettingRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiGroupSettingResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupSettingResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *消息免打扰 mute notifications
+     * 
+ * + * bool message_mute = 1; + */ + boolean getMessageMute(); + } + /** + * Protobuf type {@code site.ApiGroupSettingResponse} + */ + public static final class ApiGroupSettingResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupSettingResponse) + ApiGroupSettingResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupSettingResponse.newBuilder() to construct. + private ApiGroupSettingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupSettingResponse() { + messageMute_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupSettingResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + messageMute_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupSettingProto.internal_static_site_ApiGroupSettingResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupSettingProto.internal_static_site_ApiGroupSettingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse.class, com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse.Builder.class); + } + + public static final int MESSAGE_MUTE_FIELD_NUMBER = 1; + private boolean messageMute_; + /** + *
+     *消息免打扰 mute notifications
+     * 
+ * + * bool message_mute = 1; + */ + public boolean getMessageMute() { + return messageMute_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (messageMute_ != false) { + output.writeBool(1, messageMute_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (messageMute_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, messageMute_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse other = (com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse) obj; + + boolean result = true; + result = result && (getMessageMute() + == other.getMessageMute()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MESSAGE_MUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMessageMute()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupSettingResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupSettingResponse) + com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupSettingProto.internal_static_site_ApiGroupSettingResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupSettingProto.internal_static_site_ApiGroupSettingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse.class, com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + messageMute_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupSettingProto.internal_static_site_ApiGroupSettingResponse_descriptor; + } + + public com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse build() { + com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse buildPartial() { + com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse result = new com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse(this); + result.messageMute_ = messageMute_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse) { + return mergeFrom((com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse other) { + if (other == com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse.getDefaultInstance()) return this; + if (other.getMessageMute() != false) { + setMessageMute(other.getMessageMute()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean messageMute_ ; + /** + *
+       *消息免打扰 mute notifications
+       * 
+ * + * bool message_mute = 1; + */ + public boolean getMessageMute() { + return messageMute_; + } + /** + *
+       *消息免打扰 mute notifications
+       * 
+ * + * bool message_mute = 1; + */ + public Builder setMessageMute(boolean value) { + + messageMute_ = value; + onChanged(); + return this; + } + /** + *
+       *消息免打扰 mute notifications
+       * 
+ * + * bool message_mute = 1; + */ + public Builder clearMessageMute() { + + messageMute_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupSettingResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupSettingResponse) + private static final com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse(); + } + + public static com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupSettingResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupSettingResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupSettingProto.ApiGroupSettingResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupSettingRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupSettingRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupSettingResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupSettingResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034site/api_group_setting.proto\022\004site\"*\n\026" + + "ApiGroupSettingRequest\022\020\n\010group_id\030\001 \001(\t" + + "\"/\n\027ApiGroupSettingResponse\022\024\n\014message_m" + + "ute\030\001 \001(\0102`\n\026ApiGroupSettingService\022F\n\007s" + + "etting\022\034.site.ApiGroupSettingRequest\032\035.s" + + "ite.ApiGroupSettingResponseB-\n\025com.akaxi" + + "n.proto.siteB\024ApiGroupSettingProtob\006prot" + + "o3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiGroupSettingRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiGroupSettingRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupSettingRequest_descriptor, + new java.lang.String[] { "GroupId", }); + internal_static_site_ApiGroupSettingResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiGroupSettingResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupSettingResponse_descriptor, + new java.lang.String[] { "MessageMute", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupUpdateMuteProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupUpdateMuteProto.java new file mode 100755 index 0000000..3faa8a2 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupUpdateMuteProto.java @@ -0,0 +1,1104 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_group_updateMute.proto + +package com.akaxin.proto.site; + +public final class ApiGroupUpdateMuteProto { + private ApiGroupUpdateMuteProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiGroupUpdateMuteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupUpdateMuteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组ID
+     * 
+ * + * string site_group_id = 1; + */ + java.lang.String getSiteGroupId(); + /** + *
+     *群组ID
+     * 
+ * + * string site_group_id = 1; + */ + com.google.protobuf.ByteString + getSiteGroupIdBytes(); + + /** + *
+     *消息免打扰
+     * 
+ * + * bool mute = 2; + */ + boolean getMute(); + } + /** + * Protobuf type {@code site.ApiGroupUpdateMuteRequest} + */ + public static final class ApiGroupUpdateMuteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupUpdateMuteRequest) + ApiGroupUpdateMuteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupUpdateMuteRequest.newBuilder() to construct. + private ApiGroupUpdateMuteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupUpdateMuteRequest() { + siteGroupId_ = ""; + mute_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupUpdateMuteRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteGroupId_ = s; + break; + } + case 16: { + + mute_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupUpdateMuteProto.internal_static_site_ApiGroupUpdateMuteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupUpdateMuteProto.internal_static_site_ApiGroupUpdateMuteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest.class, com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest.Builder.class); + } + + public static final int SITE_GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteGroupId_; + /** + *
+     *群组ID
+     * 
+ * + * string site_group_id = 1; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } + } + /** + *
+     *群组ID
+     * 
+ * + * string site_group_id = 1; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MUTE_FIELD_NUMBER = 2; + private boolean mute_; + /** + *
+     *消息免打扰
+     * 
+ * + * bool mute = 2; + */ + public boolean getMute() { + return mute_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteGroupId_); + } + if (mute_ != false) { + output.writeBool(2, mute_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteGroupId_); + } + if (mute_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, mute_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest other = (com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest) obj; + + boolean result = true; + result = result && getSiteGroupId() + .equals(other.getSiteGroupId()); + result = result && (getMute() + == other.getMute()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteGroupId().hashCode(); + hash = (37 * hash) + MUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMute()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupUpdateMuteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupUpdateMuteRequest) + com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupUpdateMuteProto.internal_static_site_ApiGroupUpdateMuteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupUpdateMuteProto.internal_static_site_ApiGroupUpdateMuteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest.class, com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteGroupId_ = ""; + + mute_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupUpdateMuteProto.internal_static_site_ApiGroupUpdateMuteRequest_descriptor; + } + + public com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest build() { + com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest buildPartial() { + com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest result = new com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest(this); + result.siteGroupId_ = siteGroupId_; + result.mute_ = mute_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest) { + return mergeFrom((com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest other) { + if (other == com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest.getDefaultInstance()) return this; + if (!other.getSiteGroupId().isEmpty()) { + siteGroupId_ = other.siteGroupId_; + onChanged(); + } + if (other.getMute() != false) { + setMute(other.getMute()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteGroupId_ = ""; + /** + *
+       *群组ID
+       * 
+ * + * string site_group_id = 1; + */ + public java.lang.String getSiteGroupId() { + java.lang.Object ref = siteGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string site_group_id = 1; + */ + public com.google.protobuf.ByteString + getSiteGroupIdBytes() { + java.lang.Object ref = siteGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string site_group_id = 1; + */ + public Builder setSiteGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteGroupId_ = value; + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string site_group_id = 1; + */ + public Builder clearSiteGroupId() { + + siteGroupId_ = getDefaultInstance().getSiteGroupId(); + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string site_group_id = 1; + */ + public Builder setSiteGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteGroupId_ = value; + onChanged(); + return this; + } + + private boolean mute_ ; + /** + *
+       *消息免打扰
+       * 
+ * + * bool mute = 2; + */ + public boolean getMute() { + return mute_; + } + /** + *
+       *消息免打扰
+       * 
+ * + * bool mute = 2; + */ + public Builder setMute(boolean value) { + + mute_ = value; + onChanged(); + return this; + } + /** + *
+       *消息免打扰
+       * 
+ * + * bool mute = 2; + */ + public Builder clearMute() { + + mute_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupUpdateMuteRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupUpdateMuteRequest) + private static final com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest(); + } + + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupUpdateMuteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupUpdateMuteRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiGroupUpdateMuteResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupUpdateMuteResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiGroupUpdateMuteResponse} + */ + public static final class ApiGroupUpdateMuteResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupUpdateMuteResponse) + ApiGroupUpdateMuteResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupUpdateMuteResponse.newBuilder() to construct. + private ApiGroupUpdateMuteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupUpdateMuteResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupUpdateMuteResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupUpdateMuteProto.internal_static_site_ApiGroupUpdateMuteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupUpdateMuteProto.internal_static_site_ApiGroupUpdateMuteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse.class, com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse other = (com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupUpdateMuteResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupUpdateMuteResponse) + com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupUpdateMuteProto.internal_static_site_ApiGroupUpdateMuteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupUpdateMuteProto.internal_static_site_ApiGroupUpdateMuteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse.class, com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupUpdateMuteProto.internal_static_site_ApiGroupUpdateMuteResponse_descriptor; + } + + public com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse build() { + com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse buildPartial() { + com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse result = new com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse) { + return mergeFrom((com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse other) { + if (other == com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupUpdateMuteResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupUpdateMuteResponse) + private static final com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse(); + } + + public static com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupUpdateMuteResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupUpdateMuteResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupUpdateMuteProto.ApiGroupUpdateMuteResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupUpdateMuteRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupUpdateMuteRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupUpdateMuteResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupUpdateMuteResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\037site/api_group_updateMute.proto\022\004site\"" + + "@\n\031ApiGroupUpdateMuteRequest\022\025\n\rsite_gro" + + "up_id\030\001 \001(\t\022\014\n\004mute\030\002 \001(\010\"\034\n\032ApiGroupUpd" + + "ateMuteResponse2l\n\031ApiGroupUpdateMuteSer" + + "vice\022O\n\nupdateMute\022\037.site.ApiGroupUpdate" + + "MuteRequest\032 .site.ApiGroupUpdateMuteRes" + + "ponseB0\n\025com.akaxin.proto.siteB\027ApiGroup" + + "UpdateMuteProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiGroupUpdateMuteRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiGroupUpdateMuteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupUpdateMuteRequest_descriptor, + new java.lang.String[] { "SiteGroupId", "Mute", }); + internal_static_site_ApiGroupUpdateMuteResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiGroupUpdateMuteResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupUpdateMuteResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupUpdateProfileProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupUpdateProfileProto.java new file mode 100755 index 0000000..5b25d3b --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupUpdateProfileProto.java @@ -0,0 +1,1363 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_group_updateProfile.proto + +package com.akaxin.proto.site; + +public final class ApiGroupUpdateProfileProto { + private ApiGroupUpdateProfileProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiGroupUpdateProfileRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupUpdateProfileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *需要更新的群组资料
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + boolean hasProfile(); + /** + *
+     *需要更新的群组资料
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + com.akaxin.proto.core.GroupProto.GroupProfile getProfile(); + /** + *
+     *需要更新的群组资料
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder getProfileOrBuilder(); + + /** + *
+     *新的群主
+     * 
+ * + * string new_group_owner = 2; + */ + java.lang.String getNewGroupOwner(); + /** + *
+     *新的群主
+     * 
+ * + * string new_group_owner = 2; + */ + com.google.protobuf.ByteString + getNewGroupOwnerBytes(); + + /** + *
+     *是否关闭群聊邀请 true:打开 false:关闭
+     * 
+ * + * bool close_invite_group_chat = 3; + */ + boolean getCloseInviteGroupChat(); + } + /** + * Protobuf type {@code site.ApiGroupUpdateProfileRequest} + */ + public static final class ApiGroupUpdateProfileRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupUpdateProfileRequest) + ApiGroupUpdateProfileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupUpdateProfileRequest.newBuilder() to construct. + private ApiGroupUpdateProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupUpdateProfileRequest() { + newGroupOwner_ = ""; + closeInviteGroupChat_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupUpdateProfileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.GroupProto.GroupProfile.Builder subBuilder = null; + if (profile_ != null) { + subBuilder = profile_.toBuilder(); + } + profile_ = input.readMessage(com.akaxin.proto.core.GroupProto.GroupProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(profile_); + profile_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + newGroupOwner_ = s; + break; + } + case 24: { + + closeInviteGroupChat_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupUpdateProfileProto.internal_static_site_ApiGroupUpdateProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupUpdateProfileProto.internal_static_site_ApiGroupUpdateProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest.class, com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest.Builder.class); + } + + public static final int PROFILE_FIELD_NUMBER = 1; + private com.akaxin.proto.core.GroupProto.GroupProfile profile_; + /** + *
+     *需要更新的群组资料
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + public boolean hasProfile() { + return profile_ != null; + } + /** + *
+     *需要更新的群组资料
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile getProfile() { + return profile_ == null ? com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance() : profile_; + } + /** + *
+     *需要更新的群组资料
+     * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder getProfileOrBuilder() { + return getProfile(); + } + + public static final int NEW_GROUP_OWNER_FIELD_NUMBER = 2; + private volatile java.lang.Object newGroupOwner_; + /** + *
+     *新的群主
+     * 
+ * + * string new_group_owner = 2; + */ + public java.lang.String getNewGroupOwner() { + java.lang.Object ref = newGroupOwner_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + newGroupOwner_ = s; + return s; + } + } + /** + *
+     *新的群主
+     * 
+ * + * string new_group_owner = 2; + */ + public com.google.protobuf.ByteString + getNewGroupOwnerBytes() { + java.lang.Object ref = newGroupOwner_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + newGroupOwner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLOSE_INVITE_GROUP_CHAT_FIELD_NUMBER = 3; + private boolean closeInviteGroupChat_; + /** + *
+     *是否关闭群聊邀请 true:打开 false:关闭
+     * 
+ * + * bool close_invite_group_chat = 3; + */ + public boolean getCloseInviteGroupChat() { + return closeInviteGroupChat_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (profile_ != null) { + output.writeMessage(1, getProfile()); + } + if (!getNewGroupOwnerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, newGroupOwner_); + } + if (closeInviteGroupChat_ != false) { + output.writeBool(3, closeInviteGroupChat_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (profile_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProfile()); + } + if (!getNewGroupOwnerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, newGroupOwner_); + } + if (closeInviteGroupChat_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, closeInviteGroupChat_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest other = (com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest) obj; + + boolean result = true; + result = result && (hasProfile() == other.hasProfile()); + if (hasProfile()) { + result = result && getProfile() + .equals(other.getProfile()); + } + result = result && getNewGroupOwner() + .equals(other.getNewGroupOwner()); + result = result && (getCloseInviteGroupChat() + == other.getCloseInviteGroupChat()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProfile()) { + hash = (37 * hash) + PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getProfile().hashCode(); + } + hash = (37 * hash) + NEW_GROUP_OWNER_FIELD_NUMBER; + hash = (53 * hash) + getNewGroupOwner().hashCode(); + hash = (37 * hash) + CLOSE_INVITE_GROUP_CHAT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCloseInviteGroupChat()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupUpdateProfileRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupUpdateProfileRequest) + com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupUpdateProfileProto.internal_static_site_ApiGroupUpdateProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupUpdateProfileProto.internal_static_site_ApiGroupUpdateProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest.class, com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (profileBuilder_ == null) { + profile_ = null; + } else { + profile_ = null; + profileBuilder_ = null; + } + newGroupOwner_ = ""; + + closeInviteGroupChat_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupUpdateProfileProto.internal_static_site_ApiGroupUpdateProfileRequest_descriptor; + } + + public com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest build() { + com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest buildPartial() { + com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest result = new com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest(this); + if (profileBuilder_ == null) { + result.profile_ = profile_; + } else { + result.profile_ = profileBuilder_.build(); + } + result.newGroupOwner_ = newGroupOwner_; + result.closeInviteGroupChat_ = closeInviteGroupChat_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest) { + return mergeFrom((com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest other) { + if (other == com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest.getDefaultInstance()) return this; + if (other.hasProfile()) { + mergeProfile(other.getProfile()); + } + if (!other.getNewGroupOwner().isEmpty()) { + newGroupOwner_ = other.newGroupOwner_; + onChanged(); + } + if (other.getCloseInviteGroupChat() != false) { + setCloseInviteGroupChat(other.getCloseInviteGroupChat()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.core.GroupProto.GroupProfile profile_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupProfile, com.akaxin.proto.core.GroupProto.GroupProfile.Builder, com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder> profileBuilder_; + /** + *
+       *需要更新的群组资料
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public boolean hasProfile() { + return profileBuilder_ != null || profile_ != null; + } + /** + *
+       *需要更新的群组资料
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile getProfile() { + if (profileBuilder_ == null) { + return profile_ == null ? com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance() : profile_; + } else { + return profileBuilder_.getMessage(); + } + } + /** + *
+       *需要更新的群组资料
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public Builder setProfile(com.akaxin.proto.core.GroupProto.GroupProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profile_ = value; + onChanged(); + } else { + profileBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *需要更新的群组资料
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public Builder setProfile( + com.akaxin.proto.core.GroupProto.GroupProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + profile_ = builderForValue.build(); + onChanged(); + } else { + profileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *需要更新的群组资料
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public Builder mergeProfile(com.akaxin.proto.core.GroupProto.GroupProfile value) { + if (profileBuilder_ == null) { + if (profile_ != null) { + profile_ = + com.akaxin.proto.core.GroupProto.GroupProfile.newBuilder(profile_).mergeFrom(value).buildPartial(); + } else { + profile_ = value; + } + onChanged(); + } else { + profileBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *需要更新的群组资料
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public Builder clearProfile() { + if (profileBuilder_ == null) { + profile_ = null; + onChanged(); + } else { + profile_ = null; + profileBuilder_ = null; + } + + return this; + } + /** + *
+       *需要更新的群组资料
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfile.Builder getProfileBuilder() { + + onChanged(); + return getProfileFieldBuilder().getBuilder(); + } + /** + *
+       *需要更新的群组资料
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + public com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder getProfileOrBuilder() { + if (profileBuilder_ != null) { + return profileBuilder_.getMessageOrBuilder(); + } else { + return profile_ == null ? + com.akaxin.proto.core.GroupProto.GroupProfile.getDefaultInstance() : profile_; + } + } + /** + *
+       *需要更新的群组资料
+       * 
+ * + * .core.GroupProfile profile = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupProfile, com.akaxin.proto.core.GroupProto.GroupProfile.Builder, com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder> + getProfileFieldBuilder() { + if (profileBuilder_ == null) { + profileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.GroupProto.GroupProfile, com.akaxin.proto.core.GroupProto.GroupProfile.Builder, com.akaxin.proto.core.GroupProto.GroupProfileOrBuilder>( + getProfile(), + getParentForChildren(), + isClean()); + profile_ = null; + } + return profileBuilder_; + } + + private java.lang.Object newGroupOwner_ = ""; + /** + *
+       *新的群主
+       * 
+ * + * string new_group_owner = 2; + */ + public java.lang.String getNewGroupOwner() { + java.lang.Object ref = newGroupOwner_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + newGroupOwner_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *新的群主
+       * 
+ * + * string new_group_owner = 2; + */ + public com.google.protobuf.ByteString + getNewGroupOwnerBytes() { + java.lang.Object ref = newGroupOwner_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + newGroupOwner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *新的群主
+       * 
+ * + * string new_group_owner = 2; + */ + public Builder setNewGroupOwner( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + newGroupOwner_ = value; + onChanged(); + return this; + } + /** + *
+       *新的群主
+       * 
+ * + * string new_group_owner = 2; + */ + public Builder clearNewGroupOwner() { + + newGroupOwner_ = getDefaultInstance().getNewGroupOwner(); + onChanged(); + return this; + } + /** + *
+       *新的群主
+       * 
+ * + * string new_group_owner = 2; + */ + public Builder setNewGroupOwnerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + newGroupOwner_ = value; + onChanged(); + return this; + } + + private boolean closeInviteGroupChat_ ; + /** + *
+       *是否关闭群聊邀请 true:打开 false:关闭
+       * 
+ * + * bool close_invite_group_chat = 3; + */ + public boolean getCloseInviteGroupChat() { + return closeInviteGroupChat_; + } + /** + *
+       *是否关闭群聊邀请 true:打开 false:关闭
+       * 
+ * + * bool close_invite_group_chat = 3; + */ + public Builder setCloseInviteGroupChat(boolean value) { + + closeInviteGroupChat_ = value; + onChanged(); + return this; + } + /** + *
+       *是否关闭群聊邀请 true:打开 false:关闭
+       * 
+ * + * bool close_invite_group_chat = 3; + */ + public Builder clearCloseInviteGroupChat() { + + closeInviteGroupChat_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupUpdateProfileRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupUpdateProfileRequest) + private static final com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest(); + } + + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupUpdateProfileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupUpdateProfileRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiGroupUpdateProfileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupUpdateProfileResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiGroupUpdateProfileResponse} + */ + public static final class ApiGroupUpdateProfileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupUpdateProfileResponse) + ApiGroupUpdateProfileResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupUpdateProfileResponse.newBuilder() to construct. + private ApiGroupUpdateProfileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupUpdateProfileResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupUpdateProfileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupUpdateProfileProto.internal_static_site_ApiGroupUpdateProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupUpdateProfileProto.internal_static_site_ApiGroupUpdateProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse.class, com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse other = (com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupUpdateProfileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupUpdateProfileResponse) + com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupUpdateProfileProto.internal_static_site_ApiGroupUpdateProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupUpdateProfileProto.internal_static_site_ApiGroupUpdateProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse.class, com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupUpdateProfileProto.internal_static_site_ApiGroupUpdateProfileResponse_descriptor; + } + + public com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse build() { + com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse buildPartial() { + com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse result = new com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse) { + return mergeFrom((com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse other) { + if (other == com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupUpdateProfileResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupUpdateProfileResponse) + private static final com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse(); + } + + public static com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupUpdateProfileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupUpdateProfileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupUpdateProfileProto.ApiGroupUpdateProfileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupUpdateProfileRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupUpdateProfileRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupUpdateProfileResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupUpdateProfileResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\"site/api_group_updateProfile.proto\022\004si" + + "te\032\020core/group.proto\"}\n\034ApiGroupUpdatePr" + + "ofileRequest\022#\n\007profile\030\001 \001(\0132\022.core.Gro" + + "upProfile\022\027\n\017new_group_owner\030\002 \001(\t\022\037\n\027cl" + + "ose_invite_group_chat\030\003 \001(\010\"\037\n\035ApiGroupU" + + "pdateProfileResponse2x\n\034ApiGroupUpdatePr" + + "ofileService\022X\n\rupdateProfile\022\".site.Api" + + "GroupUpdateProfileRequest\032#.site.ApiGrou" + + "pUpdateProfileResponseB3\n\025com.akaxin.pro" + + "to.siteB\032ApiGroupUpdateProfileProtob\006pro" + + "to3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.GroupProto.getDescriptor(), + }, assigner); + internal_static_site_ApiGroupUpdateProfileRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiGroupUpdateProfileRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupUpdateProfileRequest_descriptor, + new java.lang.String[] { "Profile", "NewGroupOwner", "CloseInviteGroupChat", }); + internal_static_site_ApiGroupUpdateProfileResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiGroupUpdateProfileResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupUpdateProfileResponse_descriptor, + new java.lang.String[] { }); + com.akaxin.proto.core.GroupProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupUpdateSettingProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupUpdateSettingProto.java new file mode 100755 index 0000000..ae4449a --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiGroupUpdateSettingProto.java @@ -0,0 +1,1105 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_group_updateSetting.proto + +package com.akaxin.proto.site; + +public final class ApiGroupUpdateSettingProto { + private ApiGroupUpdateSettingProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiGroupUpdateSettingRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupUpdateSettingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + java.lang.String getGroupId(); + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+     *消息免打扰
+     * 
+ * + * bool message_mute = 2; + */ + boolean getMessageMute(); + } + /** + * Protobuf type {@code site.ApiGroupUpdateSettingRequest} + */ + public static final class ApiGroupUpdateSettingRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupUpdateSettingRequest) + ApiGroupUpdateSettingRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupUpdateSettingRequest.newBuilder() to construct. + private ApiGroupUpdateSettingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupUpdateSettingRequest() { + groupId_ = ""; + messageMute_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupUpdateSettingRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + groupId_ = s; + break; + } + case 16: { + + messageMute_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupUpdateSettingProto.internal_static_site_ApiGroupUpdateSettingRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupUpdateSettingProto.internal_static_site_ApiGroupUpdateSettingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest.class, com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object groupId_; + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+     *群组ID
+     * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MESSAGE_MUTE_FIELD_NUMBER = 2; + private boolean messageMute_; + /** + *
+     *消息免打扰
+     * 
+ * + * bool message_mute = 2; + */ + public boolean getMessageMute() { + return messageMute_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupId_); + } + if (messageMute_ != false) { + output.writeBool(2, messageMute_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupId_); + } + if (messageMute_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, messageMute_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest other = (com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest) obj; + + boolean result = true; + result = result && getGroupId() + .equals(other.getGroupId()); + result = result && (getMessageMute() + == other.getMessageMute()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (37 * hash) + MESSAGE_MUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMessageMute()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupUpdateSettingRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupUpdateSettingRequest) + com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupUpdateSettingProto.internal_static_site_ApiGroupUpdateSettingRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupUpdateSettingProto.internal_static_site_ApiGroupUpdateSettingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest.class, com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + groupId_ = ""; + + messageMute_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupUpdateSettingProto.internal_static_site_ApiGroupUpdateSettingRequest_descriptor; + } + + public com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest build() { + com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest buildPartial() { + com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest result = new com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest(this); + result.groupId_ = groupId_; + result.messageMute_ = messageMute_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest) { + return mergeFrom((com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest other) { + if (other == com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + onChanged(); + } + if (other.getMessageMute() != false) { + setMessageMute(other.getMessageMute()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object groupId_ = ""; + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupId_ = value; + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder clearGroupId() { + + groupId_ = getDefaultInstance().getGroupId(); + onChanged(); + return this; + } + /** + *
+       *群组ID
+       * 
+ * + * string group_id = 1; + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupId_ = value; + onChanged(); + return this; + } + + private boolean messageMute_ ; + /** + *
+       *消息免打扰
+       * 
+ * + * bool message_mute = 2; + */ + public boolean getMessageMute() { + return messageMute_; + } + /** + *
+       *消息免打扰
+       * 
+ * + * bool message_mute = 2; + */ + public Builder setMessageMute(boolean value) { + + messageMute_ = value; + onChanged(); + return this; + } + /** + *
+       *消息免打扰
+       * 
+ * + * bool message_mute = 2; + */ + public Builder clearMessageMute() { + + messageMute_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupUpdateSettingRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupUpdateSettingRequest) + private static final com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest(); + } + + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupUpdateSettingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupUpdateSettingRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiGroupUpdateSettingResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiGroupUpdateSettingResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiGroupUpdateSettingResponse} + */ + public static final class ApiGroupUpdateSettingResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiGroupUpdateSettingResponse) + ApiGroupUpdateSettingResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiGroupUpdateSettingResponse.newBuilder() to construct. + private ApiGroupUpdateSettingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiGroupUpdateSettingResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiGroupUpdateSettingResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupUpdateSettingProto.internal_static_site_ApiGroupUpdateSettingResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupUpdateSettingProto.internal_static_site_ApiGroupUpdateSettingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse.class, com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse other = (com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiGroupUpdateSettingResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiGroupUpdateSettingResponse) + com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiGroupUpdateSettingProto.internal_static_site_ApiGroupUpdateSettingResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiGroupUpdateSettingProto.internal_static_site_ApiGroupUpdateSettingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse.class, com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiGroupUpdateSettingProto.internal_static_site_ApiGroupUpdateSettingResponse_descriptor; + } + + public com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse build() { + com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse buildPartial() { + com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse result = new com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse) { + return mergeFrom((com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse other) { + if (other == com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiGroupUpdateSettingResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiGroupUpdateSettingResponse) + private static final com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse(); + } + + public static com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiGroupUpdateSettingResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiGroupUpdateSettingResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiGroupUpdateSettingProto.ApiGroupUpdateSettingResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupUpdateSettingRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupUpdateSettingRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiGroupUpdateSettingResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiGroupUpdateSettingResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\"site/api_group_updateSetting.proto\022\004si" + + "te\"F\n\034ApiGroupUpdateSettingRequest\022\020\n\010gr" + + "oup_id\030\001 \001(\t\022\024\n\014message_mute\030\002 \001(\010\"\037\n\035Ap" + + "iGroupUpdateSettingResponse2x\n\034ApiGroupU" + + "pdateSettingService\022X\n\rupdateSetting\022\".s" + + "ite.ApiGroupUpdateSettingRequest\032#.site." + + "ApiGroupUpdateSettingResponseB3\n\025com.aka" + + "xin.proto.siteB\032ApiGroupUpdateSettingPro" + + "tob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiGroupUpdateSettingRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiGroupUpdateSettingRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupUpdateSettingRequest_descriptor, + new java.lang.String[] { "GroupId", "MessageMute", }); + internal_static_site_ApiGroupUpdateSettingResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiGroupUpdateSettingResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiGroupUpdateSettingResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiPlatformRegisterByPhoneProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiPlatformRegisterByPhoneProto.java new file mode 100755 index 0000000..38cd3a0 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiPlatformRegisterByPhoneProto.java @@ -0,0 +1,2668 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: platform/api_platform_registerByPhone.proto + +package com.akaxin.proto.site; + +public final class ApiPlatformRegisterByPhoneProto { + private ApiPlatformRegisterByPhoneProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiPlatformRegisterByPhoneRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiPlatformRegisterByPhoneRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户身份私钥
+     * 
+ * + * string user_id_prik = 1; + */ + java.lang.String getUserIdPrik(); + /** + *
+     *用户身份私钥
+     * 
+ * + * string user_id_prik = 1; + */ + com.google.protobuf.ByteString + getUserIdPrikBytes(); + + /** + *
+     *用户身份公钥
+     * 
+ * + * string user_id_pubk = 2; + */ + java.lang.String getUserIdPubk(); + /** + *
+     *用户身份公钥
+     * 
+ * + * string user_id_pubk = 2; + */ + com.google.protobuf.ByteString + getUserIdPubkBytes(); + + /** + *
+     *用户名(选填)
+     * 
+ * + * string user_name = 3; + */ + java.lang.String getUserName(); + /** + *
+     *用户名(选填)
+     * 
+ * + * string user_name = 3; + */ + com.google.protobuf.ByteString + getUserNameBytes(); + + /** + *
+     *用户头像(选填)
+     * 
+ * + * string user_photo = 4; + */ + java.lang.String getUserPhoto(); + /** + *
+     *用户头像(选填)
+     * 
+ * + * string user_photo = 4; + */ + com.google.protobuf.ByteString + getUserPhotoBytes(); + + /** + *
+     *客户端接受PUSH需要的token
+     * 
+ * + * string push_token = 5; + */ + java.lang.String getPushToken(); + /** + *
+     *客户端接受PUSH需要的token
+     * 
+ * + * string push_token = 5; + */ + com.google.protobuf.ByteString + getPushTokenBytes(); + + /** + *
+     *增加用户可以设置用户ID(只允许字符串,数字组成6~20位)
+     * 
+ * + * string phone_id = 6; + */ + java.lang.String getPhoneId(); + /** + *
+     *增加用户可以设置用户ID(只允许字符串,数字组成6~20位)
+     * 
+ * + * string phone_id = 6; + */ + com.google.protobuf.ByteString + getPhoneIdBytes(); + + /** + *
+     *+86
+     * 
+ * + * string country_code = 7; + */ + java.lang.String getCountryCode(); + /** + *
+     *+86
+     * 
+ * + * string country_code = 7; + */ + com.google.protobuf.ByteString + getCountryCodeBytes(); + + /** + *
+     *短信验证码
+     * 
+ * + * string phone_verify_code = 8; + */ + java.lang.String getPhoneVerifyCode(); + /** + *
+     *短信验证码
+     * 
+ * + * string phone_verify_code = 8; + */ + com.google.protobuf.ByteString + getPhoneVerifyCodeBytes(); + + /** + *
+     *短信验证码类型
+     * 
+ * + * int32 vc_type = 9; + */ + int getVcType(); + } + /** + * Protobuf type {@code site.ApiPlatformRegisterByPhoneRequest} + */ + public static final class ApiPlatformRegisterByPhoneRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiPlatformRegisterByPhoneRequest) + ApiPlatformRegisterByPhoneRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiPlatformRegisterByPhoneRequest.newBuilder() to construct. + private ApiPlatformRegisterByPhoneRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiPlatformRegisterByPhoneRequest() { + userIdPrik_ = ""; + userIdPubk_ = ""; + userName_ = ""; + userPhoto_ = ""; + pushToken_ = ""; + phoneId_ = ""; + countryCode_ = ""; + phoneVerifyCode_ = ""; + vcType_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiPlatformRegisterByPhoneRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + userIdPrik_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + userIdPubk_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + userName_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + userPhoto_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + pushToken_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + phoneId_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + countryCode_ = s; + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + phoneVerifyCode_ = s; + break; + } + case 72: { + + vcType_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.internal_static_site_ApiPlatformRegisterByPhoneRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.internal_static_site_ApiPlatformRegisterByPhoneRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest.class, com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest.Builder.class); + } + + public static final int USER_ID_PRIK_FIELD_NUMBER = 1; + private volatile java.lang.Object userIdPrik_; + /** + *
+     *用户身份私钥
+     * 
+ * + * string user_id_prik = 1; + */ + public java.lang.String getUserIdPrik() { + java.lang.Object ref = userIdPrik_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPrik_ = s; + return s; + } + } + /** + *
+     *用户身份私钥
+     * 
+ * + * string user_id_prik = 1; + */ + public com.google.protobuf.ByteString + getUserIdPrikBytes() { + java.lang.Object ref = userIdPrik_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPrik_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_PUBK_FIELD_NUMBER = 2; + private volatile java.lang.Object userIdPubk_; + /** + *
+     *用户身份公钥
+     * 
+ * + * string user_id_pubk = 2; + */ + public java.lang.String getUserIdPubk() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPubk_ = s; + return s; + } + } + /** + *
+     *用户身份公钥
+     * 
+ * + * string user_id_pubk = 2; + */ + public com.google.protobuf.ByteString + getUserIdPubkBytes() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object userName_; + /** + *
+     *用户名(选填)
+     * 
+ * + * string user_name = 3; + */ + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } + } + /** + *
+     *用户名(选填)
+     * 
+ * + * string user_name = 3; + */ + public com.google.protobuf.ByteString + getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_PHOTO_FIELD_NUMBER = 4; + private volatile java.lang.Object userPhoto_; + /** + *
+     *用户头像(选填)
+     * 
+ * + * string user_photo = 4; + */ + public java.lang.String getUserPhoto() { + java.lang.Object ref = userPhoto_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPhoto_ = s; + return s; + } + } + /** + *
+     *用户头像(选填)
+     * 
+ * + * string user_photo = 4; + */ + public com.google.protobuf.ByteString + getUserPhotoBytes() { + java.lang.Object ref = userPhoto_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userPhoto_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUSH_TOKEN_FIELD_NUMBER = 5; + private volatile java.lang.Object pushToken_; + /** + *
+     *客户端接受PUSH需要的token
+     * 
+ * + * string push_token = 5; + */ + public java.lang.String getPushToken() { + java.lang.Object ref = pushToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushToken_ = s; + return s; + } + } + /** + *
+     *客户端接受PUSH需要的token
+     * 
+ * + * string push_token = 5; + */ + public com.google.protobuf.ByteString + getPushTokenBytes() { + java.lang.Object ref = pushToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PHONE_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object phoneId_; + /** + *
+     *增加用户可以设置用户ID(只允许字符串,数字组成6~20位)
+     * 
+ * + * string phone_id = 6; + */ + public java.lang.String getPhoneId() { + java.lang.Object ref = phoneId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phoneId_ = s; + return s; + } + } + /** + *
+     *增加用户可以设置用户ID(只允许字符串,数字组成6~20位)
+     * 
+ * + * string phone_id = 6; + */ + public com.google.protobuf.ByteString + getPhoneIdBytes() { + java.lang.Object ref = phoneId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + phoneId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COUNTRY_CODE_FIELD_NUMBER = 7; + private volatile java.lang.Object countryCode_; + /** + *
+     *+86
+     * 
+ * + * string country_code = 7; + */ + public java.lang.String getCountryCode() { + java.lang.Object ref = countryCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + countryCode_ = s; + return s; + } + } + /** + *
+     *+86
+     * 
+ * + * string country_code = 7; + */ + public com.google.protobuf.ByteString + getCountryCodeBytes() { + java.lang.Object ref = countryCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + countryCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PHONE_VERIFY_CODE_FIELD_NUMBER = 8; + private volatile java.lang.Object phoneVerifyCode_; + /** + *
+     *短信验证码
+     * 
+ * + * string phone_verify_code = 8; + */ + public java.lang.String getPhoneVerifyCode() { + java.lang.Object ref = phoneVerifyCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phoneVerifyCode_ = s; + return s; + } + } + /** + *
+     *短信验证码
+     * 
+ * + * string phone_verify_code = 8; + */ + public com.google.protobuf.ByteString + getPhoneVerifyCodeBytes() { + java.lang.Object ref = phoneVerifyCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + phoneVerifyCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VC_TYPE_FIELD_NUMBER = 9; + private int vcType_; + /** + *
+     *短信验证码类型
+     * 
+ * + * int32 vc_type = 9; + */ + public int getVcType() { + return vcType_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getUserIdPrikBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userIdPrik_); + } + if (!getUserIdPubkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userIdPubk_); + } + if (!getUserNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userName_); + } + if (!getUserPhotoBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, userPhoto_); + } + if (!getPushTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pushToken_); + } + if (!getPhoneIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, phoneId_); + } + if (!getCountryCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, countryCode_); + } + if (!getPhoneVerifyCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, phoneVerifyCode_); + } + if (vcType_ != 0) { + output.writeInt32(9, vcType_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUserIdPrikBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userIdPrik_); + } + if (!getUserIdPubkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, userIdPubk_); + } + if (!getUserNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userName_); + } + if (!getUserPhotoBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, userPhoto_); + } + if (!getPushTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pushToken_); + } + if (!getPhoneIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, phoneId_); + } + if (!getCountryCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, countryCode_); + } + if (!getPhoneVerifyCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, phoneVerifyCode_); + } + if (vcType_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(9, vcType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest other = (com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest) obj; + + boolean result = true; + result = result && getUserIdPrik() + .equals(other.getUserIdPrik()); + result = result && getUserIdPubk() + .equals(other.getUserIdPubk()); + result = result && getUserName() + .equals(other.getUserName()); + result = result && getUserPhoto() + .equals(other.getUserPhoto()); + result = result && getPushToken() + .equals(other.getPushToken()); + result = result && getPhoneId() + .equals(other.getPhoneId()); + result = result && getCountryCode() + .equals(other.getCountryCode()); + result = result && getPhoneVerifyCode() + .equals(other.getPhoneVerifyCode()); + result = result && (getVcType() + == other.getVcType()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USER_ID_PRIK_FIELD_NUMBER; + hash = (53 * hash) + getUserIdPrik().hashCode(); + hash = (37 * hash) + USER_ID_PUBK_FIELD_NUMBER; + hash = (53 * hash) + getUserIdPubk().hashCode(); + hash = (37 * hash) + USER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getUserName().hashCode(); + hash = (37 * hash) + USER_PHOTO_FIELD_NUMBER; + hash = (53 * hash) + getUserPhoto().hashCode(); + hash = (37 * hash) + PUSH_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPushToken().hashCode(); + hash = (37 * hash) + PHONE_ID_FIELD_NUMBER; + hash = (53 * hash) + getPhoneId().hashCode(); + hash = (37 * hash) + COUNTRY_CODE_FIELD_NUMBER; + hash = (53 * hash) + getCountryCode().hashCode(); + hash = (37 * hash) + PHONE_VERIFY_CODE_FIELD_NUMBER; + hash = (53 * hash) + getPhoneVerifyCode().hashCode(); + hash = (37 * hash) + VC_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getVcType(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiPlatformRegisterByPhoneRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiPlatformRegisterByPhoneRequest) + com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.internal_static_site_ApiPlatformRegisterByPhoneRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.internal_static_site_ApiPlatformRegisterByPhoneRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest.class, com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + userIdPrik_ = ""; + + userIdPubk_ = ""; + + userName_ = ""; + + userPhoto_ = ""; + + pushToken_ = ""; + + phoneId_ = ""; + + countryCode_ = ""; + + phoneVerifyCode_ = ""; + + vcType_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.internal_static_site_ApiPlatformRegisterByPhoneRequest_descriptor; + } + + public com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest build() { + com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest buildPartial() { + com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest result = new com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest(this); + result.userIdPrik_ = userIdPrik_; + result.userIdPubk_ = userIdPubk_; + result.userName_ = userName_; + result.userPhoto_ = userPhoto_; + result.pushToken_ = pushToken_; + result.phoneId_ = phoneId_; + result.countryCode_ = countryCode_; + result.phoneVerifyCode_ = phoneVerifyCode_; + result.vcType_ = vcType_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest) { + return mergeFrom((com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest other) { + if (other == com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest.getDefaultInstance()) return this; + if (!other.getUserIdPrik().isEmpty()) { + userIdPrik_ = other.userIdPrik_; + onChanged(); + } + if (!other.getUserIdPubk().isEmpty()) { + userIdPubk_ = other.userIdPubk_; + onChanged(); + } + if (!other.getUserName().isEmpty()) { + userName_ = other.userName_; + onChanged(); + } + if (!other.getUserPhoto().isEmpty()) { + userPhoto_ = other.userPhoto_; + onChanged(); + } + if (!other.getPushToken().isEmpty()) { + pushToken_ = other.pushToken_; + onChanged(); + } + if (!other.getPhoneId().isEmpty()) { + phoneId_ = other.phoneId_; + onChanged(); + } + if (!other.getCountryCode().isEmpty()) { + countryCode_ = other.countryCode_; + onChanged(); + } + if (!other.getPhoneVerifyCode().isEmpty()) { + phoneVerifyCode_ = other.phoneVerifyCode_; + onChanged(); + } + if (other.getVcType() != 0) { + setVcType(other.getVcType()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object userIdPrik_ = ""; + /** + *
+       *用户身份私钥
+       * 
+ * + * string user_id_prik = 1; + */ + public java.lang.String getUserIdPrik() { + java.lang.Object ref = userIdPrik_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPrik_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户身份私钥
+       * 
+ * + * string user_id_prik = 1; + */ + public com.google.protobuf.ByteString + getUserIdPrikBytes() { + java.lang.Object ref = userIdPrik_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPrik_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户身份私钥
+       * 
+ * + * string user_id_prik = 1; + */ + public Builder setUserIdPrik( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userIdPrik_ = value; + onChanged(); + return this; + } + /** + *
+       *用户身份私钥
+       * 
+ * + * string user_id_prik = 1; + */ + public Builder clearUserIdPrik() { + + userIdPrik_ = getDefaultInstance().getUserIdPrik(); + onChanged(); + return this; + } + /** + *
+       *用户身份私钥
+       * 
+ * + * string user_id_prik = 1; + */ + public Builder setUserIdPrikBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userIdPrik_ = value; + onChanged(); + return this; + } + + private java.lang.Object userIdPubk_ = ""; + /** + *
+       *用户身份公钥
+       * 
+ * + * string user_id_pubk = 2; + */ + public java.lang.String getUserIdPubk() { + java.lang.Object ref = userIdPubk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPubk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户身份公钥
+       * 
+ * + * string user_id_pubk = 2; + */ + public com.google.protobuf.ByteString + getUserIdPubkBytes() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户身份公钥
+       * 
+ * + * string user_id_pubk = 2; + */ + public Builder setUserIdPubk( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userIdPubk_ = value; + onChanged(); + return this; + } + /** + *
+       *用户身份公钥
+       * 
+ * + * string user_id_pubk = 2; + */ + public Builder clearUserIdPubk() { + + userIdPubk_ = getDefaultInstance().getUserIdPubk(); + onChanged(); + return this; + } + /** + *
+       *用户身份公钥
+       * 
+ * + * string user_id_pubk = 2; + */ + public Builder setUserIdPubkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userIdPubk_ = value; + onChanged(); + return this; + } + + private java.lang.Object userName_ = ""; + /** + *
+       *用户名(选填)
+       * 
+ * + * string user_name = 3; + */ + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户名(选填)
+       * 
+ * + * string user_name = 3; + */ + public com.google.protobuf.ByteString + getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户名(选填)
+       * 
+ * + * string user_name = 3; + */ + public Builder setUserName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userName_ = value; + onChanged(); + return this; + } + /** + *
+       *用户名(选填)
+       * 
+ * + * string user_name = 3; + */ + public Builder clearUserName() { + + userName_ = getDefaultInstance().getUserName(); + onChanged(); + return this; + } + /** + *
+       *用户名(选填)
+       * 
+ * + * string user_name = 3; + */ + public Builder setUserNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userName_ = value; + onChanged(); + return this; + } + + private java.lang.Object userPhoto_ = ""; + /** + *
+       *用户头像(选填)
+       * 
+ * + * string user_photo = 4; + */ + public java.lang.String getUserPhoto() { + java.lang.Object ref = userPhoto_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPhoto_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户头像(选填)
+       * 
+ * + * string user_photo = 4; + */ + public com.google.protobuf.ByteString + getUserPhotoBytes() { + java.lang.Object ref = userPhoto_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userPhoto_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户头像(选填)
+       * 
+ * + * string user_photo = 4; + */ + public Builder setUserPhoto( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userPhoto_ = value; + onChanged(); + return this; + } + /** + *
+       *用户头像(选填)
+       * 
+ * + * string user_photo = 4; + */ + public Builder clearUserPhoto() { + + userPhoto_ = getDefaultInstance().getUserPhoto(); + onChanged(); + return this; + } + /** + *
+       *用户头像(选填)
+       * 
+ * + * string user_photo = 4; + */ + public Builder setUserPhotoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userPhoto_ = value; + onChanged(); + return this; + } + + private java.lang.Object pushToken_ = ""; + /** + *
+       *客户端接受PUSH需要的token
+       * 
+ * + * string push_token = 5; + */ + public java.lang.String getPushToken() { + java.lang.Object ref = pushToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *客户端接受PUSH需要的token
+       * 
+ * + * string push_token = 5; + */ + public com.google.protobuf.ByteString + getPushTokenBytes() { + java.lang.Object ref = pushToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *客户端接受PUSH需要的token
+       * 
+ * + * string push_token = 5; + */ + public Builder setPushToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pushToken_ = value; + onChanged(); + return this; + } + /** + *
+       *客户端接受PUSH需要的token
+       * 
+ * + * string push_token = 5; + */ + public Builder clearPushToken() { + + pushToken_ = getDefaultInstance().getPushToken(); + onChanged(); + return this; + } + /** + *
+       *客户端接受PUSH需要的token
+       * 
+ * + * string push_token = 5; + */ + public Builder setPushTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pushToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object phoneId_ = ""; + /** + *
+       *增加用户可以设置用户ID(只允许字符串,数字组成6~20位)
+       * 
+ * + * string phone_id = 6; + */ + public java.lang.String getPhoneId() { + java.lang.Object ref = phoneId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phoneId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *增加用户可以设置用户ID(只允许字符串,数字组成6~20位)
+       * 
+ * + * string phone_id = 6; + */ + public com.google.protobuf.ByteString + getPhoneIdBytes() { + java.lang.Object ref = phoneId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + phoneId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *增加用户可以设置用户ID(只允许字符串,数字组成6~20位)
+       * 
+ * + * string phone_id = 6; + */ + public Builder setPhoneId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + phoneId_ = value; + onChanged(); + return this; + } + /** + *
+       *增加用户可以设置用户ID(只允许字符串,数字组成6~20位)
+       * 
+ * + * string phone_id = 6; + */ + public Builder clearPhoneId() { + + phoneId_ = getDefaultInstance().getPhoneId(); + onChanged(); + return this; + } + /** + *
+       *增加用户可以设置用户ID(只允许字符串,数字组成6~20位)
+       * 
+ * + * string phone_id = 6; + */ + public Builder setPhoneIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + phoneId_ = value; + onChanged(); + return this; + } + + private java.lang.Object countryCode_ = ""; + /** + *
+       *+86
+       * 
+ * + * string country_code = 7; + */ + public java.lang.String getCountryCode() { + java.lang.Object ref = countryCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + countryCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *+86
+       * 
+ * + * string country_code = 7; + */ + public com.google.protobuf.ByteString + getCountryCodeBytes() { + java.lang.Object ref = countryCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + countryCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *+86
+       * 
+ * + * string country_code = 7; + */ + public Builder setCountryCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + countryCode_ = value; + onChanged(); + return this; + } + /** + *
+       *+86
+       * 
+ * + * string country_code = 7; + */ + public Builder clearCountryCode() { + + countryCode_ = getDefaultInstance().getCountryCode(); + onChanged(); + return this; + } + /** + *
+       *+86
+       * 
+ * + * string country_code = 7; + */ + public Builder setCountryCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + countryCode_ = value; + onChanged(); + return this; + } + + private java.lang.Object phoneVerifyCode_ = ""; + /** + *
+       *短信验证码
+       * 
+ * + * string phone_verify_code = 8; + */ + public java.lang.String getPhoneVerifyCode() { + java.lang.Object ref = phoneVerifyCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phoneVerifyCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *短信验证码
+       * 
+ * + * string phone_verify_code = 8; + */ + public com.google.protobuf.ByteString + getPhoneVerifyCodeBytes() { + java.lang.Object ref = phoneVerifyCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + phoneVerifyCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *短信验证码
+       * 
+ * + * string phone_verify_code = 8; + */ + public Builder setPhoneVerifyCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + phoneVerifyCode_ = value; + onChanged(); + return this; + } + /** + *
+       *短信验证码
+       * 
+ * + * string phone_verify_code = 8; + */ + public Builder clearPhoneVerifyCode() { + + phoneVerifyCode_ = getDefaultInstance().getPhoneVerifyCode(); + onChanged(); + return this; + } + /** + *
+       *短信验证码
+       * 
+ * + * string phone_verify_code = 8; + */ + public Builder setPhoneVerifyCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + phoneVerifyCode_ = value; + onChanged(); + return this; + } + + private int vcType_ ; + /** + *
+       *短信验证码类型
+       * 
+ * + * int32 vc_type = 9; + */ + public int getVcType() { + return vcType_; + } + /** + *
+       *短信验证码类型
+       * 
+ * + * int32 vc_type = 9; + */ + public Builder setVcType(int value) { + + vcType_ = value; + onChanged(); + return this; + } + /** + *
+       *短信验证码类型
+       * 
+ * + * int32 vc_type = 9; + */ + public Builder clearVcType() { + + vcType_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiPlatformRegisterByPhoneRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiPlatformRegisterByPhoneRequest) + private static final com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest(); + } + + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiPlatformRegisterByPhoneRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiPlatformRegisterByPhoneRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiPlatformRegisterByPhoneResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiPlatformRegisterByPhoneResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户身份私钥
+     * 
+ * + * string user_id_prik = 1; + */ + java.lang.String getUserIdPrik(); + /** + *
+     *用户身份私钥
+     * 
+ * + * string user_id_prik = 1; + */ + com.google.protobuf.ByteString + getUserIdPrikBytes(); + + /** + *
+     *用户身份公钥
+     * 
+ * + * string user_id_pubk = 2; + */ + java.lang.String getUserIdPubk(); + /** + *
+     *用户身份公钥
+     * 
+ * + * string user_id_pubk = 2; + */ + com.google.protobuf.ByteString + getUserIdPubkBytes(); + } + /** + * Protobuf type {@code site.ApiPlatformRegisterByPhoneResponse} + */ + public static final class ApiPlatformRegisterByPhoneResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiPlatformRegisterByPhoneResponse) + ApiPlatformRegisterByPhoneResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiPlatformRegisterByPhoneResponse.newBuilder() to construct. + private ApiPlatformRegisterByPhoneResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiPlatformRegisterByPhoneResponse() { + userIdPrik_ = ""; + userIdPubk_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiPlatformRegisterByPhoneResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + userIdPrik_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + userIdPubk_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.internal_static_site_ApiPlatformRegisterByPhoneResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.internal_static_site_ApiPlatformRegisterByPhoneResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse.class, com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse.Builder.class); + } + + public static final int USER_ID_PRIK_FIELD_NUMBER = 1; + private volatile java.lang.Object userIdPrik_; + /** + *
+     *用户身份私钥
+     * 
+ * + * string user_id_prik = 1; + */ + public java.lang.String getUserIdPrik() { + java.lang.Object ref = userIdPrik_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPrik_ = s; + return s; + } + } + /** + *
+     *用户身份私钥
+     * 
+ * + * string user_id_prik = 1; + */ + public com.google.protobuf.ByteString + getUserIdPrikBytes() { + java.lang.Object ref = userIdPrik_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPrik_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_PUBK_FIELD_NUMBER = 2; + private volatile java.lang.Object userIdPubk_; + /** + *
+     *用户身份公钥
+     * 
+ * + * string user_id_pubk = 2; + */ + public java.lang.String getUserIdPubk() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPubk_ = s; + return s; + } + } + /** + *
+     *用户身份公钥
+     * 
+ * + * string user_id_pubk = 2; + */ + public com.google.protobuf.ByteString + getUserIdPubkBytes() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getUserIdPrikBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userIdPrik_); + } + if (!getUserIdPubkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userIdPubk_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUserIdPrikBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userIdPrik_); + } + if (!getUserIdPubkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, userIdPubk_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse other = (com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse) obj; + + boolean result = true; + result = result && getUserIdPrik() + .equals(other.getUserIdPrik()); + result = result && getUserIdPubk() + .equals(other.getUserIdPubk()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USER_ID_PRIK_FIELD_NUMBER; + hash = (53 * hash) + getUserIdPrik().hashCode(); + hash = (37 * hash) + USER_ID_PUBK_FIELD_NUMBER; + hash = (53 * hash) + getUserIdPubk().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiPlatformRegisterByPhoneResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiPlatformRegisterByPhoneResponse) + com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.internal_static_site_ApiPlatformRegisterByPhoneResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.internal_static_site_ApiPlatformRegisterByPhoneResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse.class, com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + userIdPrik_ = ""; + + userIdPubk_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.internal_static_site_ApiPlatformRegisterByPhoneResponse_descriptor; + } + + public com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse build() { + com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse buildPartial() { + com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse result = new com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse(this); + result.userIdPrik_ = userIdPrik_; + result.userIdPubk_ = userIdPubk_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse) { + return mergeFrom((com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse other) { + if (other == com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse.getDefaultInstance()) return this; + if (!other.getUserIdPrik().isEmpty()) { + userIdPrik_ = other.userIdPrik_; + onChanged(); + } + if (!other.getUserIdPubk().isEmpty()) { + userIdPubk_ = other.userIdPubk_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object userIdPrik_ = ""; + /** + *
+       *用户身份私钥
+       * 
+ * + * string user_id_prik = 1; + */ + public java.lang.String getUserIdPrik() { + java.lang.Object ref = userIdPrik_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPrik_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户身份私钥
+       * 
+ * + * string user_id_prik = 1; + */ + public com.google.protobuf.ByteString + getUserIdPrikBytes() { + java.lang.Object ref = userIdPrik_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPrik_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户身份私钥
+       * 
+ * + * string user_id_prik = 1; + */ + public Builder setUserIdPrik( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userIdPrik_ = value; + onChanged(); + return this; + } + /** + *
+       *用户身份私钥
+       * 
+ * + * string user_id_prik = 1; + */ + public Builder clearUserIdPrik() { + + userIdPrik_ = getDefaultInstance().getUserIdPrik(); + onChanged(); + return this; + } + /** + *
+       *用户身份私钥
+       * 
+ * + * string user_id_prik = 1; + */ + public Builder setUserIdPrikBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userIdPrik_ = value; + onChanged(); + return this; + } + + private java.lang.Object userIdPubk_ = ""; + /** + *
+       *用户身份公钥
+       * 
+ * + * string user_id_pubk = 2; + */ + public java.lang.String getUserIdPubk() { + java.lang.Object ref = userIdPubk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPubk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户身份公钥
+       * 
+ * + * string user_id_pubk = 2; + */ + public com.google.protobuf.ByteString + getUserIdPubkBytes() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户身份公钥
+       * 
+ * + * string user_id_pubk = 2; + */ + public Builder setUserIdPubk( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userIdPubk_ = value; + onChanged(); + return this; + } + /** + *
+       *用户身份公钥
+       * 
+ * + * string user_id_pubk = 2; + */ + public Builder clearUserIdPubk() { + + userIdPubk_ = getDefaultInstance().getUserIdPubk(); + onChanged(); + return this; + } + /** + *
+       *用户身份公钥
+       * 
+ * + * string user_id_pubk = 2; + */ + public Builder setUserIdPubkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userIdPubk_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiPlatformRegisterByPhoneResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiPlatformRegisterByPhoneResponse) + private static final com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse(); + } + + public static com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiPlatformRegisterByPhoneResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiPlatformRegisterByPhoneResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiPlatformRegisterByPhoneProto.ApiPlatformRegisterByPhoneResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiPlatformRegisterByPhoneRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiPlatformRegisterByPhoneRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiPlatformRegisterByPhoneResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiPlatformRegisterByPhoneResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n+platform/api_platform_registerByPhone." + + "proto\022\004site\"\336\001\n!ApiPlatformRegisterByPho" + + "neRequest\022\024\n\014user_id_prik\030\001 \001(\t\022\024\n\014user_" + + "id_pubk\030\002 \001(\t\022\021\n\tuser_name\030\003 \001(\t\022\022\n\nuser" + + "_photo\030\004 \001(\t\022\022\n\npush_token\030\005 \001(\t\022\020\n\010phon" + + "e_id\030\006 \001(\t\022\024\n\014country_code\030\007 \001(\t\022\031\n\021phon" + + "e_verify_code\030\010 \001(\t\022\017\n\007vc_type\030\t \001(\005\"P\n\"" + + "ApiPlatformRegisterByPhoneResponse\022\024\n\014us" + + "er_id_prik\030\001 \001(\t\022\024\n\014user_id_pubk\030\002 \001(\t2\211" + + "\001\n!ApiPlatformRegisterByPhoneService\022d\n\017" + + "registerByPhone\022\'.site.ApiPlatformRegist" + + "erByPhoneRequest\032(.site.ApiPlatformRegis" + + "terByPhoneResponseB8\n\025com.akaxin.proto.s" + + "iteB\037ApiPlatformRegisterByPhoneProtob\006pr" + + "oto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiPlatformRegisterByPhoneRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiPlatformRegisterByPhoneRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiPlatformRegisterByPhoneRequest_descriptor, + new java.lang.String[] { "UserIdPrik", "UserIdPubk", "UserName", "UserPhoto", "PushToken", "PhoneId", "CountryCode", "PhoneVerifyCode", "VcType", }); + internal_static_site_ApiPlatformRegisterByPhoneResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiPlatformRegisterByPhoneResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiPlatformRegisterByPhoneResponse_descriptor, + new java.lang.String[] { "UserIdPrik", "UserIdPubk", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiPluginDeleteProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiPluginDeleteProto.java new file mode 100755 index 0000000..e6768e2 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiPluginDeleteProto.java @@ -0,0 +1,1019 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_plugin_delete.proto + +package com.akaxin.proto.site; + +public final class ApiPluginDeleteProto { + private ApiPluginDeleteProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiPluginDeleteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiPluginDeleteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *需要删除的插件ID
+     * 
+ * + * string plugin_id = 1; + */ + java.lang.String getPluginId(); + /** + *
+     *需要删除的插件ID
+     * 
+ * + * string plugin_id = 1; + */ + com.google.protobuf.ByteString + getPluginIdBytes(); + } + /** + * Protobuf type {@code site.ApiPluginDeleteRequest} + */ + public static final class ApiPluginDeleteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiPluginDeleteRequest) + ApiPluginDeleteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiPluginDeleteRequest.newBuilder() to construct. + private ApiPluginDeleteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiPluginDeleteRequest() { + pluginId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiPluginDeleteRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + pluginId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPluginDeleteProto.internal_static_site_ApiPluginDeleteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPluginDeleteProto.internal_static_site_ApiPluginDeleteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest.class, com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest.Builder.class); + } + + public static final int PLUGIN_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object pluginId_; + /** + *
+     *需要删除的插件ID
+     * 
+ * + * string plugin_id = 1; + */ + public java.lang.String getPluginId() { + java.lang.Object ref = pluginId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pluginId_ = s; + return s; + } + } + /** + *
+     *需要删除的插件ID
+     * 
+ * + * string plugin_id = 1; + */ + public com.google.protobuf.ByteString + getPluginIdBytes() { + java.lang.Object ref = pluginId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pluginId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getPluginIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pluginId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPluginIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pluginId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest other = (com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest) obj; + + boolean result = true; + result = result && getPluginId() + .equals(other.getPluginId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PLUGIN_ID_FIELD_NUMBER; + hash = (53 * hash) + getPluginId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiPluginDeleteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiPluginDeleteRequest) + com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPluginDeleteProto.internal_static_site_ApiPluginDeleteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPluginDeleteProto.internal_static_site_ApiPluginDeleteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest.class, com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + pluginId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiPluginDeleteProto.internal_static_site_ApiPluginDeleteRequest_descriptor; + } + + public com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest build() { + com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest buildPartial() { + com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest result = new com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest(this); + result.pluginId_ = pluginId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest) { + return mergeFrom((com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest other) { + if (other == com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest.getDefaultInstance()) return this; + if (!other.getPluginId().isEmpty()) { + pluginId_ = other.pluginId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object pluginId_ = ""; + /** + *
+       *需要删除的插件ID
+       * 
+ * + * string plugin_id = 1; + */ + public java.lang.String getPluginId() { + java.lang.Object ref = pluginId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pluginId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *需要删除的插件ID
+       * 
+ * + * string plugin_id = 1; + */ + public com.google.protobuf.ByteString + getPluginIdBytes() { + java.lang.Object ref = pluginId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pluginId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *需要删除的插件ID
+       * 
+ * + * string plugin_id = 1; + */ + public Builder setPluginId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pluginId_ = value; + onChanged(); + return this; + } + /** + *
+       *需要删除的插件ID
+       * 
+ * + * string plugin_id = 1; + */ + public Builder clearPluginId() { + + pluginId_ = getDefaultInstance().getPluginId(); + onChanged(); + return this; + } + /** + *
+       *需要删除的插件ID
+       * 
+ * + * string plugin_id = 1; + */ + public Builder setPluginIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pluginId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiPluginDeleteRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiPluginDeleteRequest) + private static final com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest(); + } + + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiPluginDeleteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiPluginDeleteRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiPluginDeleteResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiPluginDeleteResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiPluginDeleteResponse} + */ + public static final class ApiPluginDeleteResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiPluginDeleteResponse) + ApiPluginDeleteResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiPluginDeleteResponse.newBuilder() to construct. + private ApiPluginDeleteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiPluginDeleteResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiPluginDeleteResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPluginDeleteProto.internal_static_site_ApiPluginDeleteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPluginDeleteProto.internal_static_site_ApiPluginDeleteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse.class, com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse other = (com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiPluginDeleteResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiPluginDeleteResponse) + com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPluginDeleteProto.internal_static_site_ApiPluginDeleteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPluginDeleteProto.internal_static_site_ApiPluginDeleteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse.class, com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiPluginDeleteProto.internal_static_site_ApiPluginDeleteResponse_descriptor; + } + + public com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse build() { + com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse buildPartial() { + com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse result = new com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse) { + return mergeFrom((com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse other) { + if (other == com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiPluginDeleteResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiPluginDeleteResponse) + private static final com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse(); + } + + public static com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiPluginDeleteResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiPluginDeleteResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiPluginDeleteProto.ApiPluginDeleteResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiPluginDeleteRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiPluginDeleteRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiPluginDeleteResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiPluginDeleteResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034site/api_plugin_delete.proto\022\004site\"+\n\026" + + "ApiPluginDeleteRequest\022\021\n\tplugin_id\030\001 \001(" + + "\t\"\031\n\027ApiPluginDeleteResponse2_\n\026ApiPlugi" + + "nDeleteService\022E\n\006delete\022\034.site.ApiPlugi" + + "nDeleteRequest\032\035.site.ApiPluginDeleteRes" + + "ponseB-\n\025com.akaxin.proto.siteB\024ApiPlugi" + + "nDeleteProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiPluginDeleteRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiPluginDeleteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiPluginDeleteRequest_descriptor, + new java.lang.String[] { "PluginId", }); + internal_static_site_ApiPluginDeleteResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiPluginDeleteResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiPluginDeleteResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiPluginListProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiPluginListProto.java new file mode 100755 index 0000000..6485007 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiPluginListProto.java @@ -0,0 +1,1626 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_plugin_list.proto + +package com.akaxin.proto.site; + +public final class ApiPluginListProto { + private ApiPluginListProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiPluginListRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiPluginListRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *分页:第几页
+     * 
+ * + * int32 page_number = 1; + */ + int getPageNumber(); + + /** + *
+     *分页:每页条数
+     * 
+ * + * int32 page_size = 2; + */ + int getPageSize(); + + /** + *
+     *查询扩展的状态
+     * 
+ * + * .core.PluginPosition position = 3; + */ + int getPositionValue(); + /** + *
+     *查询扩展的状态
+     * 
+ * + * .core.PluginPosition position = 3; + */ + com.akaxin.proto.core.PluginProto.PluginPosition getPosition(); + } + /** + * Protobuf type {@code site.ApiPluginListRequest} + */ + public static final class ApiPluginListRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiPluginListRequest) + ApiPluginListRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiPluginListRequest.newBuilder() to construct. + private ApiPluginListRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiPluginListRequest() { + pageNumber_ = 0; + pageSize_ = 0; + position_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiPluginListRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + pageNumber_ = input.readInt32(); + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 24: { + int rawValue = input.readEnum(); + + position_ = rawValue; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPluginListProto.internal_static_site_ApiPluginListRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPluginListProto.internal_static_site_ApiPluginListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest.class, com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest.Builder.class); + } + + public static final int PAGE_NUMBER_FIELD_NUMBER = 1; + private int pageNumber_; + /** + *
+     *分页:第几页
+     * 
+ * + * int32 page_number = 1; + */ + public int getPageNumber() { + return pageNumber_; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+     *分页:每页条数
+     * 
+ * + * int32 page_size = 2; + */ + public int getPageSize() { + return pageSize_; + } + + public static final int POSITION_FIELD_NUMBER = 3; + private int position_; + /** + *
+     *查询扩展的状态
+     * 
+ * + * .core.PluginPosition position = 3; + */ + public int getPositionValue() { + return position_; + } + /** + *
+     *查询扩展的状态
+     * 
+ * + * .core.PluginPosition position = 3; + */ + public com.akaxin.proto.core.PluginProto.PluginPosition getPosition() { + com.akaxin.proto.core.PluginProto.PluginPosition result = com.akaxin.proto.core.PluginProto.PluginPosition.valueOf(position_); + return result == null ? com.akaxin.proto.core.PluginProto.PluginPosition.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (pageNumber_ != 0) { + output.writeInt32(1, pageNumber_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (position_ != com.akaxin.proto.core.PluginProto.PluginPosition.HOME_PAGE.getNumber()) { + output.writeEnum(3, position_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pageNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, pageNumber_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (position_ != com.akaxin.proto.core.PluginProto.PluginPosition.HOME_PAGE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, position_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest other = (com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest) obj; + + boolean result = true; + result = result && (getPageNumber() + == other.getPageNumber()); + result = result && (getPageSize() + == other.getPageSize()); + result = result && position_ == other.position_; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getPageNumber(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + POSITION_FIELD_NUMBER; + hash = (53 * hash) + position_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiPluginListRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiPluginListRequest) + com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPluginListProto.internal_static_site_ApiPluginListRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPluginListProto.internal_static_site_ApiPluginListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest.class, com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + pageNumber_ = 0; + + pageSize_ = 0; + + position_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiPluginListProto.internal_static_site_ApiPluginListRequest_descriptor; + } + + public com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest build() { + com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest buildPartial() { + com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest result = new com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest(this); + result.pageNumber_ = pageNumber_; + result.pageSize_ = pageSize_; + result.position_ = position_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest) { + return mergeFrom((com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest other) { + if (other == com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest.getDefaultInstance()) return this; + if (other.getPageNumber() != 0) { + setPageNumber(other.getPageNumber()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (other.position_ != 0) { + setPositionValue(other.getPositionValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int pageNumber_ ; + /** + *
+       *分页:第几页
+       * 
+ * + * int32 page_number = 1; + */ + public int getPageNumber() { + return pageNumber_; + } + /** + *
+       *分页:第几页
+       * 
+ * + * int32 page_number = 1; + */ + public Builder setPageNumber(int value) { + + pageNumber_ = value; + onChanged(); + return this; + } + /** + *
+       *分页:第几页
+       * 
+ * + * int32 page_number = 1; + */ + public Builder clearPageNumber() { + + pageNumber_ = 0; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+       *分页:每页条数
+       * 
+ * + * int32 page_size = 2; + */ + public int getPageSize() { + return pageSize_; + } + /** + *
+       *分页:每页条数
+       * 
+ * + * int32 page_size = 2; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+       *分页:每页条数
+       * 
+ * + * int32 page_size = 2; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private int position_ = 0; + /** + *
+       *查询扩展的状态
+       * 
+ * + * .core.PluginPosition position = 3; + */ + public int getPositionValue() { + return position_; + } + /** + *
+       *查询扩展的状态
+       * 
+ * + * .core.PluginPosition position = 3; + */ + public Builder setPositionValue(int value) { + position_ = value; + onChanged(); + return this; + } + /** + *
+       *查询扩展的状态
+       * 
+ * + * .core.PluginPosition position = 3; + */ + public com.akaxin.proto.core.PluginProto.PluginPosition getPosition() { + com.akaxin.proto.core.PluginProto.PluginPosition result = com.akaxin.proto.core.PluginProto.PluginPosition.valueOf(position_); + return result == null ? com.akaxin.proto.core.PluginProto.PluginPosition.UNRECOGNIZED : result; + } + /** + *
+       *查询扩展的状态
+       * 
+ * + * .core.PluginPosition position = 3; + */ + public Builder setPosition(com.akaxin.proto.core.PluginProto.PluginPosition value) { + if (value == null) { + throw new NullPointerException(); + } + + position_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       *查询扩展的状态
+       * 
+ * + * .core.PluginPosition position = 3; + */ + public Builder clearPosition() { + + position_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiPluginListRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiPluginListRequest) + private static final com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest(); + } + + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiPluginListRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiPluginListRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiPluginListProto.ApiPluginListRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiPluginListResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiPluginListResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *获取插件列表数据
+     * 
+ * + * repeated .core.Plugin plugin = 1; + */ + java.util.List + getPluginList(); + /** + *
+     *获取插件列表数据
+     * 
+ * + * repeated .core.Plugin plugin = 1; + */ + com.akaxin.proto.core.PluginProto.Plugin getPlugin(int index); + /** + *
+     *获取插件列表数据
+     * 
+ * + * repeated .core.Plugin plugin = 1; + */ + int getPluginCount(); + /** + *
+     *获取插件列表数据
+     * 
+ * + * repeated .core.Plugin plugin = 1; + */ + java.util.List + getPluginOrBuilderList(); + /** + *
+     *获取插件列表数据
+     * 
+ * + * repeated .core.Plugin plugin = 1; + */ + com.akaxin.proto.core.PluginProto.PluginOrBuilder getPluginOrBuilder( + int index); + } + /** + * Protobuf type {@code site.ApiPluginListResponse} + */ + public static final class ApiPluginListResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiPluginListResponse) + ApiPluginListResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiPluginListResponse.newBuilder() to construct. + private ApiPluginListResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiPluginListResponse() { + plugin_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiPluginListResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + plugin_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + plugin_.add( + input.readMessage(com.akaxin.proto.core.PluginProto.Plugin.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + plugin_ = java.util.Collections.unmodifiableList(plugin_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPluginListProto.internal_static_site_ApiPluginListResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPluginListProto.internal_static_site_ApiPluginListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse.class, com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse.Builder.class); + } + + public static final int PLUGIN_FIELD_NUMBER = 1; + private java.util.List plugin_; + /** + *
+     *获取插件列表数据
+     * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public java.util.List getPluginList() { + return plugin_; + } + /** + *
+     *获取插件列表数据
+     * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public java.util.List + getPluginOrBuilderList() { + return plugin_; + } + /** + *
+     *获取插件列表数据
+     * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public int getPluginCount() { + return plugin_.size(); + } + /** + *
+     *获取插件列表数据
+     * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public com.akaxin.proto.core.PluginProto.Plugin getPlugin(int index) { + return plugin_.get(index); + } + /** + *
+     *获取插件列表数据
+     * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public com.akaxin.proto.core.PluginProto.PluginOrBuilder getPluginOrBuilder( + int index) { + return plugin_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < plugin_.size(); i++) { + output.writeMessage(1, plugin_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < plugin_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, plugin_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse other = (com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse) obj; + + boolean result = true; + result = result && getPluginList() + .equals(other.getPluginList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPluginCount() > 0) { + hash = (37 * hash) + PLUGIN_FIELD_NUMBER; + hash = (53 * hash) + getPluginList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiPluginListResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiPluginListResponse) + com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPluginListProto.internal_static_site_ApiPluginListResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPluginListProto.internal_static_site_ApiPluginListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse.class, com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPluginFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (pluginBuilder_ == null) { + plugin_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + pluginBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiPluginListProto.internal_static_site_ApiPluginListResponse_descriptor; + } + + public com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse build() { + com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse buildPartial() { + com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse result = new com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse(this); + int from_bitField0_ = bitField0_; + if (pluginBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + plugin_ = java.util.Collections.unmodifiableList(plugin_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.plugin_ = plugin_; + } else { + result.plugin_ = pluginBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse) { + return mergeFrom((com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse other) { + if (other == com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse.getDefaultInstance()) return this; + if (pluginBuilder_ == null) { + if (!other.plugin_.isEmpty()) { + if (plugin_.isEmpty()) { + plugin_ = other.plugin_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePluginIsMutable(); + plugin_.addAll(other.plugin_); + } + onChanged(); + } + } else { + if (!other.plugin_.isEmpty()) { + if (pluginBuilder_.isEmpty()) { + pluginBuilder_.dispose(); + pluginBuilder_ = null; + plugin_ = other.plugin_; + bitField0_ = (bitField0_ & ~0x00000001); + pluginBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPluginFieldBuilder() : null; + } else { + pluginBuilder_.addAllMessages(other.plugin_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List plugin_ = + java.util.Collections.emptyList(); + private void ensurePluginIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + plugin_ = new java.util.ArrayList(plugin_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.PluginProto.Plugin, com.akaxin.proto.core.PluginProto.Plugin.Builder, com.akaxin.proto.core.PluginProto.PluginOrBuilder> pluginBuilder_; + + /** + *
+       *获取插件列表数据
+       * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public java.util.List getPluginList() { + if (pluginBuilder_ == null) { + return java.util.Collections.unmodifiableList(plugin_); + } else { + return pluginBuilder_.getMessageList(); + } + } + /** + *
+       *获取插件列表数据
+       * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public int getPluginCount() { + if (pluginBuilder_ == null) { + return plugin_.size(); + } else { + return pluginBuilder_.getCount(); + } + } + /** + *
+       *获取插件列表数据
+       * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public com.akaxin.proto.core.PluginProto.Plugin getPlugin(int index) { + if (pluginBuilder_ == null) { + return plugin_.get(index); + } else { + return pluginBuilder_.getMessage(index); + } + } + /** + *
+       *获取插件列表数据
+       * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public Builder setPlugin( + int index, com.akaxin.proto.core.PluginProto.Plugin value) { + if (pluginBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePluginIsMutable(); + plugin_.set(index, value); + onChanged(); + } else { + pluginBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *获取插件列表数据
+       * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public Builder setPlugin( + int index, com.akaxin.proto.core.PluginProto.Plugin.Builder builderForValue) { + if (pluginBuilder_ == null) { + ensurePluginIsMutable(); + plugin_.set(index, builderForValue.build()); + onChanged(); + } else { + pluginBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *获取插件列表数据
+       * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public Builder addPlugin(com.akaxin.proto.core.PluginProto.Plugin value) { + if (pluginBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePluginIsMutable(); + plugin_.add(value); + onChanged(); + } else { + pluginBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *获取插件列表数据
+       * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public Builder addPlugin( + int index, com.akaxin.proto.core.PluginProto.Plugin value) { + if (pluginBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePluginIsMutable(); + plugin_.add(index, value); + onChanged(); + } else { + pluginBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *获取插件列表数据
+       * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public Builder addPlugin( + com.akaxin.proto.core.PluginProto.Plugin.Builder builderForValue) { + if (pluginBuilder_ == null) { + ensurePluginIsMutable(); + plugin_.add(builderForValue.build()); + onChanged(); + } else { + pluginBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *获取插件列表数据
+       * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public Builder addPlugin( + int index, com.akaxin.proto.core.PluginProto.Plugin.Builder builderForValue) { + if (pluginBuilder_ == null) { + ensurePluginIsMutable(); + plugin_.add(index, builderForValue.build()); + onChanged(); + } else { + pluginBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *获取插件列表数据
+       * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public Builder addAllPlugin( + java.lang.Iterable values) { + if (pluginBuilder_ == null) { + ensurePluginIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, plugin_); + onChanged(); + } else { + pluginBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *获取插件列表数据
+       * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public Builder clearPlugin() { + if (pluginBuilder_ == null) { + plugin_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pluginBuilder_.clear(); + } + return this; + } + /** + *
+       *获取插件列表数据
+       * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public Builder removePlugin(int index) { + if (pluginBuilder_ == null) { + ensurePluginIsMutable(); + plugin_.remove(index); + onChanged(); + } else { + pluginBuilder_.remove(index); + } + return this; + } + /** + *
+       *获取插件列表数据
+       * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public com.akaxin.proto.core.PluginProto.Plugin.Builder getPluginBuilder( + int index) { + return getPluginFieldBuilder().getBuilder(index); + } + /** + *
+       *获取插件列表数据
+       * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public com.akaxin.proto.core.PluginProto.PluginOrBuilder getPluginOrBuilder( + int index) { + if (pluginBuilder_ == null) { + return plugin_.get(index); } else { + return pluginBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *获取插件列表数据
+       * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public java.util.List + getPluginOrBuilderList() { + if (pluginBuilder_ != null) { + return pluginBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(plugin_); + } + } + /** + *
+       *获取插件列表数据
+       * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public com.akaxin.proto.core.PluginProto.Plugin.Builder addPluginBuilder() { + return getPluginFieldBuilder().addBuilder( + com.akaxin.proto.core.PluginProto.Plugin.getDefaultInstance()); + } + /** + *
+       *获取插件列表数据
+       * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public com.akaxin.proto.core.PluginProto.Plugin.Builder addPluginBuilder( + int index) { + return getPluginFieldBuilder().addBuilder( + index, com.akaxin.proto.core.PluginProto.Plugin.getDefaultInstance()); + } + /** + *
+       *获取插件列表数据
+       * 
+ * + * repeated .core.Plugin plugin = 1; + */ + public java.util.List + getPluginBuilderList() { + return getPluginFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.PluginProto.Plugin, com.akaxin.proto.core.PluginProto.Plugin.Builder, com.akaxin.proto.core.PluginProto.PluginOrBuilder> + getPluginFieldBuilder() { + if (pluginBuilder_ == null) { + pluginBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.akaxin.proto.core.PluginProto.Plugin, com.akaxin.proto.core.PluginProto.Plugin.Builder, com.akaxin.proto.core.PluginProto.PluginOrBuilder>( + plugin_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + plugin_ = null; + } + return pluginBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiPluginListResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiPluginListResponse) + private static final com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse(); + } + + public static com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiPluginListResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiPluginListResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiPluginListProto.ApiPluginListResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiPluginListRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiPluginListRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiPluginListResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiPluginListResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032site/api_plugin_list.proto\022\004site\032\021core" + + "/plugin.proto\"f\n\024ApiPluginListRequest\022\023\n" + + "\013page_number\030\001 \001(\005\022\021\n\tpage_size\030\002 \001(\005\022&\n" + + "\010position\030\003 \001(\0162\024.core.PluginPosition\"5\n" + + "\025ApiPluginListResponse\022\034\n\006plugin\030\001 \003(\0132\014" + + ".core.Plugin2W\n\024ApiPluginListService\022?\n\004" + + "list\022\032.site.ApiPluginListRequest\032\033.site." + + "ApiPluginListResponseB+\n\025com.akaxin.prot" + + "o.siteB\022ApiPluginListProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.PluginProto.getDescriptor(), + }, assigner); + internal_static_site_ApiPluginListRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiPluginListRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiPluginListRequest_descriptor, + new java.lang.String[] { "PageNumber", "PageSize", "Position", }); + internal_static_site_ApiPluginListResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiPluginListResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiPluginListResponse_descriptor, + new java.lang.String[] { "Plugin", }); + com.akaxin.proto.core.PluginProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiPluginPageProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiPluginPageProto.java new file mode 100755 index 0000000..2cc3afa --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiPluginPageProto.java @@ -0,0 +1,1841 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_plugin_page.proto + +package com.akaxin.proto.site; + +public final class ApiPluginPageProto { + private ApiPluginPageProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiPluginPageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiPluginPageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *插件ID
+     * 
+ * + * string plugin_id = 1; + */ + java.lang.String getPluginId(); + /** + *
+     *插件ID
+     * 
+ * + * string plugin_id = 1; + */ + com.google.protobuf.ByteString + getPluginIdBytes(); + + /** + *
+     *需要访问的界面
+     * 
+ * + * string page = 2; + */ + java.lang.String getPage(); + /** + *
+     *需要访问的界面
+     * 
+ * + * string page = 2; + */ + com.google.protobuf.ByteString + getPageBytes(); + + /** + *
+     *调用接口所需参数
+     * 
+ * + * string params = 3; + */ + java.lang.String getParams(); + /** + *
+     *调用接口所需参数
+     * 
+ * + * string params = 3; + */ + com.google.protobuf.ByteString + getParamsBytes(); + } + /** + * Protobuf type {@code site.ApiPluginPageRequest} + */ + public static final class ApiPluginPageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiPluginPageRequest) + ApiPluginPageRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiPluginPageRequest.newBuilder() to construct. + private ApiPluginPageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiPluginPageRequest() { + pluginId_ = ""; + page_ = ""; + params_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiPluginPageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + pluginId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + page_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + params_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPluginPageProto.internal_static_site_ApiPluginPageRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPluginPageProto.internal_static_site_ApiPluginPageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest.class, com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest.Builder.class); + } + + public static final int PLUGIN_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object pluginId_; + /** + *
+     *插件ID
+     * 
+ * + * string plugin_id = 1; + */ + public java.lang.String getPluginId() { + java.lang.Object ref = pluginId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pluginId_ = s; + return s; + } + } + /** + *
+     *插件ID
+     * 
+ * + * string plugin_id = 1; + */ + public com.google.protobuf.ByteString + getPluginIdBytes() { + java.lang.Object ref = pluginId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pluginId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_FIELD_NUMBER = 2; + private volatile java.lang.Object page_; + /** + *
+     *需要访问的界面
+     * 
+ * + * string page = 2; + */ + public java.lang.String getPage() { + java.lang.Object ref = page_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + page_ = s; + return s; + } + } + /** + *
+     *需要访问的界面
+     * 
+ * + * string page = 2; + */ + public com.google.protobuf.ByteString + getPageBytes() { + java.lang.Object ref = page_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + page_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAMS_FIELD_NUMBER = 3; + private volatile java.lang.Object params_; + /** + *
+     *调用接口所需参数
+     * 
+ * + * string params = 3; + */ + public java.lang.String getParams() { + java.lang.Object ref = params_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + params_ = s; + return s; + } + } + /** + *
+     *调用接口所需参数
+     * 
+ * + * string params = 3; + */ + public com.google.protobuf.ByteString + getParamsBytes() { + java.lang.Object ref = params_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + params_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getPluginIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pluginId_); + } + if (!getPageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, page_); + } + if (!getParamsBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, params_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPluginIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pluginId_); + } + if (!getPageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, page_); + } + if (!getParamsBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, params_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest other = (com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest) obj; + + boolean result = true; + result = result && getPluginId() + .equals(other.getPluginId()); + result = result && getPage() + .equals(other.getPage()); + result = result && getParams() + .equals(other.getParams()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PLUGIN_ID_FIELD_NUMBER; + hash = (53 * hash) + getPluginId().hashCode(); + hash = (37 * hash) + PAGE_FIELD_NUMBER; + hash = (53 * hash) + getPage().hashCode(); + hash = (37 * hash) + PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getParams().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiPluginPageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiPluginPageRequest) + com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPluginPageProto.internal_static_site_ApiPluginPageRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPluginPageProto.internal_static_site_ApiPluginPageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest.class, com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + pluginId_ = ""; + + page_ = ""; + + params_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiPluginPageProto.internal_static_site_ApiPluginPageRequest_descriptor; + } + + public com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest build() { + com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest buildPartial() { + com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest result = new com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest(this); + result.pluginId_ = pluginId_; + result.page_ = page_; + result.params_ = params_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest) { + return mergeFrom((com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest other) { + if (other == com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest.getDefaultInstance()) return this; + if (!other.getPluginId().isEmpty()) { + pluginId_ = other.pluginId_; + onChanged(); + } + if (!other.getPage().isEmpty()) { + page_ = other.page_; + onChanged(); + } + if (!other.getParams().isEmpty()) { + params_ = other.params_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object pluginId_ = ""; + /** + *
+       *插件ID
+       * 
+ * + * string plugin_id = 1; + */ + public java.lang.String getPluginId() { + java.lang.Object ref = pluginId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pluginId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *插件ID
+       * 
+ * + * string plugin_id = 1; + */ + public com.google.protobuf.ByteString + getPluginIdBytes() { + java.lang.Object ref = pluginId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pluginId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *插件ID
+       * 
+ * + * string plugin_id = 1; + */ + public Builder setPluginId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pluginId_ = value; + onChanged(); + return this; + } + /** + *
+       *插件ID
+       * 
+ * + * string plugin_id = 1; + */ + public Builder clearPluginId() { + + pluginId_ = getDefaultInstance().getPluginId(); + onChanged(); + return this; + } + /** + *
+       *插件ID
+       * 
+ * + * string plugin_id = 1; + */ + public Builder setPluginIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pluginId_ = value; + onChanged(); + return this; + } + + private java.lang.Object page_ = ""; + /** + *
+       *需要访问的界面
+       * 
+ * + * string page = 2; + */ + public java.lang.String getPage() { + java.lang.Object ref = page_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + page_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *需要访问的界面
+       * 
+ * + * string page = 2; + */ + public com.google.protobuf.ByteString + getPageBytes() { + java.lang.Object ref = page_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + page_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *需要访问的界面
+       * 
+ * + * string page = 2; + */ + public Builder setPage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + page_ = value; + onChanged(); + return this; + } + /** + *
+       *需要访问的界面
+       * 
+ * + * string page = 2; + */ + public Builder clearPage() { + + page_ = getDefaultInstance().getPage(); + onChanged(); + return this; + } + /** + *
+       *需要访问的界面
+       * 
+ * + * string page = 2; + */ + public Builder setPageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + page_ = value; + onChanged(); + return this; + } + + private java.lang.Object params_ = ""; + /** + *
+       *调用接口所需参数
+       * 
+ * + * string params = 3; + */ + public java.lang.String getParams() { + java.lang.Object ref = params_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + params_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *调用接口所需参数
+       * 
+ * + * string params = 3; + */ + public com.google.protobuf.ByteString + getParamsBytes() { + java.lang.Object ref = params_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + params_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *调用接口所需参数
+       * 
+ * + * string params = 3; + */ + public Builder setParams( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + params_ = value; + onChanged(); + return this; + } + /** + *
+       *调用接口所需参数
+       * 
+ * + * string params = 3; + */ + public Builder clearParams() { + + params_ = getDefaultInstance().getParams(); + onChanged(); + return this; + } + /** + *
+       *调用接口所需参数
+       * 
+ * + * string params = 3; + */ + public Builder setParamsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + params_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiPluginPageRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiPluginPageRequest) + private static final com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest(); + } + + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiPluginPageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiPluginPageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiPluginPageResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiPluginPageResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *page对应的数据,一般是html内容
+     * 
+ * + * bytes data = 1; + */ + com.google.protobuf.ByteString getData(); + + /** + *
+     *客户端需要的cookie
+     * 
+ * + * map<string, string> cookie = 2; + */ + int getCookieCount(); + /** + *
+     *客户端需要的cookie
+     * 
+ * + * map<string, string> cookie = 2; + */ + boolean containsCookie( + java.lang.String key); + /** + * Use {@link #getCookieMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getCookie(); + /** + *
+     *客户端需要的cookie
+     * 
+ * + * map<string, string> cookie = 2; + */ + java.util.Map + getCookieMap(); + /** + *
+     *客户端需要的cookie
+     * 
+ * + * map<string, string> cookie = 2; + */ + + java.lang.String getCookieOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+     *客户端需要的cookie
+     * 
+ * + * map<string, string> cookie = 2; + */ + + java.lang.String getCookieOrThrow( + java.lang.String key); + } + /** + * Protobuf type {@code site.ApiPluginPageResponse} + */ + public static final class ApiPluginPageResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiPluginPageResponse) + ApiPluginPageResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiPluginPageResponse.newBuilder() to construct. + private ApiPluginPageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiPluginPageResponse() { + data_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiPluginPageResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + + data_ = input.readBytes(); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + cookie_ = com.google.protobuf.MapField.newMapField( + CookieDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + cookie__ = input.readMessage( + CookieDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + cookie_.getMutableMap().put( + cookie__.getKey(), cookie__.getValue()); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPluginPageProto.internal_static_site_ApiPluginPageResponse_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetCookie(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPluginPageProto.internal_static_site_ApiPluginPageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse.class, com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse.Builder.class); + } + + private int bitField0_; + public static final int DATA_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString data_; + /** + *
+     *page对应的数据,一般是html内容
+     * 
+ * + * bytes data = 1; + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + + public static final int COOKIE_FIELD_NUMBER = 2; + private static final class CookieDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.akaxin.proto.site.ApiPluginPageProto.internal_static_site_ApiPluginPageResponse_CookieEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> cookie_; + private com.google.protobuf.MapField + internalGetCookie() { + if (cookie_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CookieDefaultEntryHolder.defaultEntry); + } + return cookie_; + } + + public int getCookieCount() { + return internalGetCookie().getMap().size(); + } + /** + *
+     *客户端需要的cookie
+     * 
+ * + * map<string, string> cookie = 2; + */ + + public boolean containsCookie( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetCookie().getMap().containsKey(key); + } + /** + * Use {@link #getCookieMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getCookie() { + return getCookieMap(); + } + /** + *
+     *客户端需要的cookie
+     * 
+ * + * map<string, string> cookie = 2; + */ + + public java.util.Map getCookieMap() { + return internalGetCookie().getMap(); + } + /** + *
+     *客户端需要的cookie
+     * 
+ * + * map<string, string> cookie = 2; + */ + + public java.lang.String getCookieOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetCookie().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     *客户端需要的cookie
+     * 
+ * + * map<string, string> cookie = 2; + */ + + public java.lang.String getCookieOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetCookie().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!data_.isEmpty()) { + output.writeBytes(1, data_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetCookie(), + CookieDefaultEntryHolder.defaultEntry, + 2); + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, data_); + } + for (java.util.Map.Entry entry + : internalGetCookie().getMap().entrySet()) { + com.google.protobuf.MapEntry + cookie__ = CookieDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, cookie__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse other = (com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse) obj; + + boolean result = true; + result = result && getData() + .equals(other.getData()); + result = result && internalGetCookie().equals( + other.internalGetCookie()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + if (!internalGetCookie().getMap().isEmpty()) { + hash = (37 * hash) + COOKIE_FIELD_NUMBER; + hash = (53 * hash) + internalGetCookie().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiPluginPageResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiPluginPageResponse) + com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPluginPageProto.internal_static_site_ApiPluginPageResponse_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetCookie(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableCookie(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPluginPageProto.internal_static_site_ApiPluginPageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse.class, com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + data_ = com.google.protobuf.ByteString.EMPTY; + + internalGetMutableCookie().clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiPluginPageProto.internal_static_site_ApiPluginPageResponse_descriptor; + } + + public com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse build() { + com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse buildPartial() { + com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse result = new com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.data_ = data_; + result.cookie_ = internalGetCookie(); + result.cookie_.makeImmutable(); + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse) { + return mergeFrom((com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse other) { + if (other == com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse.getDefaultInstance()) return this; + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + internalGetMutableCookie().mergeFrom( + other.internalGetCookie()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       *page对应的数据,一般是html内容
+       * 
+ * + * bytes data = 1; + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + *
+       *page对应的数据,一般是html内容
+       * 
+ * + * bytes data = 1; + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + data_ = value; + onChanged(); + return this; + } + /** + *
+       *page对应的数据,一般是html内容
+       * 
+ * + * bytes data = 1; + */ + public Builder clearData() { + + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> cookie_; + private com.google.protobuf.MapField + internalGetCookie() { + if (cookie_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CookieDefaultEntryHolder.defaultEntry); + } + return cookie_; + } + private com.google.protobuf.MapField + internalGetMutableCookie() { + onChanged();; + if (cookie_ == null) { + cookie_ = com.google.protobuf.MapField.newMapField( + CookieDefaultEntryHolder.defaultEntry); + } + if (!cookie_.isMutable()) { + cookie_ = cookie_.copy(); + } + return cookie_; + } + + public int getCookieCount() { + return internalGetCookie().getMap().size(); + } + /** + *
+       *客户端需要的cookie
+       * 
+ * + * map<string, string> cookie = 2; + */ + + public boolean containsCookie( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetCookie().getMap().containsKey(key); + } + /** + * Use {@link #getCookieMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getCookie() { + return getCookieMap(); + } + /** + *
+       *客户端需要的cookie
+       * 
+ * + * map<string, string> cookie = 2; + */ + + public java.util.Map getCookieMap() { + return internalGetCookie().getMap(); + } + /** + *
+       *客户端需要的cookie
+       * 
+ * + * map<string, string> cookie = 2; + */ + + public java.lang.String getCookieOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetCookie().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       *客户端需要的cookie
+       * 
+ * + * map<string, string> cookie = 2; + */ + + public java.lang.String getCookieOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetCookie().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearCookie() { + internalGetMutableCookie().getMutableMap() + .clear(); + return this; + } + /** + *
+       *客户端需要的cookie
+       * 
+ * + * map<string, string> cookie = 2; + */ + + public Builder removeCookie( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableCookie().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableCookie() { + return internalGetMutableCookie().getMutableMap(); + } + /** + *
+       *客户端需要的cookie
+       * 
+ * + * map<string, string> cookie = 2; + */ + public Builder putCookie( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableCookie().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       *客户端需要的cookie
+       * 
+ * + * map<string, string> cookie = 2; + */ + + public Builder putAllCookie( + java.util.Map values) { + internalGetMutableCookie().getMutableMap() + .putAll(values); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiPluginPageResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiPluginPageResponse) + private static final com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse(); + } + + public static com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiPluginPageResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiPluginPageResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiPluginPageProto.ApiPluginPageResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiPluginPageRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiPluginPageRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiPluginPageResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiPluginPageResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiPluginPageResponse_CookieEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiPluginPageResponse_CookieEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032site/api_plugin_page.proto\022\004site\"G\n\024Ap" + + "iPluginPageRequest\022\021\n\tplugin_id\030\001 \001(\t\022\014\n" + + "\004page\030\002 \001(\t\022\016\n\006params\030\003 \001(\t\"\215\001\n\025ApiPlugi" + + "nPageResponse\022\014\n\004data\030\001 \001(\014\0227\n\006cookie\030\002 " + + "\003(\0132\'.site.ApiPluginPageResponse.CookieE" + + "ntry\032-\n\013CookieEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\0012W\n\024ApiPluginPageService\022?\n\004p" + + "age\022\032.site.ApiPluginPageRequest\032\033.site.A" + + "piPluginPageResponseB+\n\025com.akaxin.proto" + + ".siteB\022ApiPluginPageProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiPluginPageRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiPluginPageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiPluginPageRequest_descriptor, + new java.lang.String[] { "PluginId", "Page", "Params", }); + internal_static_site_ApiPluginPageResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiPluginPageResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiPluginPageResponse_descriptor, + new java.lang.String[] { "Data", "Cookie", }); + internal_static_site_ApiPluginPageResponse_CookieEntry_descriptor = + internal_static_site_ApiPluginPageResponse_descriptor.getNestedTypes().get(0); + internal_static_site_ApiPluginPageResponse_CookieEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiPluginPageResponse_CookieEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiPluginProxyProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiPluginProxyProto.java new file mode 100755 index 0000000..5cbedc8 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiPluginProxyProto.java @@ -0,0 +1,1842 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_plugin_proxy.proto + +package com.akaxin.proto.site; + +public final class ApiPluginProxyProto { + private ApiPluginProxyProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiPluginProxyRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiPluginProxyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *插件ID
+     * 
+ * + * string plugin_id = 1; + */ + java.lang.String getPluginId(); + /** + *
+     *插件ID
+     * 
+ * + * string plugin_id = 1; + */ + com.google.protobuf.ByteString + getPluginIdBytes(); + + /** + *
+     *插件执行的接口
+     * 
+ * + * string api = 2; + */ + java.lang.String getApi(); + /** + *
+     *插件执行的接口
+     * 
+ * + * string api = 2; + */ + com.google.protobuf.ByteString + getApiBytes(); + + /** + *
+     *调用接口所需参数
+     * 
+ * + * string params = 3; + */ + java.lang.String getParams(); + /** + *
+     *调用接口所需参数
+     * 
+ * + * string params = 3; + */ + com.google.protobuf.ByteString + getParamsBytes(); + } + /** + * Protobuf type {@code site.ApiPluginProxyRequest} + */ + public static final class ApiPluginProxyRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiPluginProxyRequest) + ApiPluginProxyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiPluginProxyRequest.newBuilder() to construct. + private ApiPluginProxyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiPluginProxyRequest() { + pluginId_ = ""; + api_ = ""; + params_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiPluginProxyRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + pluginId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + api_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + params_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPluginProxyProto.internal_static_site_ApiPluginProxyRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPluginProxyProto.internal_static_site_ApiPluginProxyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest.class, com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest.Builder.class); + } + + public static final int PLUGIN_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object pluginId_; + /** + *
+     *插件ID
+     * 
+ * + * string plugin_id = 1; + */ + public java.lang.String getPluginId() { + java.lang.Object ref = pluginId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pluginId_ = s; + return s; + } + } + /** + *
+     *插件ID
+     * 
+ * + * string plugin_id = 1; + */ + public com.google.protobuf.ByteString + getPluginIdBytes() { + java.lang.Object ref = pluginId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pluginId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int API_FIELD_NUMBER = 2; + private volatile java.lang.Object api_; + /** + *
+     *插件执行的接口
+     * 
+ * + * string api = 2; + */ + public java.lang.String getApi() { + java.lang.Object ref = api_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + api_ = s; + return s; + } + } + /** + *
+     *插件执行的接口
+     * 
+ * + * string api = 2; + */ + public com.google.protobuf.ByteString + getApiBytes() { + java.lang.Object ref = api_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + api_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAMS_FIELD_NUMBER = 3; + private volatile java.lang.Object params_; + /** + *
+     *调用接口所需参数
+     * 
+ * + * string params = 3; + */ + public java.lang.String getParams() { + java.lang.Object ref = params_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + params_ = s; + return s; + } + } + /** + *
+     *调用接口所需参数
+     * 
+ * + * string params = 3; + */ + public com.google.protobuf.ByteString + getParamsBytes() { + java.lang.Object ref = params_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + params_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getPluginIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pluginId_); + } + if (!getApiBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, api_); + } + if (!getParamsBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, params_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPluginIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pluginId_); + } + if (!getApiBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, api_); + } + if (!getParamsBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, params_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest other = (com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest) obj; + + boolean result = true; + result = result && getPluginId() + .equals(other.getPluginId()); + result = result && getApi() + .equals(other.getApi()); + result = result && getParams() + .equals(other.getParams()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PLUGIN_ID_FIELD_NUMBER; + hash = (53 * hash) + getPluginId().hashCode(); + hash = (37 * hash) + API_FIELD_NUMBER; + hash = (53 * hash) + getApi().hashCode(); + hash = (37 * hash) + PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getParams().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiPluginProxyRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiPluginProxyRequest) + com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPluginProxyProto.internal_static_site_ApiPluginProxyRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPluginProxyProto.internal_static_site_ApiPluginProxyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest.class, com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + pluginId_ = ""; + + api_ = ""; + + params_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiPluginProxyProto.internal_static_site_ApiPluginProxyRequest_descriptor; + } + + public com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest build() { + com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest buildPartial() { + com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest result = new com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest(this); + result.pluginId_ = pluginId_; + result.api_ = api_; + result.params_ = params_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest) { + return mergeFrom((com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest other) { + if (other == com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest.getDefaultInstance()) return this; + if (!other.getPluginId().isEmpty()) { + pluginId_ = other.pluginId_; + onChanged(); + } + if (!other.getApi().isEmpty()) { + api_ = other.api_; + onChanged(); + } + if (!other.getParams().isEmpty()) { + params_ = other.params_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object pluginId_ = ""; + /** + *
+       *插件ID
+       * 
+ * + * string plugin_id = 1; + */ + public java.lang.String getPluginId() { + java.lang.Object ref = pluginId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pluginId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *插件ID
+       * 
+ * + * string plugin_id = 1; + */ + public com.google.protobuf.ByteString + getPluginIdBytes() { + java.lang.Object ref = pluginId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pluginId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *插件ID
+       * 
+ * + * string plugin_id = 1; + */ + public Builder setPluginId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pluginId_ = value; + onChanged(); + return this; + } + /** + *
+       *插件ID
+       * 
+ * + * string plugin_id = 1; + */ + public Builder clearPluginId() { + + pluginId_ = getDefaultInstance().getPluginId(); + onChanged(); + return this; + } + /** + *
+       *插件ID
+       * 
+ * + * string plugin_id = 1; + */ + public Builder setPluginIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pluginId_ = value; + onChanged(); + return this; + } + + private java.lang.Object api_ = ""; + /** + *
+       *插件执行的接口
+       * 
+ * + * string api = 2; + */ + public java.lang.String getApi() { + java.lang.Object ref = api_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + api_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *插件执行的接口
+       * 
+ * + * string api = 2; + */ + public com.google.protobuf.ByteString + getApiBytes() { + java.lang.Object ref = api_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + api_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *插件执行的接口
+       * 
+ * + * string api = 2; + */ + public Builder setApi( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + api_ = value; + onChanged(); + return this; + } + /** + *
+       *插件执行的接口
+       * 
+ * + * string api = 2; + */ + public Builder clearApi() { + + api_ = getDefaultInstance().getApi(); + onChanged(); + return this; + } + /** + *
+       *插件执行的接口
+       * 
+ * + * string api = 2; + */ + public Builder setApiBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + api_ = value; + onChanged(); + return this; + } + + private java.lang.Object params_ = ""; + /** + *
+       *调用接口所需参数
+       * 
+ * + * string params = 3; + */ + public java.lang.String getParams() { + java.lang.Object ref = params_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + params_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *调用接口所需参数
+       * 
+ * + * string params = 3; + */ + public com.google.protobuf.ByteString + getParamsBytes() { + java.lang.Object ref = params_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + params_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *调用接口所需参数
+       * 
+ * + * string params = 3; + */ + public Builder setParams( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + params_ = value; + onChanged(); + return this; + } + /** + *
+       *调用接口所需参数
+       * 
+ * + * string params = 3; + */ + public Builder clearParams() { + + params_ = getDefaultInstance().getParams(); + onChanged(); + return this; + } + /** + *
+       *调用接口所需参数
+       * 
+ * + * string params = 3; + */ + public Builder setParamsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + params_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiPluginProxyRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiPluginProxyRequest) + private static final com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest(); + } + + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiPluginProxyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiPluginProxyRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiPluginProxyResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiPluginProxyResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *返回的数据
+     * 
+ * + * bytes data = 1; + */ + com.google.protobuf.ByteString getData(); + + /** + *
+     *客户端需要的cookie
+     * 
+ * + * map<string, string> cookie = 2; + */ + int getCookieCount(); + /** + *
+     *客户端需要的cookie
+     * 
+ * + * map<string, string> cookie = 2; + */ + boolean containsCookie( + java.lang.String key); + /** + * Use {@link #getCookieMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getCookie(); + /** + *
+     *客户端需要的cookie
+     * 
+ * + * map<string, string> cookie = 2; + */ + java.util.Map + getCookieMap(); + /** + *
+     *客户端需要的cookie
+     * 
+ * + * map<string, string> cookie = 2; + */ + + java.lang.String getCookieOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+     *客户端需要的cookie
+     * 
+ * + * map<string, string> cookie = 2; + */ + + java.lang.String getCookieOrThrow( + java.lang.String key); + } + /** + * Protobuf type {@code site.ApiPluginProxyResponse} + */ + public static final class ApiPluginProxyResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiPluginProxyResponse) + ApiPluginProxyResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiPluginProxyResponse.newBuilder() to construct. + private ApiPluginProxyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiPluginProxyResponse() { + data_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiPluginProxyResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + + data_ = input.readBytes(); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + cookie_ = com.google.protobuf.MapField.newMapField( + CookieDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + cookie__ = input.readMessage( + CookieDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + cookie_.getMutableMap().put( + cookie__.getKey(), cookie__.getValue()); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPluginProxyProto.internal_static_site_ApiPluginProxyResponse_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetCookie(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPluginProxyProto.internal_static_site_ApiPluginProxyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse.class, com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse.Builder.class); + } + + private int bitField0_; + public static final int DATA_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString data_; + /** + *
+     *返回的数据
+     * 
+ * + * bytes data = 1; + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + + public static final int COOKIE_FIELD_NUMBER = 2; + private static final class CookieDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.akaxin.proto.site.ApiPluginProxyProto.internal_static_site_ApiPluginProxyResponse_CookieEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> cookie_; + private com.google.protobuf.MapField + internalGetCookie() { + if (cookie_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CookieDefaultEntryHolder.defaultEntry); + } + return cookie_; + } + + public int getCookieCount() { + return internalGetCookie().getMap().size(); + } + /** + *
+     *客户端需要的cookie
+     * 
+ * + * map<string, string> cookie = 2; + */ + + public boolean containsCookie( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetCookie().getMap().containsKey(key); + } + /** + * Use {@link #getCookieMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getCookie() { + return getCookieMap(); + } + /** + *
+     *客户端需要的cookie
+     * 
+ * + * map<string, string> cookie = 2; + */ + + public java.util.Map getCookieMap() { + return internalGetCookie().getMap(); + } + /** + *
+     *客户端需要的cookie
+     * 
+ * + * map<string, string> cookie = 2; + */ + + public java.lang.String getCookieOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetCookie().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     *客户端需要的cookie
+     * 
+ * + * map<string, string> cookie = 2; + */ + + public java.lang.String getCookieOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetCookie().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!data_.isEmpty()) { + output.writeBytes(1, data_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetCookie(), + CookieDefaultEntryHolder.defaultEntry, + 2); + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, data_); + } + for (java.util.Map.Entry entry + : internalGetCookie().getMap().entrySet()) { + com.google.protobuf.MapEntry + cookie__ = CookieDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, cookie__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse other = (com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse) obj; + + boolean result = true; + result = result && getData() + .equals(other.getData()); + result = result && internalGetCookie().equals( + other.internalGetCookie()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + if (!internalGetCookie().getMap().isEmpty()) { + hash = (37 * hash) + COOKIE_FIELD_NUMBER; + hash = (53 * hash) + internalGetCookie().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiPluginProxyResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiPluginProxyResponse) + com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiPluginProxyProto.internal_static_site_ApiPluginProxyResponse_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetCookie(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableCookie(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiPluginProxyProto.internal_static_site_ApiPluginProxyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse.class, com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + data_ = com.google.protobuf.ByteString.EMPTY; + + internalGetMutableCookie().clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiPluginProxyProto.internal_static_site_ApiPluginProxyResponse_descriptor; + } + + public com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse build() { + com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse buildPartial() { + com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse result = new com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.data_ = data_; + result.cookie_ = internalGetCookie(); + result.cookie_.makeImmutable(); + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse) { + return mergeFrom((com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse other) { + if (other == com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse.getDefaultInstance()) return this; + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + internalGetMutableCookie().mergeFrom( + other.internalGetCookie()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       *返回的数据
+       * 
+ * + * bytes data = 1; + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + *
+       *返回的数据
+       * 
+ * + * bytes data = 1; + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + data_ = value; + onChanged(); + return this; + } + /** + *
+       *返回的数据
+       * 
+ * + * bytes data = 1; + */ + public Builder clearData() { + + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> cookie_; + private com.google.protobuf.MapField + internalGetCookie() { + if (cookie_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CookieDefaultEntryHolder.defaultEntry); + } + return cookie_; + } + private com.google.protobuf.MapField + internalGetMutableCookie() { + onChanged();; + if (cookie_ == null) { + cookie_ = com.google.protobuf.MapField.newMapField( + CookieDefaultEntryHolder.defaultEntry); + } + if (!cookie_.isMutable()) { + cookie_ = cookie_.copy(); + } + return cookie_; + } + + public int getCookieCount() { + return internalGetCookie().getMap().size(); + } + /** + *
+       *客户端需要的cookie
+       * 
+ * + * map<string, string> cookie = 2; + */ + + public boolean containsCookie( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetCookie().getMap().containsKey(key); + } + /** + * Use {@link #getCookieMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getCookie() { + return getCookieMap(); + } + /** + *
+       *客户端需要的cookie
+       * 
+ * + * map<string, string> cookie = 2; + */ + + public java.util.Map getCookieMap() { + return internalGetCookie().getMap(); + } + /** + *
+       *客户端需要的cookie
+       * 
+ * + * map<string, string> cookie = 2; + */ + + public java.lang.String getCookieOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetCookie().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       *客户端需要的cookie
+       * 
+ * + * map<string, string> cookie = 2; + */ + + public java.lang.String getCookieOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetCookie().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearCookie() { + internalGetMutableCookie().getMutableMap() + .clear(); + return this; + } + /** + *
+       *客户端需要的cookie
+       * 
+ * + * map<string, string> cookie = 2; + */ + + public Builder removeCookie( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableCookie().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableCookie() { + return internalGetMutableCookie().getMutableMap(); + } + /** + *
+       *客户端需要的cookie
+       * 
+ * + * map<string, string> cookie = 2; + */ + public Builder putCookie( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableCookie().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       *客户端需要的cookie
+       * 
+ * + * map<string, string> cookie = 2; + */ + + public Builder putAllCookie( + java.util.Map values) { + internalGetMutableCookie().getMutableMap() + .putAll(values); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiPluginProxyResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiPluginProxyResponse) + private static final com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse(); + } + + public static com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiPluginProxyResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiPluginProxyResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiPluginProxyProto.ApiPluginProxyResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiPluginProxyRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiPluginProxyRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiPluginProxyResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiPluginProxyResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiPluginProxyResponse_CookieEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiPluginProxyResponse_CookieEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033site/api_plugin_proxy.proto\022\004site\"G\n\025A" + + "piPluginProxyRequest\022\021\n\tplugin_id\030\001 \001(\t\022" + + "\013\n\003api\030\002 \001(\t\022\016\n\006params\030\003 \001(\t\"\217\001\n\026ApiPlug" + + "inProxyResponse\022\014\n\004data\030\001 \001(\014\0228\n\006cookie\030" + + "\002 \003(\0132(.site.ApiPluginProxyResponse.Cook" + + "ieEntry\032-\n\013CookieEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + + "alue\030\002 \001(\t:\0028\0012[\n\025ApiPluginProxyService\022" + + "B\n\005proxy\022\033.site.ApiPluginProxyRequest\032\034." + + "site.ApiPluginProxyResponseB,\n\025com.akaxi" + + "n.proto.siteB\023ApiPluginProxyProtob\006proto" + + "3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiPluginProxyRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiPluginProxyRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiPluginProxyRequest_descriptor, + new java.lang.String[] { "PluginId", "Api", "Params", }); + internal_static_site_ApiPluginProxyResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiPluginProxyResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiPluginProxyResponse_descriptor, + new java.lang.String[] { "Data", "Cookie", }); + internal_static_site_ApiPluginProxyResponse_CookieEntry_descriptor = + internal_static_site_ApiPluginProxyResponse_descriptor.getNestedTypes().get(0); + internal_static_site_ApiPluginProxyResponse_CookieEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiPluginProxyResponse_CookieEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiSecretChatApplyU2Proto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiSecretChatApplyU2Proto.java new file mode 100755 index 0000000..b72bc1c --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiSecretChatApplyU2Proto.java @@ -0,0 +1,1279 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_secretChat_applyU2.proto + +package com.akaxin.proto.site; + +public final class ApiSecretChatApplyU2Proto { + private ApiSecretChatApplyU2Proto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiSecretChatApplyU2RequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiSecretChatApplyU2Request) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *申请绝密聊天的好友ID
+     * 
+ * + * string site_friend_id = 1; + */ + java.lang.String getSiteFriendId(); + /** + *
+     *申请绝密聊天的好友ID
+     * 
+ * + * string site_friend_id = 1; + */ + com.google.protobuf.ByteString + getSiteFriendIdBytes(); + } + /** + * Protobuf type {@code site.ApiSecretChatApplyU2Request} + */ + public static final class ApiSecretChatApplyU2Request extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiSecretChatApplyU2Request) + ApiSecretChatApplyU2RequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiSecretChatApplyU2Request.newBuilder() to construct. + private ApiSecretChatApplyU2Request(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiSecretChatApplyU2Request() { + siteFriendId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiSecretChatApplyU2Request( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteFriendId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSecretChatApplyU2Proto.internal_static_site_ApiSecretChatApplyU2Request_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSecretChatApplyU2Proto.internal_static_site_ApiSecretChatApplyU2Request_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request.class, com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request.Builder.class); + } + + public static final int SITE_FRIEND_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteFriendId_; + /** + *
+     *申请绝密聊天的好友ID
+     * 
+ * + * string site_friend_id = 1; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } + } + /** + *
+     *申请绝密聊天的好友ID
+     * 
+ * + * string site_friend_id = 1; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteFriendIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteFriendId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteFriendIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteFriendId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request other = (com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request) obj; + + boolean result = true; + result = result && getSiteFriendId() + .equals(other.getSiteFriendId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_FRIEND_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteFriendId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiSecretChatApplyU2Request} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiSecretChatApplyU2Request) + com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2RequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSecretChatApplyU2Proto.internal_static_site_ApiSecretChatApplyU2Request_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSecretChatApplyU2Proto.internal_static_site_ApiSecretChatApplyU2Request_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request.class, com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteFriendId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiSecretChatApplyU2Proto.internal_static_site_ApiSecretChatApplyU2Request_descriptor; + } + + public com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request build() { + com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request buildPartial() { + com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request result = new com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request(this); + result.siteFriendId_ = siteFriendId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request) { + return mergeFrom((com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request other) { + if (other == com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request.getDefaultInstance()) return this; + if (!other.getSiteFriendId().isEmpty()) { + siteFriendId_ = other.siteFriendId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteFriendId_ = ""; + /** + *
+       *申请绝密聊天的好友ID
+       * 
+ * + * string site_friend_id = 1; + */ + public java.lang.String getSiteFriendId() { + java.lang.Object ref = siteFriendId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteFriendId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *申请绝密聊天的好友ID
+       * 
+ * + * string site_friend_id = 1; + */ + public com.google.protobuf.ByteString + getSiteFriendIdBytes() { + java.lang.Object ref = siteFriendId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteFriendId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *申请绝密聊天的好友ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder setSiteFriendId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteFriendId_ = value; + onChanged(); + return this; + } + /** + *
+       *申请绝密聊天的好友ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder clearSiteFriendId() { + + siteFriendId_ = getDefaultInstance().getSiteFriendId(); + onChanged(); + return this; + } + /** + *
+       *申请绝密聊天的好友ID
+       * 
+ * + * string site_friend_id = 1; + */ + public Builder setSiteFriendIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteFriendId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiSecretChatApplyU2Request) + } + + // @@protoc_insertion_point(class_scope:site.ApiSecretChatApplyU2Request) + private static final com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request(); + } + + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiSecretChatApplyU2Request parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiSecretChatApplyU2Request(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Request getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiSecretChatApplyU2ResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiSecretChatApplyU2Response) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *好友的默认设备信息
+     * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + boolean hasDeviceProfile(); + /** + *
+     *好友的默认设备信息
+     * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile getDeviceProfile(); + /** + *
+     *好友的默认设备信息
+     * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder getDeviceProfileOrBuilder(); + } + /** + * Protobuf type {@code site.ApiSecretChatApplyU2Response} + */ + public static final class ApiSecretChatApplyU2Response extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiSecretChatApplyU2Response) + ApiSecretChatApplyU2ResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiSecretChatApplyU2Response.newBuilder() to construct. + private ApiSecretChatApplyU2Response(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiSecretChatApplyU2Response() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiSecretChatApplyU2Response( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder subBuilder = null; + if (deviceProfile_ != null) { + subBuilder = deviceProfile_.toBuilder(); + } + deviceProfile_ = input.readMessage(com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deviceProfile_); + deviceProfile_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSecretChatApplyU2Proto.internal_static_site_ApiSecretChatApplyU2Response_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSecretChatApplyU2Proto.internal_static_site_ApiSecretChatApplyU2Response_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response.class, com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response.Builder.class); + } + + public static final int DEVICEPROFILE_FIELD_NUMBER = 1; + private com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile deviceProfile_; + /** + *
+     *好友的默认设备信息
+     * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public boolean hasDeviceProfile() { + return deviceProfile_ != null; + } + /** + *
+     *好友的默认设备信息
+     * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile getDeviceProfile() { + return deviceProfile_ == null ? com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.getDefaultInstance() : deviceProfile_; + } + /** + *
+     *好友的默认设备信息
+     * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder getDeviceProfileOrBuilder() { + return getDeviceProfile(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (deviceProfile_ != null) { + output.writeMessage(1, getDeviceProfile()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (deviceProfile_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getDeviceProfile()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response other = (com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response) obj; + + boolean result = true; + result = result && (hasDeviceProfile() == other.hasDeviceProfile()); + if (hasDeviceProfile()) { + result = result && getDeviceProfile() + .equals(other.getDeviceProfile()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDeviceProfile()) { + hash = (37 * hash) + DEVICEPROFILE_FIELD_NUMBER; + hash = (53 * hash) + getDeviceProfile().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiSecretChatApplyU2Response} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiSecretChatApplyU2Response) + com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2ResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSecretChatApplyU2Proto.internal_static_site_ApiSecretChatApplyU2Response_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSecretChatApplyU2Proto.internal_static_site_ApiSecretChatApplyU2Response_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response.class, com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (deviceProfileBuilder_ == null) { + deviceProfile_ = null; + } else { + deviceProfile_ = null; + deviceProfileBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiSecretChatApplyU2Proto.internal_static_site_ApiSecretChatApplyU2Response_descriptor; + } + + public com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response build() { + com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response buildPartial() { + com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response result = new com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response(this); + if (deviceProfileBuilder_ == null) { + result.deviceProfile_ = deviceProfile_; + } else { + result.deviceProfile_ = deviceProfileBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response) { + return mergeFrom((com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response other) { + if (other == com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response.getDefaultInstance()) return this; + if (other.hasDeviceProfile()) { + mergeDeviceProfile(other.getDeviceProfile()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile deviceProfile_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder> deviceProfileBuilder_; + /** + *
+       *好友的默认设备信息
+       * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public boolean hasDeviceProfile() { + return deviceProfileBuilder_ != null || deviceProfile_ != null; + } + /** + *
+       *好友的默认设备信息
+       * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile getDeviceProfile() { + if (deviceProfileBuilder_ == null) { + return deviceProfile_ == null ? com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.getDefaultInstance() : deviceProfile_; + } else { + return deviceProfileBuilder_.getMessage(); + } + } + /** + *
+       *好友的默认设备信息
+       * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public Builder setDeviceProfile(com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile value) { + if (deviceProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceProfile_ = value; + onChanged(); + } else { + deviceProfileBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *好友的默认设备信息
+       * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public Builder setDeviceProfile( + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder builderForValue) { + if (deviceProfileBuilder_ == null) { + deviceProfile_ = builderForValue.build(); + onChanged(); + } else { + deviceProfileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *好友的默认设备信息
+       * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public Builder mergeDeviceProfile(com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile value) { + if (deviceProfileBuilder_ == null) { + if (deviceProfile_ != null) { + deviceProfile_ = + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.newBuilder(deviceProfile_).mergeFrom(value).buildPartial(); + } else { + deviceProfile_ = value; + } + onChanged(); + } else { + deviceProfileBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *好友的默认设备信息
+       * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public Builder clearDeviceProfile() { + if (deviceProfileBuilder_ == null) { + deviceProfile_ = null; + onChanged(); + } else { + deviceProfile_ = null; + deviceProfileBuilder_ = null; + } + + return this; + } + /** + *
+       *好友的默认设备信息
+       * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder getDeviceProfileBuilder() { + + onChanged(); + return getDeviceProfileFieldBuilder().getBuilder(); + } + /** + *
+       *好友的默认设备信息
+       * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + public com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder getDeviceProfileOrBuilder() { + if (deviceProfileBuilder_ != null) { + return deviceProfileBuilder_.getMessageOrBuilder(); + } else { + return deviceProfile_ == null ? + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.getDefaultInstance() : deviceProfile_; + } + } + /** + *
+       *好友的默认设备信息
+       * 
+ * + * .core.SimpleDeviceProfile deviceProfile = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder> + getDeviceProfileFieldBuilder() { + if (deviceProfileBuilder_ == null) { + deviceProfileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfile.Builder, com.akaxin.proto.core.DeviceProto.SimpleDeviceProfileOrBuilder>( + getDeviceProfile(), + getParentForChildren(), + isClean()); + deviceProfile_ = null; + } + return deviceProfileBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiSecretChatApplyU2Response) + } + + // @@protoc_insertion_point(class_scope:site.ApiSecretChatApplyU2Response) + private static final com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response(); + } + + public static com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiSecretChatApplyU2Response parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiSecretChatApplyU2Response(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiSecretChatApplyU2Proto.ApiSecretChatApplyU2Response getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiSecretChatApplyU2Request_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiSecretChatApplyU2Request_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiSecretChatApplyU2Response_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiSecretChatApplyU2Response_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n!site/api_secretChat_applyU2.proto\022\004sit" + + "e\032\021core/device.proto\"5\n\033ApiSecretChatApp" + + "lyU2Request\022\026\n\016site_friend_id\030\001 \001(\t\"P\n\034A" + + "piSecretChatApplyU2Response\0220\n\rdevicePro" + + "file\030\001 \001(\0132\031.core.SimpleDeviceProfile2o\n" + + "\033ApiSecretChatApplyU2Service\022P\n\007applyU2\022" + + "!.site.ApiSecretChatApplyU2Request\032\".sit" + + "e.ApiSecretChatApplyU2ResponseB2\n\025com.ak" + + "axin.proto.siteB\031ApiSecretChatApplyU2Pro" + + "tob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.DeviceProto.getDescriptor(), + }, assigner); + internal_static_site_ApiSecretChatApplyU2Request_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiSecretChatApplyU2Request_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiSecretChatApplyU2Request_descriptor, + new java.lang.String[] { "SiteFriendId", }); + internal_static_site_ApiSecretChatApplyU2Response_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiSecretChatApplyU2Response_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiSecretChatApplyU2Response_descriptor, + new java.lang.String[] { "DeviceProfile", }); + com.akaxin.proto.core.DeviceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiSiteConfigProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiSiteConfigProto.java new file mode 100755 index 0000000..757daa4 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiSiteConfigProto.java @@ -0,0 +1,1103 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_site_config.proto + +package com.akaxin.proto.site; + +public final class ApiSiteConfigProto { + private ApiSiteConfigProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiSiteConfigRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiSiteConfigRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiSiteConfigRequest} + */ + public static final class ApiSiteConfigRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiSiteConfigRequest) + ApiSiteConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiSiteConfigRequest.newBuilder() to construct. + private ApiSiteConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiSiteConfigRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiSiteConfigRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSiteConfigProto.internal_static_site_ApiSiteConfigRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSiteConfigProto.internal_static_site_ApiSiteConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest.class, com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest other = (com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiSiteConfigRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiSiteConfigRequest) + com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSiteConfigProto.internal_static_site_ApiSiteConfigRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSiteConfigProto.internal_static_site_ApiSiteConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest.class, com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiSiteConfigProto.internal_static_site_ApiSiteConfigRequest_descriptor; + } + + public com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest build() { + com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest buildPartial() { + com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest result = new com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest) { + return mergeFrom((com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest other) { + if (other == com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiSiteConfigRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiSiteConfigRequest) + private static final com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest(); + } + + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiSiteConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiSiteConfigRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiSiteConfigResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiSiteConfigResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *信息配置,Key为SiteConfigKey
+     * 
+ * + * .core.SiteConfig site_config = 1; + */ + boolean hasSiteConfig(); + /** + *
+     *信息配置,Key为SiteConfigKey
+     * 
+ * + * .core.SiteConfig site_config = 1; + */ + com.akaxin.proto.core.ConfigProto.SiteConfig getSiteConfig(); + /** + *
+     *信息配置,Key为SiteConfigKey
+     * 
+ * + * .core.SiteConfig site_config = 1; + */ + com.akaxin.proto.core.ConfigProto.SiteConfigOrBuilder getSiteConfigOrBuilder(); + } + /** + * Protobuf type {@code site.ApiSiteConfigResponse} + */ + public static final class ApiSiteConfigResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiSiteConfigResponse) + ApiSiteConfigResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiSiteConfigResponse.newBuilder() to construct. + private ApiSiteConfigResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiSiteConfigResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiSiteConfigResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.ConfigProto.SiteConfig.Builder subBuilder = null; + if (siteConfig_ != null) { + subBuilder = siteConfig_.toBuilder(); + } + siteConfig_ = input.readMessage(com.akaxin.proto.core.ConfigProto.SiteConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(siteConfig_); + siteConfig_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSiteConfigProto.internal_static_site_ApiSiteConfigResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSiteConfigProto.internal_static_site_ApiSiteConfigResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse.class, com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse.Builder.class); + } + + public static final int SITE_CONFIG_FIELD_NUMBER = 1; + private com.akaxin.proto.core.ConfigProto.SiteConfig siteConfig_; + /** + *
+     *信息配置,Key为SiteConfigKey
+     * 
+ * + * .core.SiteConfig site_config = 1; + */ + public boolean hasSiteConfig() { + return siteConfig_ != null; + } + /** + *
+     *信息配置,Key为SiteConfigKey
+     * 
+ * + * .core.SiteConfig site_config = 1; + */ + public com.akaxin.proto.core.ConfigProto.SiteConfig getSiteConfig() { + return siteConfig_ == null ? com.akaxin.proto.core.ConfigProto.SiteConfig.getDefaultInstance() : siteConfig_; + } + /** + *
+     *信息配置,Key为SiteConfigKey
+     * 
+ * + * .core.SiteConfig site_config = 1; + */ + public com.akaxin.proto.core.ConfigProto.SiteConfigOrBuilder getSiteConfigOrBuilder() { + return getSiteConfig(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (siteConfig_ != null) { + output.writeMessage(1, getSiteConfig()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (siteConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getSiteConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse other = (com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse) obj; + + boolean result = true; + result = result && (hasSiteConfig() == other.hasSiteConfig()); + if (hasSiteConfig()) { + result = result && getSiteConfig() + .equals(other.getSiteConfig()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSiteConfig()) { + hash = (37 * hash) + SITE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSiteConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiSiteConfigResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiSiteConfigResponse) + com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSiteConfigProto.internal_static_site_ApiSiteConfigResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSiteConfigProto.internal_static_site_ApiSiteConfigResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse.class, com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (siteConfigBuilder_ == null) { + siteConfig_ = null; + } else { + siteConfig_ = null; + siteConfigBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiSiteConfigProto.internal_static_site_ApiSiteConfigResponse_descriptor; + } + + public com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse build() { + com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse buildPartial() { + com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse result = new com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse(this); + if (siteConfigBuilder_ == null) { + result.siteConfig_ = siteConfig_; + } else { + result.siteConfig_ = siteConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse) { + return mergeFrom((com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse other) { + if (other == com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse.getDefaultInstance()) return this; + if (other.hasSiteConfig()) { + mergeSiteConfig(other.getSiteConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.core.ConfigProto.SiteConfig siteConfig_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.ConfigProto.SiteConfig, com.akaxin.proto.core.ConfigProto.SiteConfig.Builder, com.akaxin.proto.core.ConfigProto.SiteConfigOrBuilder> siteConfigBuilder_; + /** + *
+       *信息配置,Key为SiteConfigKey
+       * 
+ * + * .core.SiteConfig site_config = 1; + */ + public boolean hasSiteConfig() { + return siteConfigBuilder_ != null || siteConfig_ != null; + } + /** + *
+       *信息配置,Key为SiteConfigKey
+       * 
+ * + * .core.SiteConfig site_config = 1; + */ + public com.akaxin.proto.core.ConfigProto.SiteConfig getSiteConfig() { + if (siteConfigBuilder_ == null) { + return siteConfig_ == null ? com.akaxin.proto.core.ConfigProto.SiteConfig.getDefaultInstance() : siteConfig_; + } else { + return siteConfigBuilder_.getMessage(); + } + } + /** + *
+       *信息配置,Key为SiteConfigKey
+       * 
+ * + * .core.SiteConfig site_config = 1; + */ + public Builder setSiteConfig(com.akaxin.proto.core.ConfigProto.SiteConfig value) { + if (siteConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + siteConfig_ = value; + onChanged(); + } else { + siteConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *信息配置,Key为SiteConfigKey
+       * 
+ * + * .core.SiteConfig site_config = 1; + */ + public Builder setSiteConfig( + com.akaxin.proto.core.ConfigProto.SiteConfig.Builder builderForValue) { + if (siteConfigBuilder_ == null) { + siteConfig_ = builderForValue.build(); + onChanged(); + } else { + siteConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *信息配置,Key为SiteConfigKey
+       * 
+ * + * .core.SiteConfig site_config = 1; + */ + public Builder mergeSiteConfig(com.akaxin.proto.core.ConfigProto.SiteConfig value) { + if (siteConfigBuilder_ == null) { + if (siteConfig_ != null) { + siteConfig_ = + com.akaxin.proto.core.ConfigProto.SiteConfig.newBuilder(siteConfig_).mergeFrom(value).buildPartial(); + } else { + siteConfig_ = value; + } + onChanged(); + } else { + siteConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *信息配置,Key为SiteConfigKey
+       * 
+ * + * .core.SiteConfig site_config = 1; + */ + public Builder clearSiteConfig() { + if (siteConfigBuilder_ == null) { + siteConfig_ = null; + onChanged(); + } else { + siteConfig_ = null; + siteConfigBuilder_ = null; + } + + return this; + } + /** + *
+       *信息配置,Key为SiteConfigKey
+       * 
+ * + * .core.SiteConfig site_config = 1; + */ + public com.akaxin.proto.core.ConfigProto.SiteConfig.Builder getSiteConfigBuilder() { + + onChanged(); + return getSiteConfigFieldBuilder().getBuilder(); + } + /** + *
+       *信息配置,Key为SiteConfigKey
+       * 
+ * + * .core.SiteConfig site_config = 1; + */ + public com.akaxin.proto.core.ConfigProto.SiteConfigOrBuilder getSiteConfigOrBuilder() { + if (siteConfigBuilder_ != null) { + return siteConfigBuilder_.getMessageOrBuilder(); + } else { + return siteConfig_ == null ? + com.akaxin.proto.core.ConfigProto.SiteConfig.getDefaultInstance() : siteConfig_; + } + } + /** + *
+       *信息配置,Key为SiteConfigKey
+       * 
+ * + * .core.SiteConfig site_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.ConfigProto.SiteConfig, com.akaxin.proto.core.ConfigProto.SiteConfig.Builder, com.akaxin.proto.core.ConfigProto.SiteConfigOrBuilder> + getSiteConfigFieldBuilder() { + if (siteConfigBuilder_ == null) { + siteConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.ConfigProto.SiteConfig, com.akaxin.proto.core.ConfigProto.SiteConfig.Builder, com.akaxin.proto.core.ConfigProto.SiteConfigOrBuilder>( + getSiteConfig(), + getParentForChildren(), + isClean()); + siteConfig_ = null; + } + return siteConfigBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiSiteConfigResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiSiteConfigResponse) + private static final com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse(); + } + + public static com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiSiteConfigResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiSiteConfigResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiSiteConfigProto.ApiSiteConfigResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiSiteConfigRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiSiteConfigRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiSiteConfigResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiSiteConfigResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032site/api_site_config.proto\022\004site\032\021core" + + "/config.proto\"\026\n\024ApiSiteConfigRequest\">\n" + + "\025ApiSiteConfigResponse\022%\n\013site_config\030\001 " + + "\001(\0132\020.core.SiteConfig2Y\n\024ApiSiteConfigSe" + + "rvice\022A\n\006config\022\032.site.ApiSiteConfigRequ" + + "est\032\033.site.ApiSiteConfigResponseB+\n\025com." + + "akaxin.proto.siteB\022ApiSiteConfigProtob\006p" + + "roto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.ConfigProto.getDescriptor(), + }, assigner); + internal_static_site_ApiSiteConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiSiteConfigRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiSiteConfigRequest_descriptor, + new java.lang.String[] { }); + internal_static_site_ApiSiteConfigResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiSiteConfigResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiSiteConfigResponse_descriptor, + new java.lang.String[] { "SiteConfig", }); + com.akaxin.proto.core.ConfigProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiSiteLoginProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiSiteLoginProto.java new file mode 100755 index 0000000..efb6068 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiSiteLoginProto.java @@ -0,0 +1,2582 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_site_login.proto + +package com.akaxin.proto.site; + +public final class ApiSiteLoginProto { + private ApiSiteLoginProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiSiteLoginRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiSiteLoginRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户个人身份公钥
+     * 
+ * + * string user_id_pubk = 1; + */ + java.lang.String getUserIdPubk(); + /** + *
+     *用户个人身份公钥
+     * 
+ * + * string user_id_pubk = 1; + */ + com.google.protobuf.ByteString + getUserIdPubkBytes(); + + /** + *
+     *用户设备公钥
+     * 
+ * + * string user_device_id_pubk = 2; + */ + java.lang.String getUserDeviceIdPubk(); + /** + *
+     *用户设备公钥
+     * 
+ * + * string user_device_id_pubk = 2; + */ + com.google.protobuf.ByteString + getUserDeviceIdPubkBytes(); + + /** + *
+     *手机号授权token
+     * 
+ * + * string phone_token = 3; + */ + java.lang.String getPhoneToken(); + /** + *
+     *手机号授权token
+     * 
+ * + * string phone_token = 3; + */ + com.google.protobuf.ByteString + getPhoneTokenBytes(); + + /** + *
+     *用户设备名称
+     * 
+ * + * string user_device_name = 4; + */ + java.lang.String getUserDeviceName(); + /** + *
+     *用户设备名称
+     * 
+ * + * string user_device_name = 4; + */ + com.google.protobuf.ByteString + getUserDeviceNameBytes(); + + /** + *
+     *akaxin认证token
+     * 
+ * + * string user_token = 5; + */ + java.lang.String getUserToken(); + /** + *
+     *akaxin认证token
+     * 
+ * + * string user_token = 5; + */ + com.google.protobuf.ByteString + getUserTokenBytes(); + + /** + *
+     *用户身份公钥签名,证明公钥所属权,需要base64encode。
+     * 
+ * + * string user_id_sign_base64 = 6; + */ + java.lang.String getUserIdSignBase64(); + /** + *
+     *用户身份公钥签名,证明公钥所属权,需要base64encode。
+     * 
+ * + * string user_id_sign_base64 = 6; + */ + com.google.protobuf.ByteString + getUserIdSignBase64Bytes(); + + /** + *
+     *使用user_id_prik对用户的user_device_id_pubk签名,证明这个设备是这个用户的。
+     * 
+ * + * string user_device_id_sign_base64 = 7; + */ + java.lang.String getUserDeviceIdSignBase64(); + /** + *
+     *使用user_id_prik对用户的user_device_id_pubk签名,证明这个设备是这个用户的。
+     * 
+ * + * string user_device_id_sign_base64 = 7; + */ + com.google.protobuf.ByteString + getUserDeviceIdSignBase64Bytes(); + } + /** + * Protobuf type {@code site.ApiSiteLoginRequest} + */ + public static final class ApiSiteLoginRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiSiteLoginRequest) + ApiSiteLoginRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiSiteLoginRequest.newBuilder() to construct. + private ApiSiteLoginRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiSiteLoginRequest() { + userIdPubk_ = ""; + userDeviceIdPubk_ = ""; + phoneToken_ = ""; + userDeviceName_ = ""; + userToken_ = ""; + userIdSignBase64_ = ""; + userDeviceIdSignBase64_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiSiteLoginRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + userIdPubk_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + userDeviceIdPubk_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + phoneToken_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + userDeviceName_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + userToken_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + userIdSignBase64_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + userDeviceIdSignBase64_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSiteLoginProto.internal_static_site_ApiSiteLoginRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSiteLoginProto.internal_static_site_ApiSiteLoginRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest.class, com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest.Builder.class); + } + + public static final int USER_ID_PUBK_FIELD_NUMBER = 1; + private volatile java.lang.Object userIdPubk_; + /** + *
+     *用户个人身份公钥
+     * 
+ * + * string user_id_pubk = 1; + */ + public java.lang.String getUserIdPubk() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPubk_ = s; + return s; + } + } + /** + *
+     *用户个人身份公钥
+     * 
+ * + * string user_id_pubk = 1; + */ + public com.google.protobuf.ByteString + getUserIdPubkBytes() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_DEVICE_ID_PUBK_FIELD_NUMBER = 2; + private volatile java.lang.Object userDeviceIdPubk_; + /** + *
+     *用户设备公钥
+     * 
+ * + * string user_device_id_pubk = 2; + */ + public java.lang.String getUserDeviceIdPubk() { + java.lang.Object ref = userDeviceIdPubk_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userDeviceIdPubk_ = s; + return s; + } + } + /** + *
+     *用户设备公钥
+     * 
+ * + * string user_device_id_pubk = 2; + */ + public com.google.protobuf.ByteString + getUserDeviceIdPubkBytes() { + java.lang.Object ref = userDeviceIdPubk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userDeviceIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PHONE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object phoneToken_; + /** + *
+     *手机号授权token
+     * 
+ * + * string phone_token = 3; + */ + public java.lang.String getPhoneToken() { + java.lang.Object ref = phoneToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phoneToken_ = s; + return s; + } + } + /** + *
+     *手机号授权token
+     * 
+ * + * string phone_token = 3; + */ + public com.google.protobuf.ByteString + getPhoneTokenBytes() { + java.lang.Object ref = phoneToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + phoneToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_DEVICE_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object userDeviceName_; + /** + *
+     *用户设备名称
+     * 
+ * + * string user_device_name = 4; + */ + public java.lang.String getUserDeviceName() { + java.lang.Object ref = userDeviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userDeviceName_ = s; + return s; + } + } + /** + *
+     *用户设备名称
+     * 
+ * + * string user_device_name = 4; + */ + public com.google.protobuf.ByteString + getUserDeviceNameBytes() { + java.lang.Object ref = userDeviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userDeviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_TOKEN_FIELD_NUMBER = 5; + private volatile java.lang.Object userToken_; + /** + *
+     *akaxin认证token
+     * 
+ * + * string user_token = 5; + */ + public java.lang.String getUserToken() { + java.lang.Object ref = userToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userToken_ = s; + return s; + } + } + /** + *
+     *akaxin认证token
+     * 
+ * + * string user_token = 5; + */ + public com.google.protobuf.ByteString + getUserTokenBytes() { + java.lang.Object ref = userToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_SIGN_BASE64_FIELD_NUMBER = 6; + private volatile java.lang.Object userIdSignBase64_; + /** + *
+     *用户身份公钥签名,证明公钥所属权,需要base64encode。
+     * 
+ * + * string user_id_sign_base64 = 6; + */ + public java.lang.String getUserIdSignBase64() { + java.lang.Object ref = userIdSignBase64_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdSignBase64_ = s; + return s; + } + } + /** + *
+     *用户身份公钥签名,证明公钥所属权,需要base64encode。
+     * 
+ * + * string user_id_sign_base64 = 6; + */ + public com.google.protobuf.ByteString + getUserIdSignBase64Bytes() { + java.lang.Object ref = userIdSignBase64_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdSignBase64_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_DEVICE_ID_SIGN_BASE64_FIELD_NUMBER = 7; + private volatile java.lang.Object userDeviceIdSignBase64_; + /** + *
+     *使用user_id_prik对用户的user_device_id_pubk签名,证明这个设备是这个用户的。
+     * 
+ * + * string user_device_id_sign_base64 = 7; + */ + public java.lang.String getUserDeviceIdSignBase64() { + java.lang.Object ref = userDeviceIdSignBase64_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userDeviceIdSignBase64_ = s; + return s; + } + } + /** + *
+     *使用user_id_prik对用户的user_device_id_pubk签名,证明这个设备是这个用户的。
+     * 
+ * + * string user_device_id_sign_base64 = 7; + */ + public com.google.protobuf.ByteString + getUserDeviceIdSignBase64Bytes() { + java.lang.Object ref = userDeviceIdSignBase64_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userDeviceIdSignBase64_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getUserIdPubkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userIdPubk_); + } + if (!getUserDeviceIdPubkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userDeviceIdPubk_); + } + if (!getPhoneTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, phoneToken_); + } + if (!getUserDeviceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, userDeviceName_); + } + if (!getUserTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, userToken_); + } + if (!getUserIdSignBase64Bytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, userIdSignBase64_); + } + if (!getUserDeviceIdSignBase64Bytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, userDeviceIdSignBase64_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUserIdPubkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userIdPubk_); + } + if (!getUserDeviceIdPubkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, userDeviceIdPubk_); + } + if (!getPhoneTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, phoneToken_); + } + if (!getUserDeviceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, userDeviceName_); + } + if (!getUserTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, userToken_); + } + if (!getUserIdSignBase64Bytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, userIdSignBase64_); + } + if (!getUserDeviceIdSignBase64Bytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, userDeviceIdSignBase64_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest other = (com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest) obj; + + boolean result = true; + result = result && getUserIdPubk() + .equals(other.getUserIdPubk()); + result = result && getUserDeviceIdPubk() + .equals(other.getUserDeviceIdPubk()); + result = result && getPhoneToken() + .equals(other.getPhoneToken()); + result = result && getUserDeviceName() + .equals(other.getUserDeviceName()); + result = result && getUserToken() + .equals(other.getUserToken()); + result = result && getUserIdSignBase64() + .equals(other.getUserIdSignBase64()); + result = result && getUserDeviceIdSignBase64() + .equals(other.getUserDeviceIdSignBase64()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USER_ID_PUBK_FIELD_NUMBER; + hash = (53 * hash) + getUserIdPubk().hashCode(); + hash = (37 * hash) + USER_DEVICE_ID_PUBK_FIELD_NUMBER; + hash = (53 * hash) + getUserDeviceIdPubk().hashCode(); + hash = (37 * hash) + PHONE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPhoneToken().hashCode(); + hash = (37 * hash) + USER_DEVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getUserDeviceName().hashCode(); + hash = (37 * hash) + USER_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getUserToken().hashCode(); + hash = (37 * hash) + USER_ID_SIGN_BASE64_FIELD_NUMBER; + hash = (53 * hash) + getUserIdSignBase64().hashCode(); + hash = (37 * hash) + USER_DEVICE_ID_SIGN_BASE64_FIELD_NUMBER; + hash = (53 * hash) + getUserDeviceIdSignBase64().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiSiteLoginRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiSiteLoginRequest) + com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSiteLoginProto.internal_static_site_ApiSiteLoginRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSiteLoginProto.internal_static_site_ApiSiteLoginRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest.class, com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + userIdPubk_ = ""; + + userDeviceIdPubk_ = ""; + + phoneToken_ = ""; + + userDeviceName_ = ""; + + userToken_ = ""; + + userIdSignBase64_ = ""; + + userDeviceIdSignBase64_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiSiteLoginProto.internal_static_site_ApiSiteLoginRequest_descriptor; + } + + public com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest build() { + com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest buildPartial() { + com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest result = new com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest(this); + result.userIdPubk_ = userIdPubk_; + result.userDeviceIdPubk_ = userDeviceIdPubk_; + result.phoneToken_ = phoneToken_; + result.userDeviceName_ = userDeviceName_; + result.userToken_ = userToken_; + result.userIdSignBase64_ = userIdSignBase64_; + result.userDeviceIdSignBase64_ = userDeviceIdSignBase64_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest) { + return mergeFrom((com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest other) { + if (other == com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest.getDefaultInstance()) return this; + if (!other.getUserIdPubk().isEmpty()) { + userIdPubk_ = other.userIdPubk_; + onChanged(); + } + if (!other.getUserDeviceIdPubk().isEmpty()) { + userDeviceIdPubk_ = other.userDeviceIdPubk_; + onChanged(); + } + if (!other.getPhoneToken().isEmpty()) { + phoneToken_ = other.phoneToken_; + onChanged(); + } + if (!other.getUserDeviceName().isEmpty()) { + userDeviceName_ = other.userDeviceName_; + onChanged(); + } + if (!other.getUserToken().isEmpty()) { + userToken_ = other.userToken_; + onChanged(); + } + if (!other.getUserIdSignBase64().isEmpty()) { + userIdSignBase64_ = other.userIdSignBase64_; + onChanged(); + } + if (!other.getUserDeviceIdSignBase64().isEmpty()) { + userDeviceIdSignBase64_ = other.userDeviceIdSignBase64_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object userIdPubk_ = ""; + /** + *
+       *用户个人身份公钥
+       * 
+ * + * string user_id_pubk = 1; + */ + public java.lang.String getUserIdPubk() { + java.lang.Object ref = userIdPubk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPubk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户个人身份公钥
+       * 
+ * + * string user_id_pubk = 1; + */ + public com.google.protobuf.ByteString + getUserIdPubkBytes() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户个人身份公钥
+       * 
+ * + * string user_id_pubk = 1; + */ + public Builder setUserIdPubk( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userIdPubk_ = value; + onChanged(); + return this; + } + /** + *
+       *用户个人身份公钥
+       * 
+ * + * string user_id_pubk = 1; + */ + public Builder clearUserIdPubk() { + + userIdPubk_ = getDefaultInstance().getUserIdPubk(); + onChanged(); + return this; + } + /** + *
+       *用户个人身份公钥
+       * 
+ * + * string user_id_pubk = 1; + */ + public Builder setUserIdPubkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userIdPubk_ = value; + onChanged(); + return this; + } + + private java.lang.Object userDeviceIdPubk_ = ""; + /** + *
+       *用户设备公钥
+       * 
+ * + * string user_device_id_pubk = 2; + */ + public java.lang.String getUserDeviceIdPubk() { + java.lang.Object ref = userDeviceIdPubk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userDeviceIdPubk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户设备公钥
+       * 
+ * + * string user_device_id_pubk = 2; + */ + public com.google.protobuf.ByteString + getUserDeviceIdPubkBytes() { + java.lang.Object ref = userDeviceIdPubk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userDeviceIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户设备公钥
+       * 
+ * + * string user_device_id_pubk = 2; + */ + public Builder setUserDeviceIdPubk( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userDeviceIdPubk_ = value; + onChanged(); + return this; + } + /** + *
+       *用户设备公钥
+       * 
+ * + * string user_device_id_pubk = 2; + */ + public Builder clearUserDeviceIdPubk() { + + userDeviceIdPubk_ = getDefaultInstance().getUserDeviceIdPubk(); + onChanged(); + return this; + } + /** + *
+       *用户设备公钥
+       * 
+ * + * string user_device_id_pubk = 2; + */ + public Builder setUserDeviceIdPubkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userDeviceIdPubk_ = value; + onChanged(); + return this; + } + + private java.lang.Object phoneToken_ = ""; + /** + *
+       *手机号授权token
+       * 
+ * + * string phone_token = 3; + */ + public java.lang.String getPhoneToken() { + java.lang.Object ref = phoneToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phoneToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *手机号授权token
+       * 
+ * + * string phone_token = 3; + */ + public com.google.protobuf.ByteString + getPhoneTokenBytes() { + java.lang.Object ref = phoneToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + phoneToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *手机号授权token
+       * 
+ * + * string phone_token = 3; + */ + public Builder setPhoneToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + phoneToken_ = value; + onChanged(); + return this; + } + /** + *
+       *手机号授权token
+       * 
+ * + * string phone_token = 3; + */ + public Builder clearPhoneToken() { + + phoneToken_ = getDefaultInstance().getPhoneToken(); + onChanged(); + return this; + } + /** + *
+       *手机号授权token
+       * 
+ * + * string phone_token = 3; + */ + public Builder setPhoneTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + phoneToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object userDeviceName_ = ""; + /** + *
+       *用户设备名称
+       * 
+ * + * string user_device_name = 4; + */ + public java.lang.String getUserDeviceName() { + java.lang.Object ref = userDeviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userDeviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户设备名称
+       * 
+ * + * string user_device_name = 4; + */ + public com.google.protobuf.ByteString + getUserDeviceNameBytes() { + java.lang.Object ref = userDeviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userDeviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户设备名称
+       * 
+ * + * string user_device_name = 4; + */ + public Builder setUserDeviceName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userDeviceName_ = value; + onChanged(); + return this; + } + /** + *
+       *用户设备名称
+       * 
+ * + * string user_device_name = 4; + */ + public Builder clearUserDeviceName() { + + userDeviceName_ = getDefaultInstance().getUserDeviceName(); + onChanged(); + return this; + } + /** + *
+       *用户设备名称
+       * 
+ * + * string user_device_name = 4; + */ + public Builder setUserDeviceNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userDeviceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object userToken_ = ""; + /** + *
+       *akaxin认证token
+       * 
+ * + * string user_token = 5; + */ + public java.lang.String getUserToken() { + java.lang.Object ref = userToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *akaxin认证token
+       * 
+ * + * string user_token = 5; + */ + public com.google.protobuf.ByteString + getUserTokenBytes() { + java.lang.Object ref = userToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *akaxin认证token
+       * 
+ * + * string user_token = 5; + */ + public Builder setUserToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userToken_ = value; + onChanged(); + return this; + } + /** + *
+       *akaxin认证token
+       * 
+ * + * string user_token = 5; + */ + public Builder clearUserToken() { + + userToken_ = getDefaultInstance().getUserToken(); + onChanged(); + return this; + } + /** + *
+       *akaxin认证token
+       * 
+ * + * string user_token = 5; + */ + public Builder setUserTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object userIdSignBase64_ = ""; + /** + *
+       *用户身份公钥签名,证明公钥所属权,需要base64encode。
+       * 
+ * + * string user_id_sign_base64 = 6; + */ + public java.lang.String getUserIdSignBase64() { + java.lang.Object ref = userIdSignBase64_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdSignBase64_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户身份公钥签名,证明公钥所属权,需要base64encode。
+       * 
+ * + * string user_id_sign_base64 = 6; + */ + public com.google.protobuf.ByteString + getUserIdSignBase64Bytes() { + java.lang.Object ref = userIdSignBase64_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdSignBase64_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户身份公钥签名,证明公钥所属权,需要base64encode。
+       * 
+ * + * string user_id_sign_base64 = 6; + */ + public Builder setUserIdSignBase64( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userIdSignBase64_ = value; + onChanged(); + return this; + } + /** + *
+       *用户身份公钥签名,证明公钥所属权,需要base64encode。
+       * 
+ * + * string user_id_sign_base64 = 6; + */ + public Builder clearUserIdSignBase64() { + + userIdSignBase64_ = getDefaultInstance().getUserIdSignBase64(); + onChanged(); + return this; + } + /** + *
+       *用户身份公钥签名,证明公钥所属权,需要base64encode。
+       * 
+ * + * string user_id_sign_base64 = 6; + */ + public Builder setUserIdSignBase64Bytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userIdSignBase64_ = value; + onChanged(); + return this; + } + + private java.lang.Object userDeviceIdSignBase64_ = ""; + /** + *
+       *使用user_id_prik对用户的user_device_id_pubk签名,证明这个设备是这个用户的。
+       * 
+ * + * string user_device_id_sign_base64 = 7; + */ + public java.lang.String getUserDeviceIdSignBase64() { + java.lang.Object ref = userDeviceIdSignBase64_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userDeviceIdSignBase64_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *使用user_id_prik对用户的user_device_id_pubk签名,证明这个设备是这个用户的。
+       * 
+ * + * string user_device_id_sign_base64 = 7; + */ + public com.google.protobuf.ByteString + getUserDeviceIdSignBase64Bytes() { + java.lang.Object ref = userDeviceIdSignBase64_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userDeviceIdSignBase64_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *使用user_id_prik对用户的user_device_id_pubk签名,证明这个设备是这个用户的。
+       * 
+ * + * string user_device_id_sign_base64 = 7; + */ + public Builder setUserDeviceIdSignBase64( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userDeviceIdSignBase64_ = value; + onChanged(); + return this; + } + /** + *
+       *使用user_id_prik对用户的user_device_id_pubk签名,证明这个设备是这个用户的。
+       * 
+ * + * string user_device_id_sign_base64 = 7; + */ + public Builder clearUserDeviceIdSignBase64() { + + userDeviceIdSignBase64_ = getDefaultInstance().getUserDeviceIdSignBase64(); + onChanged(); + return this; + } + /** + *
+       *使用user_id_prik对用户的user_device_id_pubk签名,证明这个设备是这个用户的。
+       * 
+ * + * string user_device_id_sign_base64 = 7; + */ + public Builder setUserDeviceIdSignBase64Bytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userDeviceIdSignBase64_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiSiteLoginRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiSiteLoginRequest) + private static final com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest(); + } + + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiSiteLoginRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiSiteLoginRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiSiteLoginResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiSiteLoginResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户个人sessionId
+     * 
+ * + * string user_session_id = 1; + */ + java.lang.String getUserSessionId(); + /** + *
+     *用户个人sessionId
+     * 
+ * + * string user_session_id = 1; + */ + com.google.protobuf.ByteString + getUserSessionIdBytes(); + + /** + *
+     *返回站点用户ID
+     * 
+ * + * string site_user_id = 2; + */ + java.lang.String getSiteUserId(); + /** + *
+     *返回站点用户ID
+     * 
+ * + * string site_user_id = 2; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *返回站点的设备ID
+     * 
+ * + * string site_device_id = 3; + */ + java.lang.String getSiteDeviceId(); + /** + *
+     *返回站点的设备ID
+     * 
+ * + * string site_device_id = 3; + */ + com.google.protobuf.ByteString + getSiteDeviceIdBytes(); + } + /** + * Protobuf type {@code site.ApiSiteLoginResponse} + */ + public static final class ApiSiteLoginResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiSiteLoginResponse) + ApiSiteLoginResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiSiteLoginResponse.newBuilder() to construct. + private ApiSiteLoginResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiSiteLoginResponse() { + userSessionId_ = ""; + siteUserId_ = ""; + siteDeviceId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiSiteLoginResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + userSessionId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + siteDeviceId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSiteLoginProto.internal_static_site_ApiSiteLoginResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSiteLoginProto.internal_static_site_ApiSiteLoginResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse.class, com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse.Builder.class); + } + + public static final int USER_SESSION_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object userSessionId_; + /** + *
+     *用户个人sessionId
+     * 
+ * + * string user_session_id = 1; + */ + public java.lang.String getUserSessionId() { + java.lang.Object ref = userSessionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userSessionId_ = s; + return s; + } + } + /** + *
+     *用户个人sessionId
+     * 
+ * + * string user_session_id = 1; + */ + public com.google.protobuf.ByteString + getUserSessionIdBytes() { + java.lang.Object ref = userSessionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userSessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteUserId_; + /** + *
+     *返回站点用户ID
+     * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *返回站点用户ID
+     * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_DEVICE_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object siteDeviceId_; + /** + *
+     *返回站点的设备ID
+     * 
+ * + * string site_device_id = 3; + */ + public java.lang.String getSiteDeviceId() { + java.lang.Object ref = siteDeviceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteDeviceId_ = s; + return s; + } + } + /** + *
+     *返回站点的设备ID
+     * 
+ * + * string site_device_id = 3; + */ + public com.google.protobuf.ByteString + getSiteDeviceIdBytes() { + java.lang.Object ref = siteDeviceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getUserSessionIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userSessionId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteUserId_); + } + if (!getSiteDeviceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, siteDeviceId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUserSessionIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userSessionId_); + } + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteUserId_); + } + if (!getSiteDeviceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, siteDeviceId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse other = (com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse) obj; + + boolean result = true; + result = result && getUserSessionId() + .equals(other.getUserSessionId()); + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteDeviceId() + .equals(other.getSiteDeviceId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USER_SESSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserSessionId().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteDeviceId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiSiteLoginResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiSiteLoginResponse) + com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSiteLoginProto.internal_static_site_ApiSiteLoginResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSiteLoginProto.internal_static_site_ApiSiteLoginResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse.class, com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + userSessionId_ = ""; + + siteUserId_ = ""; + + siteDeviceId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiSiteLoginProto.internal_static_site_ApiSiteLoginResponse_descriptor; + } + + public com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse build() { + com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse buildPartial() { + com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse result = new com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse(this); + result.userSessionId_ = userSessionId_; + result.siteUserId_ = siteUserId_; + result.siteDeviceId_ = siteDeviceId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse) { + return mergeFrom((com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse other) { + if (other == com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse.getDefaultInstance()) return this; + if (!other.getUserSessionId().isEmpty()) { + userSessionId_ = other.userSessionId_; + onChanged(); + } + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteDeviceId().isEmpty()) { + siteDeviceId_ = other.siteDeviceId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object userSessionId_ = ""; + /** + *
+       *用户个人sessionId
+       * 
+ * + * string user_session_id = 1; + */ + public java.lang.String getUserSessionId() { + java.lang.Object ref = userSessionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userSessionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户个人sessionId
+       * 
+ * + * string user_session_id = 1; + */ + public com.google.protobuf.ByteString + getUserSessionIdBytes() { + java.lang.Object ref = userSessionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userSessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户个人sessionId
+       * 
+ * + * string user_session_id = 1; + */ + public Builder setUserSessionId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userSessionId_ = value; + onChanged(); + return this; + } + /** + *
+       *用户个人sessionId
+       * 
+ * + * string user_session_id = 1; + */ + public Builder clearUserSessionId() { + + userSessionId_ = getDefaultInstance().getUserSessionId(); + onChanged(); + return this; + } + /** + *
+       *用户个人sessionId
+       * 
+ * + * string user_session_id = 1; + */ + public Builder setUserSessionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userSessionId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *返回站点用户ID
+       * 
+ * + * string site_user_id = 2; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *返回站点用户ID
+       * 
+ * + * string site_user_id = 2; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *返回站点用户ID
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *返回站点用户ID
+       * 
+ * + * string site_user_id = 2; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *返回站点用户ID
+       * 
+ * + * string site_user_id = 2; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteDeviceId_ = ""; + /** + *
+       *返回站点的设备ID
+       * 
+ * + * string site_device_id = 3; + */ + public java.lang.String getSiteDeviceId() { + java.lang.Object ref = siteDeviceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteDeviceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *返回站点的设备ID
+       * 
+ * + * string site_device_id = 3; + */ + public com.google.protobuf.ByteString + getSiteDeviceIdBytes() { + java.lang.Object ref = siteDeviceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *返回站点的设备ID
+       * 
+ * + * string site_device_id = 3; + */ + public Builder setSiteDeviceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteDeviceId_ = value; + onChanged(); + return this; + } + /** + *
+       *返回站点的设备ID
+       * 
+ * + * string site_device_id = 3; + */ + public Builder clearSiteDeviceId() { + + siteDeviceId_ = getDefaultInstance().getSiteDeviceId(); + onChanged(); + return this; + } + /** + *
+       *返回站点的设备ID
+       * 
+ * + * string site_device_id = 3; + */ + public Builder setSiteDeviceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteDeviceId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiSiteLoginResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiSiteLoginResponse) + private static final com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse(); + } + + public static com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiSiteLoginResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiSiteLoginResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiSiteLoginProto.ApiSiteLoginResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiSiteLoginRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiSiteLoginRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiSiteLoginResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiSiteLoginResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031site/api_site_login.proto\022\004site\"\314\001\n\023Ap" + + "iSiteLoginRequest\022\024\n\014user_id_pubk\030\001 \001(\t\022" + + "\033\n\023user_device_id_pubk\030\002 \001(\t\022\023\n\013phone_to" + + "ken\030\003 \001(\t\022\030\n\020user_device_name\030\004 \001(\t\022\022\n\nu" + + "ser_token\030\005 \001(\t\022\033\n\023user_id_sign_base64\030\006" + + " \001(\t\022\"\n\032user_device_id_sign_base64\030\007 \001(\t" + + "\"]\n\024ApiSiteLoginResponse\022\027\n\017user_session" + + "_id\030\001 \001(\t\022\024\n\014site_user_id\030\002 \001(\t\022\026\n\016site_" + + "device_id\030\003 \001(\t2U\n\023ApiSiteLoginService\022>" + + "\n\005login\022\031.site.ApiSiteLoginRequest\032\032.sit" + + "e.ApiSiteLoginResponseB*\n\025com.akaxin.pro" + + "to.siteB\021ApiSiteLoginProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiSiteLoginRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiSiteLoginRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiSiteLoginRequest_descriptor, + new java.lang.String[] { "UserIdPubk", "UserDeviceIdPubk", "PhoneToken", "UserDeviceName", "UserToken", "UserIdSignBase64", "UserDeviceIdSignBase64", }); + internal_static_site_ApiSiteLoginResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiSiteLoginResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiSiteLoginResponse_descriptor, + new java.lang.String[] { "UserSessionId", "SiteUserId", "SiteDeviceId", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiSiteLogoutProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiSiteLogoutProto.java new file mode 100755 index 0000000..0086deb --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiSiteLogoutProto.java @@ -0,0 +1,1374 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_site_logout.proto + +package com.akaxin.proto.site; + +public final class ApiSiteLogoutProto { + private ApiSiteLogoutProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiSiteLogoutRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiSiteLogoutRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户个人身份公钥
+     * 
+ * + * string user_id_pubk = 1; + */ + java.lang.String getUserIdPubk(); + /** + *
+     *用户个人身份公钥
+     * 
+ * + * string user_id_pubk = 1; + */ + com.google.protobuf.ByteString + getUserIdPubkBytes(); + + /** + *
+     *用户设备公钥
+     * 
+ * + * string user_device_id_pubk = 2; + */ + java.lang.String getUserDeviceIdPubk(); + /** + *
+     *用户设备公钥
+     * 
+ * + * string user_device_id_pubk = 2; + */ + com.google.protobuf.ByteString + getUserDeviceIdPubkBytes(); + + /** + *
+     *用户设备签名
+     * 
+ * + * string user_device_id_sign = 3; + */ + java.lang.String getUserDeviceIdSign(); + /** + *
+     *用户设备签名
+     * 
+ * + * string user_device_id_sign = 3; + */ + com.google.protobuf.ByteString + getUserDeviceIdSignBytes(); + } + /** + * Protobuf type {@code site.ApiSiteLogoutRequest} + */ + public static final class ApiSiteLogoutRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiSiteLogoutRequest) + ApiSiteLogoutRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiSiteLogoutRequest.newBuilder() to construct. + private ApiSiteLogoutRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiSiteLogoutRequest() { + userIdPubk_ = ""; + userDeviceIdPubk_ = ""; + userDeviceIdSign_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiSiteLogoutRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + userIdPubk_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + userDeviceIdPubk_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + userDeviceIdSign_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSiteLogoutProto.internal_static_site_ApiSiteLogoutRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSiteLogoutProto.internal_static_site_ApiSiteLogoutRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest.class, com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest.Builder.class); + } + + public static final int USER_ID_PUBK_FIELD_NUMBER = 1; + private volatile java.lang.Object userIdPubk_; + /** + *
+     *用户个人身份公钥
+     * 
+ * + * string user_id_pubk = 1; + */ + public java.lang.String getUserIdPubk() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPubk_ = s; + return s; + } + } + /** + *
+     *用户个人身份公钥
+     * 
+ * + * string user_id_pubk = 1; + */ + public com.google.protobuf.ByteString + getUserIdPubkBytes() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_DEVICE_ID_PUBK_FIELD_NUMBER = 2; + private volatile java.lang.Object userDeviceIdPubk_; + /** + *
+     *用户设备公钥
+     * 
+ * + * string user_device_id_pubk = 2; + */ + public java.lang.String getUserDeviceIdPubk() { + java.lang.Object ref = userDeviceIdPubk_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userDeviceIdPubk_ = s; + return s; + } + } + /** + *
+     *用户设备公钥
+     * 
+ * + * string user_device_id_pubk = 2; + */ + public com.google.protobuf.ByteString + getUserDeviceIdPubkBytes() { + java.lang.Object ref = userDeviceIdPubk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userDeviceIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_DEVICE_ID_SIGN_FIELD_NUMBER = 3; + private volatile java.lang.Object userDeviceIdSign_; + /** + *
+     *用户设备签名
+     * 
+ * + * string user_device_id_sign = 3; + */ + public java.lang.String getUserDeviceIdSign() { + java.lang.Object ref = userDeviceIdSign_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userDeviceIdSign_ = s; + return s; + } + } + /** + *
+     *用户设备签名
+     * 
+ * + * string user_device_id_sign = 3; + */ + public com.google.protobuf.ByteString + getUserDeviceIdSignBytes() { + java.lang.Object ref = userDeviceIdSign_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userDeviceIdSign_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getUserIdPubkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userIdPubk_); + } + if (!getUserDeviceIdPubkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userDeviceIdPubk_); + } + if (!getUserDeviceIdSignBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userDeviceIdSign_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUserIdPubkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userIdPubk_); + } + if (!getUserDeviceIdPubkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, userDeviceIdPubk_); + } + if (!getUserDeviceIdSignBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userDeviceIdSign_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest other = (com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest) obj; + + boolean result = true; + result = result && getUserIdPubk() + .equals(other.getUserIdPubk()); + result = result && getUserDeviceIdPubk() + .equals(other.getUserDeviceIdPubk()); + result = result && getUserDeviceIdSign() + .equals(other.getUserDeviceIdSign()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USER_ID_PUBK_FIELD_NUMBER; + hash = (53 * hash) + getUserIdPubk().hashCode(); + hash = (37 * hash) + USER_DEVICE_ID_PUBK_FIELD_NUMBER; + hash = (53 * hash) + getUserDeviceIdPubk().hashCode(); + hash = (37 * hash) + USER_DEVICE_ID_SIGN_FIELD_NUMBER; + hash = (53 * hash) + getUserDeviceIdSign().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiSiteLogoutRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiSiteLogoutRequest) + com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSiteLogoutProto.internal_static_site_ApiSiteLogoutRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSiteLogoutProto.internal_static_site_ApiSiteLogoutRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest.class, com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + userIdPubk_ = ""; + + userDeviceIdPubk_ = ""; + + userDeviceIdSign_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiSiteLogoutProto.internal_static_site_ApiSiteLogoutRequest_descriptor; + } + + public com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest build() { + com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest buildPartial() { + com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest result = new com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest(this); + result.userIdPubk_ = userIdPubk_; + result.userDeviceIdPubk_ = userDeviceIdPubk_; + result.userDeviceIdSign_ = userDeviceIdSign_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest) { + return mergeFrom((com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest other) { + if (other == com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest.getDefaultInstance()) return this; + if (!other.getUserIdPubk().isEmpty()) { + userIdPubk_ = other.userIdPubk_; + onChanged(); + } + if (!other.getUserDeviceIdPubk().isEmpty()) { + userDeviceIdPubk_ = other.userDeviceIdPubk_; + onChanged(); + } + if (!other.getUserDeviceIdSign().isEmpty()) { + userDeviceIdSign_ = other.userDeviceIdSign_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object userIdPubk_ = ""; + /** + *
+       *用户个人身份公钥
+       * 
+ * + * string user_id_pubk = 1; + */ + public java.lang.String getUserIdPubk() { + java.lang.Object ref = userIdPubk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPubk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户个人身份公钥
+       * 
+ * + * string user_id_pubk = 1; + */ + public com.google.protobuf.ByteString + getUserIdPubkBytes() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户个人身份公钥
+       * 
+ * + * string user_id_pubk = 1; + */ + public Builder setUserIdPubk( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userIdPubk_ = value; + onChanged(); + return this; + } + /** + *
+       *用户个人身份公钥
+       * 
+ * + * string user_id_pubk = 1; + */ + public Builder clearUserIdPubk() { + + userIdPubk_ = getDefaultInstance().getUserIdPubk(); + onChanged(); + return this; + } + /** + *
+       *用户个人身份公钥
+       * 
+ * + * string user_id_pubk = 1; + */ + public Builder setUserIdPubkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userIdPubk_ = value; + onChanged(); + return this; + } + + private java.lang.Object userDeviceIdPubk_ = ""; + /** + *
+       *用户设备公钥
+       * 
+ * + * string user_device_id_pubk = 2; + */ + public java.lang.String getUserDeviceIdPubk() { + java.lang.Object ref = userDeviceIdPubk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userDeviceIdPubk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户设备公钥
+       * 
+ * + * string user_device_id_pubk = 2; + */ + public com.google.protobuf.ByteString + getUserDeviceIdPubkBytes() { + java.lang.Object ref = userDeviceIdPubk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userDeviceIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户设备公钥
+       * 
+ * + * string user_device_id_pubk = 2; + */ + public Builder setUserDeviceIdPubk( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userDeviceIdPubk_ = value; + onChanged(); + return this; + } + /** + *
+       *用户设备公钥
+       * 
+ * + * string user_device_id_pubk = 2; + */ + public Builder clearUserDeviceIdPubk() { + + userDeviceIdPubk_ = getDefaultInstance().getUserDeviceIdPubk(); + onChanged(); + return this; + } + /** + *
+       *用户设备公钥
+       * 
+ * + * string user_device_id_pubk = 2; + */ + public Builder setUserDeviceIdPubkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userDeviceIdPubk_ = value; + onChanged(); + return this; + } + + private java.lang.Object userDeviceIdSign_ = ""; + /** + *
+       *用户设备签名
+       * 
+ * + * string user_device_id_sign = 3; + */ + public java.lang.String getUserDeviceIdSign() { + java.lang.Object ref = userDeviceIdSign_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userDeviceIdSign_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户设备签名
+       * 
+ * + * string user_device_id_sign = 3; + */ + public com.google.protobuf.ByteString + getUserDeviceIdSignBytes() { + java.lang.Object ref = userDeviceIdSign_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userDeviceIdSign_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户设备签名
+       * 
+ * + * string user_device_id_sign = 3; + */ + public Builder setUserDeviceIdSign( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userDeviceIdSign_ = value; + onChanged(); + return this; + } + /** + *
+       *用户设备签名
+       * 
+ * + * string user_device_id_sign = 3; + */ + public Builder clearUserDeviceIdSign() { + + userDeviceIdSign_ = getDefaultInstance().getUserDeviceIdSign(); + onChanged(); + return this; + } + /** + *
+       *用户设备签名
+       * 
+ * + * string user_device_id_sign = 3; + */ + public Builder setUserDeviceIdSignBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userDeviceIdSign_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiSiteLogoutRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiSiteLogoutRequest) + private static final com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest(); + } + + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiSiteLogoutRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiSiteLogoutRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiSiteLogoutResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiSiteLogoutResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   *无需返回数据,只需要返回errorCode
+   * 
+ * + * Protobuf type {@code site.ApiSiteLogoutResponse} + */ + public static final class ApiSiteLogoutResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiSiteLogoutResponse) + ApiSiteLogoutResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiSiteLogoutResponse.newBuilder() to construct. + private ApiSiteLogoutResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiSiteLogoutResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiSiteLogoutResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSiteLogoutProto.internal_static_site_ApiSiteLogoutResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSiteLogoutProto.internal_static_site_ApiSiteLogoutResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse.class, com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse other = (com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *无需返回数据,只需要返回errorCode
+     * 
+ * + * Protobuf type {@code site.ApiSiteLogoutResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiSiteLogoutResponse) + com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSiteLogoutProto.internal_static_site_ApiSiteLogoutResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSiteLogoutProto.internal_static_site_ApiSiteLogoutResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse.class, com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiSiteLogoutProto.internal_static_site_ApiSiteLogoutResponse_descriptor; + } + + public com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse build() { + com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse buildPartial() { + com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse result = new com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse) { + return mergeFrom((com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse other) { + if (other == com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiSiteLogoutResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiSiteLogoutResponse) + private static final com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse(); + } + + public static com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiSiteLogoutResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiSiteLogoutResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiSiteLogoutProto.ApiSiteLogoutResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiSiteLogoutRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiSiteLogoutRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiSiteLogoutResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiSiteLogoutResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032site/api_site_logout.proto\022\004site\"f\n\024Ap" + + "iSiteLogoutRequest\022\024\n\014user_id_pubk\030\001 \001(\t" + + "\022\033\n\023user_device_id_pubk\030\002 \001(\t\022\033\n\023user_de" + + "vice_id_sign\030\003 \001(\t\"\027\n\025ApiSiteLogoutRespo" + + "nse2Y\n\024ApiSiteLogoutService\022A\n\006logout\022\032." + + "site.ApiSiteLogoutRequest\032\033.site.ApiSite" + + "LogoutResponseB+\n\025com.akaxin.proto.siteB" + + "\022ApiSiteLogoutProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiSiteLogoutRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiSiteLogoutRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiSiteLogoutRequest_descriptor, + new java.lang.String[] { "UserIdPubk", "UserDeviceIdPubk", "UserDeviceIdSign", }); + internal_static_site_ApiSiteLogoutResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiSiteLogoutResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiSiteLogoutResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiSiteRegisterProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiSiteRegisterProto.java new file mode 100755 index 0000000..4839853 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiSiteRegisterProto.java @@ -0,0 +1,2235 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_site_register.proto + +package com.akaxin.proto.site; + +public final class ApiSiteRegisterProto { + private ApiSiteRegisterProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiSiteRegisterRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiSiteRegisterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户身份公钥
+     * 
+ * + * string user_id_pubk = 1; + */ + java.lang.String getUserIdPubk(); + /** + *
+     *用户身份公钥
+     * 
+ * + * string user_id_pubk = 1; + */ + com.google.protobuf.ByteString + getUserIdPubkBytes(); + + /** + *
+     *用户名
+     * 
+ * + * string user_name = 2; + */ + java.lang.String getUserName(); + /** + *
+     *用户名
+     * 
+ * + * string user_name = 2; + */ + com.google.protobuf.ByteString + getUserNameBytes(); + + /** + *
+     *用户头像
+     * 
+ * + * string user_photo = 3; + */ + java.lang.String getUserPhoto(); + /** + *
+     *用户头像
+     * 
+ * + * string user_photo = 3; + */ + com.google.protobuf.ByteString + getUserPhotoBytes(); + + /** + *
+     *用户邀请码
+     * 
+ * + * string user_uic = 4; + */ + java.lang.String getUserUic(); + /** + *
+     *用户邀请码
+     * 
+ * + * string user_uic = 4; + */ + com.google.protobuf.ByteString + getUserUicBytes(); + + /** + *
+     *注册申请信息
+     * 
+ * + * string apply_info = 5; + */ + java.lang.String getApplyInfo(); + /** + *
+     *注册申请信息
+     * 
+ * + * string apply_info = 5; + */ + com.google.protobuf.ByteString + getApplyInfoBytes(); + + /** + *
+     *站点需实名时,提供的平台手机令牌(授权码)
+     * 
+ * + * string phone_token = 6; + */ + java.lang.String getPhoneToken(); + /** + *
+     *站点需实名时,提供的平台手机令牌(授权码)
+     * 
+ * + * string phone_token = 6; + */ + com.google.protobuf.ByteString + getPhoneTokenBytes(); + + /** + *
+     *登陆用户账号(只允许字符串开头,数字组成6~20位)(选填)
+     * 
+ * + * string site_login_id = 7; + */ + java.lang.String getSiteLoginId(); + /** + *
+     *登陆用户账号(只允许字符串开头,数字组成6~20位)(选填)
+     * 
+ * + * string site_login_id = 7; + */ + com.google.protobuf.ByteString + getSiteLoginIdBytes(); + } + /** + * Protobuf type {@code site.ApiSiteRegisterRequest} + */ + public static final class ApiSiteRegisterRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiSiteRegisterRequest) + ApiSiteRegisterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiSiteRegisterRequest.newBuilder() to construct. + private ApiSiteRegisterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiSiteRegisterRequest() { + userIdPubk_ = ""; + userName_ = ""; + userPhoto_ = ""; + userUic_ = ""; + applyInfo_ = ""; + phoneToken_ = ""; + siteLoginId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiSiteRegisterRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + userIdPubk_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + userName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + userPhoto_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + userUic_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + applyInfo_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + phoneToken_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + siteLoginId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSiteRegisterProto.internal_static_site_ApiSiteRegisterRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSiteRegisterProto.internal_static_site_ApiSiteRegisterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest.class, com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest.Builder.class); + } + + public static final int USER_ID_PUBK_FIELD_NUMBER = 1; + private volatile java.lang.Object userIdPubk_; + /** + *
+     *用户身份公钥
+     * 
+ * + * string user_id_pubk = 1; + */ + public java.lang.String getUserIdPubk() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPubk_ = s; + return s; + } + } + /** + *
+     *用户身份公钥
+     * 
+ * + * string user_id_pubk = 1; + */ + public com.google.protobuf.ByteString + getUserIdPubkBytes() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object userName_; + /** + *
+     *用户名
+     * 
+ * + * string user_name = 2; + */ + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } + } + /** + *
+     *用户名
+     * 
+ * + * string user_name = 2; + */ + public com.google.protobuf.ByteString + getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_PHOTO_FIELD_NUMBER = 3; + private volatile java.lang.Object userPhoto_; + /** + *
+     *用户头像
+     * 
+ * + * string user_photo = 3; + */ + public java.lang.String getUserPhoto() { + java.lang.Object ref = userPhoto_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPhoto_ = s; + return s; + } + } + /** + *
+     *用户头像
+     * 
+ * + * string user_photo = 3; + */ + public com.google.protobuf.ByteString + getUserPhotoBytes() { + java.lang.Object ref = userPhoto_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userPhoto_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_UIC_FIELD_NUMBER = 4; + private volatile java.lang.Object userUic_; + /** + *
+     *用户邀请码
+     * 
+ * + * string user_uic = 4; + */ + public java.lang.String getUserUic() { + java.lang.Object ref = userUic_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userUic_ = s; + return s; + } + } + /** + *
+     *用户邀请码
+     * 
+ * + * string user_uic = 4; + */ + public com.google.protobuf.ByteString + getUserUicBytes() { + java.lang.Object ref = userUic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userUic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLY_INFO_FIELD_NUMBER = 5; + private volatile java.lang.Object applyInfo_; + /** + *
+     *注册申请信息
+     * 
+ * + * string apply_info = 5; + */ + public java.lang.String getApplyInfo() { + java.lang.Object ref = applyInfo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applyInfo_ = s; + return s; + } + } + /** + *
+     *注册申请信息
+     * 
+ * + * string apply_info = 5; + */ + public com.google.protobuf.ByteString + getApplyInfoBytes() { + java.lang.Object ref = applyInfo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + applyInfo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PHONE_TOKEN_FIELD_NUMBER = 6; + private volatile java.lang.Object phoneToken_; + /** + *
+     *站点需实名时,提供的平台手机令牌(授权码)
+     * 
+ * + * string phone_token = 6; + */ + public java.lang.String getPhoneToken() { + java.lang.Object ref = phoneToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phoneToken_ = s; + return s; + } + } + /** + *
+     *站点需实名时,提供的平台手机令牌(授权码)
+     * 
+ * + * string phone_token = 6; + */ + public com.google.protobuf.ByteString + getPhoneTokenBytes() { + java.lang.Object ref = phoneToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + phoneToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_LOGIN_ID_FIELD_NUMBER = 7; + private volatile java.lang.Object siteLoginId_; + /** + *
+     *登陆用户账号(只允许字符串开头,数字组成6~20位)(选填)
+     * 
+ * + * string site_login_id = 7; + */ + public java.lang.String getSiteLoginId() { + java.lang.Object ref = siteLoginId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteLoginId_ = s; + return s; + } + } + /** + *
+     *登陆用户账号(只允许字符串开头,数字组成6~20位)(选填)
+     * 
+ * + * string site_login_id = 7; + */ + public com.google.protobuf.ByteString + getSiteLoginIdBytes() { + java.lang.Object ref = siteLoginId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteLoginId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getUserIdPubkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userIdPubk_); + } + if (!getUserNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userName_); + } + if (!getUserPhotoBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userPhoto_); + } + if (!getUserUicBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, userUic_); + } + if (!getApplyInfoBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, applyInfo_); + } + if (!getPhoneTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, phoneToken_); + } + if (!getSiteLoginIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, siteLoginId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUserIdPubkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userIdPubk_); + } + if (!getUserNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, userName_); + } + if (!getUserPhotoBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userPhoto_); + } + if (!getUserUicBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, userUic_); + } + if (!getApplyInfoBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, applyInfo_); + } + if (!getPhoneTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, phoneToken_); + } + if (!getSiteLoginIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, siteLoginId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest other = (com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest) obj; + + boolean result = true; + result = result && getUserIdPubk() + .equals(other.getUserIdPubk()); + result = result && getUserName() + .equals(other.getUserName()); + result = result && getUserPhoto() + .equals(other.getUserPhoto()); + result = result && getUserUic() + .equals(other.getUserUic()); + result = result && getApplyInfo() + .equals(other.getApplyInfo()); + result = result && getPhoneToken() + .equals(other.getPhoneToken()); + result = result && getSiteLoginId() + .equals(other.getSiteLoginId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USER_ID_PUBK_FIELD_NUMBER; + hash = (53 * hash) + getUserIdPubk().hashCode(); + hash = (37 * hash) + USER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getUserName().hashCode(); + hash = (37 * hash) + USER_PHOTO_FIELD_NUMBER; + hash = (53 * hash) + getUserPhoto().hashCode(); + hash = (37 * hash) + USER_UIC_FIELD_NUMBER; + hash = (53 * hash) + getUserUic().hashCode(); + hash = (37 * hash) + APPLY_INFO_FIELD_NUMBER; + hash = (53 * hash) + getApplyInfo().hashCode(); + hash = (37 * hash) + PHONE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPhoneToken().hashCode(); + hash = (37 * hash) + SITE_LOGIN_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteLoginId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiSiteRegisterRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiSiteRegisterRequest) + com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSiteRegisterProto.internal_static_site_ApiSiteRegisterRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSiteRegisterProto.internal_static_site_ApiSiteRegisterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest.class, com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + userIdPubk_ = ""; + + userName_ = ""; + + userPhoto_ = ""; + + userUic_ = ""; + + applyInfo_ = ""; + + phoneToken_ = ""; + + siteLoginId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiSiteRegisterProto.internal_static_site_ApiSiteRegisterRequest_descriptor; + } + + public com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest build() { + com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest buildPartial() { + com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest result = new com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest(this); + result.userIdPubk_ = userIdPubk_; + result.userName_ = userName_; + result.userPhoto_ = userPhoto_; + result.userUic_ = userUic_; + result.applyInfo_ = applyInfo_; + result.phoneToken_ = phoneToken_; + result.siteLoginId_ = siteLoginId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest) { + return mergeFrom((com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest other) { + if (other == com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest.getDefaultInstance()) return this; + if (!other.getUserIdPubk().isEmpty()) { + userIdPubk_ = other.userIdPubk_; + onChanged(); + } + if (!other.getUserName().isEmpty()) { + userName_ = other.userName_; + onChanged(); + } + if (!other.getUserPhoto().isEmpty()) { + userPhoto_ = other.userPhoto_; + onChanged(); + } + if (!other.getUserUic().isEmpty()) { + userUic_ = other.userUic_; + onChanged(); + } + if (!other.getApplyInfo().isEmpty()) { + applyInfo_ = other.applyInfo_; + onChanged(); + } + if (!other.getPhoneToken().isEmpty()) { + phoneToken_ = other.phoneToken_; + onChanged(); + } + if (!other.getSiteLoginId().isEmpty()) { + siteLoginId_ = other.siteLoginId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object userIdPubk_ = ""; + /** + *
+       *用户身份公钥
+       * 
+ * + * string user_id_pubk = 1; + */ + public java.lang.String getUserIdPubk() { + java.lang.Object ref = userIdPubk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdPubk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户身份公钥
+       * 
+ * + * string user_id_pubk = 1; + */ + public com.google.protobuf.ByteString + getUserIdPubkBytes() { + java.lang.Object ref = userIdPubk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdPubk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户身份公钥
+       * 
+ * + * string user_id_pubk = 1; + */ + public Builder setUserIdPubk( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userIdPubk_ = value; + onChanged(); + return this; + } + /** + *
+       *用户身份公钥
+       * 
+ * + * string user_id_pubk = 1; + */ + public Builder clearUserIdPubk() { + + userIdPubk_ = getDefaultInstance().getUserIdPubk(); + onChanged(); + return this; + } + /** + *
+       *用户身份公钥
+       * 
+ * + * string user_id_pubk = 1; + */ + public Builder setUserIdPubkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userIdPubk_ = value; + onChanged(); + return this; + } + + private java.lang.Object userName_ = ""; + /** + *
+       *用户名
+       * 
+ * + * string user_name = 2; + */ + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户名
+       * 
+ * + * string user_name = 2; + */ + public com.google.protobuf.ByteString + getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户名
+       * 
+ * + * string user_name = 2; + */ + public Builder setUserName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userName_ = value; + onChanged(); + return this; + } + /** + *
+       *用户名
+       * 
+ * + * string user_name = 2; + */ + public Builder clearUserName() { + + userName_ = getDefaultInstance().getUserName(); + onChanged(); + return this; + } + /** + *
+       *用户名
+       * 
+ * + * string user_name = 2; + */ + public Builder setUserNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userName_ = value; + onChanged(); + return this; + } + + private java.lang.Object userPhoto_ = ""; + /** + *
+       *用户头像
+       * 
+ * + * string user_photo = 3; + */ + public java.lang.String getUserPhoto() { + java.lang.Object ref = userPhoto_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPhoto_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户头像
+       * 
+ * + * string user_photo = 3; + */ + public com.google.protobuf.ByteString + getUserPhotoBytes() { + java.lang.Object ref = userPhoto_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userPhoto_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户头像
+       * 
+ * + * string user_photo = 3; + */ + public Builder setUserPhoto( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userPhoto_ = value; + onChanged(); + return this; + } + /** + *
+       *用户头像
+       * 
+ * + * string user_photo = 3; + */ + public Builder clearUserPhoto() { + + userPhoto_ = getDefaultInstance().getUserPhoto(); + onChanged(); + return this; + } + /** + *
+       *用户头像
+       * 
+ * + * string user_photo = 3; + */ + public Builder setUserPhotoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userPhoto_ = value; + onChanged(); + return this; + } + + private java.lang.Object userUic_ = ""; + /** + *
+       *用户邀请码
+       * 
+ * + * string user_uic = 4; + */ + public java.lang.String getUserUic() { + java.lang.Object ref = userUic_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userUic_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户邀请码
+       * 
+ * + * string user_uic = 4; + */ + public com.google.protobuf.ByteString + getUserUicBytes() { + java.lang.Object ref = userUic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userUic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户邀请码
+       * 
+ * + * string user_uic = 4; + */ + public Builder setUserUic( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userUic_ = value; + onChanged(); + return this; + } + /** + *
+       *用户邀请码
+       * 
+ * + * string user_uic = 4; + */ + public Builder clearUserUic() { + + userUic_ = getDefaultInstance().getUserUic(); + onChanged(); + return this; + } + /** + *
+       *用户邀请码
+       * 
+ * + * string user_uic = 4; + */ + public Builder setUserUicBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userUic_ = value; + onChanged(); + return this; + } + + private java.lang.Object applyInfo_ = ""; + /** + *
+       *注册申请信息
+       * 
+ * + * string apply_info = 5; + */ + public java.lang.String getApplyInfo() { + java.lang.Object ref = applyInfo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applyInfo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *注册申请信息
+       * 
+ * + * string apply_info = 5; + */ + public com.google.protobuf.ByteString + getApplyInfoBytes() { + java.lang.Object ref = applyInfo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + applyInfo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *注册申请信息
+       * 
+ * + * string apply_info = 5; + */ + public Builder setApplyInfo( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + applyInfo_ = value; + onChanged(); + return this; + } + /** + *
+       *注册申请信息
+       * 
+ * + * string apply_info = 5; + */ + public Builder clearApplyInfo() { + + applyInfo_ = getDefaultInstance().getApplyInfo(); + onChanged(); + return this; + } + /** + *
+       *注册申请信息
+       * 
+ * + * string apply_info = 5; + */ + public Builder setApplyInfoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + applyInfo_ = value; + onChanged(); + return this; + } + + private java.lang.Object phoneToken_ = ""; + /** + *
+       *站点需实名时,提供的平台手机令牌(授权码)
+       * 
+ * + * string phone_token = 6; + */ + public java.lang.String getPhoneToken() { + java.lang.Object ref = phoneToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phoneToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *站点需实名时,提供的平台手机令牌(授权码)
+       * 
+ * + * string phone_token = 6; + */ + public com.google.protobuf.ByteString + getPhoneTokenBytes() { + java.lang.Object ref = phoneToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + phoneToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *站点需实名时,提供的平台手机令牌(授权码)
+       * 
+ * + * string phone_token = 6; + */ + public Builder setPhoneToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + phoneToken_ = value; + onChanged(); + return this; + } + /** + *
+       *站点需实名时,提供的平台手机令牌(授权码)
+       * 
+ * + * string phone_token = 6; + */ + public Builder clearPhoneToken() { + + phoneToken_ = getDefaultInstance().getPhoneToken(); + onChanged(); + return this; + } + /** + *
+       *站点需实名时,提供的平台手机令牌(授权码)
+       * 
+ * + * string phone_token = 6; + */ + public Builder setPhoneTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + phoneToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteLoginId_ = ""; + /** + *
+       *登陆用户账号(只允许字符串开头,数字组成6~20位)(选填)
+       * 
+ * + * string site_login_id = 7; + */ + public java.lang.String getSiteLoginId() { + java.lang.Object ref = siteLoginId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteLoginId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *登陆用户账号(只允许字符串开头,数字组成6~20位)(选填)
+       * 
+ * + * string site_login_id = 7; + */ + public com.google.protobuf.ByteString + getSiteLoginIdBytes() { + java.lang.Object ref = siteLoginId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteLoginId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *登陆用户账号(只允许字符串开头,数字组成6~20位)(选填)
+       * 
+ * + * string site_login_id = 7; + */ + public Builder setSiteLoginId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteLoginId_ = value; + onChanged(); + return this; + } + /** + *
+       *登陆用户账号(只允许字符串开头,数字组成6~20位)(选填)
+       * 
+ * + * string site_login_id = 7; + */ + public Builder clearSiteLoginId() { + + siteLoginId_ = getDefaultInstance().getSiteLoginId(); + onChanged(); + return this; + } + /** + *
+       *登陆用户账号(只允许字符串开头,数字组成6~20位)(选填)
+       * 
+ * + * string site_login_id = 7; + */ + public Builder setSiteLoginIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteLoginId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiSiteRegisterRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiSiteRegisterRequest) + private static final com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest(); + } + + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiSiteRegisterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiSiteRegisterRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiSiteRegisterResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiSiteRegisterResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *返回用户在站点的用户ID,后期登陆以及其他情况使用。节省使用公钥的传输消费
+     * 
+ * + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + *
+     *返回用户在站点的用户ID,后期登陆以及其他情况使用。节省使用公钥的传输消费
+     * 
+ * + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + } + /** + * Protobuf type {@code site.ApiSiteRegisterResponse} + */ + public static final class ApiSiteRegisterResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiSiteRegisterResponse) + ApiSiteRegisterResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiSiteRegisterResponse.newBuilder() to construct. + private ApiSiteRegisterResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiSiteRegisterResponse() { + siteUserId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiSiteRegisterResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSiteRegisterProto.internal_static_site_ApiSiteRegisterResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSiteRegisterProto.internal_static_site_ApiSiteRegisterResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse.class, com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + *
+     *返回用户在站点的用户ID,后期登陆以及其他情况使用。节省使用公钥的传输消费
+     * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *返回用户在站点的用户ID,后期登陆以及其他情况使用。节省使用公钥的传输消费
+     * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse other = (com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiSiteRegisterResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiSiteRegisterResponse) + com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiSiteRegisterProto.internal_static_site_ApiSiteRegisterResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiSiteRegisterProto.internal_static_site_ApiSiteRegisterResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse.class, com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiSiteRegisterProto.internal_static_site_ApiSiteRegisterResponse_descriptor; + } + + public com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse build() { + com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse buildPartial() { + com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse result = new com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse(this); + result.siteUserId_ = siteUserId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse) { + return mergeFrom((com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse other) { + if (other == com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *返回用户在站点的用户ID,后期登陆以及其他情况使用。节省使用公钥的传输消费
+       * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *返回用户在站点的用户ID,后期登陆以及其他情况使用。节省使用公钥的传输消费
+       * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *返回用户在站点的用户ID,后期登陆以及其他情况使用。节省使用公钥的传输消费
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *返回用户在站点的用户ID,后期登陆以及其他情况使用。节省使用公钥的传输消费
+       * 
+ * + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *返回用户在站点的用户ID,后期登陆以及其他情况使用。节省使用公钥的传输消费
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiSiteRegisterResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiSiteRegisterResponse) + private static final com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse(); + } + + public static com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiSiteRegisterResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiSiteRegisterResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiSiteRegisterProto.ApiSiteRegisterResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiSiteRegisterRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiSiteRegisterRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiSiteRegisterResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiSiteRegisterResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034site/api_site_register.proto\022\004site\"\247\001\n" + + "\026ApiSiteRegisterRequest\022\024\n\014user_id_pubk\030" + + "\001 \001(\t\022\021\n\tuser_name\030\002 \001(\t\022\022\n\nuser_photo\030\003" + + " \001(\t\022\020\n\010user_uic\030\004 \001(\t\022\022\n\napply_info\030\005 \001" + + "(\t\022\023\n\013phone_token\030\006 \001(\t\022\025\n\rsite_login_id" + + "\030\007 \001(\t\"/\n\027ApiSiteRegisterResponse\022\024\n\014sit" + + "e_user_id\030\001 \001(\t2a\n\026ApiSiteRegisterServic" + + "e\022G\n\010register\022\034.site.ApiSiteRegisterRequ" + + "est\032\035.site.ApiSiteRegisterResponseB-\n\025co" + + "m.akaxin.proto.siteB\024ApiSiteRegisterProt" + + "ob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiSiteRegisterRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiSiteRegisterRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiSiteRegisterRequest_descriptor, + new java.lang.String[] { "UserIdPubk", "UserName", "UserPhoto", "UserUic", "ApplyInfo", "PhoneToken", "SiteLoginId", }); + internal_static_site_ApiSiteRegisterResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiSiteRegisterResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiSiteRegisterResponse_descriptor, + new java.lang.String[] { "SiteUserId", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiUserMuteProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiUserMuteProto.java new file mode 100755 index 0000000..c3395d7 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiUserMuteProto.java @@ -0,0 +1,909 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_user_mute.proto + +package com.akaxin.proto.site; + +public final class ApiUserMuteProto { + private ApiUserMuteProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiUserMuteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiUserMuteRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiUserMuteRequest} + */ + public static final class ApiUserMuteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiUserMuteRequest) + ApiUserMuteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiUserMuteRequest.newBuilder() to construct. + private ApiUserMuteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiUserMuteRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiUserMuteRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserMuteProto.internal_static_site_ApiUserMuteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserMuteProto.internal_static_site_ApiUserMuteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest.class, com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest other = (com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiUserMuteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiUserMuteRequest) + com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserMuteProto.internal_static_site_ApiUserMuteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserMuteProto.internal_static_site_ApiUserMuteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest.class, com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiUserMuteProto.internal_static_site_ApiUserMuteRequest_descriptor; + } + + public com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest build() { + com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest buildPartial() { + com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest result = new com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest) { + return mergeFrom((com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest other) { + if (other == com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiUserMuteRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiUserMuteRequest) + private static final com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest(); + } + + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiUserMuteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiUserMuteRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiUserMuteResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiUserMuteResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * bool mute = 1; + */ + boolean getMute(); + } + /** + * Protobuf type {@code site.ApiUserMuteResponse} + */ + public static final class ApiUserMuteResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiUserMuteResponse) + ApiUserMuteResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiUserMuteResponse.newBuilder() to construct. + private ApiUserMuteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiUserMuteResponse() { + mute_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiUserMuteResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + mute_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserMuteProto.internal_static_site_ApiUserMuteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserMuteProto.internal_static_site_ApiUserMuteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse.class, com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse.Builder.class); + } + + public static final int MUTE_FIELD_NUMBER = 1; + private boolean mute_; + /** + * bool mute = 1; + */ + public boolean getMute() { + return mute_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (mute_ != false) { + output.writeBool(1, mute_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mute_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, mute_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse other = (com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse) obj; + + boolean result = true; + result = result && (getMute() + == other.getMute()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMute()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiUserMuteResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiUserMuteResponse) + com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserMuteProto.internal_static_site_ApiUserMuteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserMuteProto.internal_static_site_ApiUserMuteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse.class, com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + mute_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiUserMuteProto.internal_static_site_ApiUserMuteResponse_descriptor; + } + + public com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse build() { + com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse buildPartial() { + com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse result = new com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse(this); + result.mute_ = mute_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse) { + return mergeFrom((com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse other) { + if (other == com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse.getDefaultInstance()) return this; + if (other.getMute() != false) { + setMute(other.getMute()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean mute_ ; + /** + * bool mute = 1; + */ + public boolean getMute() { + return mute_; + } + /** + * bool mute = 1; + */ + public Builder setMute(boolean value) { + + mute_ = value; + onChanged(); + return this; + } + /** + * bool mute = 1; + */ + public Builder clearMute() { + + mute_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiUserMuteResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiUserMuteResponse) + private static final com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse(); + } + + public static com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiUserMuteResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiUserMuteResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiUserMuteProto.ApiUserMuteResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiUserMuteRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiUserMuteRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiUserMuteResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiUserMuteResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\030site/api_user_mute.proto\022\004site\"\024\n\022ApiU" + + "serMuteRequest\"#\n\023ApiUserMuteResponse\022\014\n" + + "\004mute\030\001 \001(\0102Q\n\022ApiUserMuteService\022;\n\004mut" + + "e\022\030.site.ApiUserMuteRequest\032\031.site.ApiUs" + + "erMuteResponseB)\n\025com.akaxin.proto.siteB" + + "\020ApiUserMuteProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiUserMuteRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiUserMuteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiUserMuteRequest_descriptor, + new java.lang.String[] { }); + internal_static_site_ApiUserMuteResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiUserMuteResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiUserMuteResponse_descriptor, + new java.lang.String[] { "Mute", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiUserProfileProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiUserProfileProto.java new file mode 100755 index 0000000..92ad90e --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiUserProfileProto.java @@ -0,0 +1,1277 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_user_profile.proto + +package com.akaxin.proto.site; + +public final class ApiUserProfileProto { + private ApiUserProfileProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiUserProfileRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiUserProfileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户ID
+     * 
+ * + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + *
+     *用户ID
+     * 
+ * + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + } + /** + * Protobuf type {@code site.ApiUserProfileRequest} + */ + public static final class ApiUserProfileRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiUserProfileRequest) + ApiUserProfileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiUserProfileRequest.newBuilder() to construct. + private ApiUserProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiUserProfileRequest() { + siteUserId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiUserProfileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserProfileProto.internal_static_site_ApiUserProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserProfileProto.internal_static_site_ApiUserProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest.class, com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + *
+     *用户ID
+     * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *用户ID
+     * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest other = (com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiUserProfileRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiUserProfileRequest) + com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserProfileProto.internal_static_site_ApiUserProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserProfileProto.internal_static_site_ApiUserProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest.class, com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiUserProfileProto.internal_static_site_ApiUserProfileRequest_descriptor; + } + + public com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest build() { + com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest buildPartial() { + com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest result = new com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest(this); + result.siteUserId_ = siteUserId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest) { + return mergeFrom((com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest other) { + if (other == com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *用户ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiUserProfileRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiUserProfileRequest) + private static final com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest(); + } + + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiUserProfileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiUserProfileRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiUserProfileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiUserProfileResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户详细信息
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + boolean hasUserProfile(); + /** + *
+     *用户详细信息
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + com.akaxin.proto.core.UserProto.UserProfile getUserProfile(); + /** + *
+     *用户详细信息
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + com.akaxin.proto.core.UserProto.UserProfileOrBuilder getUserProfileOrBuilder(); + } + /** + * Protobuf type {@code site.ApiUserProfileResponse} + */ + public static final class ApiUserProfileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiUserProfileResponse) + ApiUserProfileResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiUserProfileResponse.newBuilder() to construct. + private ApiUserProfileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiUserProfileResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiUserProfileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.UserProto.UserProfile.Builder subBuilder = null; + if (userProfile_ != null) { + subBuilder = userProfile_.toBuilder(); + } + userProfile_ = input.readMessage(com.akaxin.proto.core.UserProto.UserProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(userProfile_); + userProfile_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserProfileProto.internal_static_site_ApiUserProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserProfileProto.internal_static_site_ApiUserProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse.class, com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse.Builder.class); + } + + public static final int USER_PROFILE_FIELD_NUMBER = 1; + private com.akaxin.proto.core.UserProto.UserProfile userProfile_; + /** + *
+     *用户详细信息
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + public boolean hasUserProfile() { + return userProfile_ != null; + } + /** + *
+     *用户详细信息
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile getUserProfile() { + return userProfile_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : userProfile_; + } + /** + *
+     *用户详细信息
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getUserProfileOrBuilder() { + return getUserProfile(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (userProfile_ != null) { + output.writeMessage(1, getUserProfile()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (userProfile_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUserProfile()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse other = (com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse) obj; + + boolean result = true; + result = result && (hasUserProfile() == other.hasUserProfile()); + if (hasUserProfile()) { + result = result && getUserProfile() + .equals(other.getUserProfile()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUserProfile()) { + hash = (37 * hash) + USER_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getUserProfile().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiUserProfileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiUserProfileResponse) + com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserProfileProto.internal_static_site_ApiUserProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserProfileProto.internal_static_site_ApiUserProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse.class, com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (userProfileBuilder_ == null) { + userProfile_ = null; + } else { + userProfile_ = null; + userProfileBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiUserProfileProto.internal_static_site_ApiUserProfileResponse_descriptor; + } + + public com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse build() { + com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse buildPartial() { + com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse result = new com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse(this); + if (userProfileBuilder_ == null) { + result.userProfile_ = userProfile_; + } else { + result.userProfile_ = userProfileBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse) { + return mergeFrom((com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse other) { + if (other == com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse.getDefaultInstance()) return this; + if (other.hasUserProfile()) { + mergeUserProfile(other.getUserProfile()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.core.UserProto.UserProfile userProfile_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> userProfileBuilder_; + /** + *
+       *用户详细信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public boolean hasUserProfile() { + return userProfileBuilder_ != null || userProfile_ != null; + } + /** + *
+       *用户详细信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile getUserProfile() { + if (userProfileBuilder_ == null) { + return userProfile_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : userProfile_; + } else { + return userProfileBuilder_.getMessage(); + } + } + /** + *
+       *用户详细信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder setUserProfile(com.akaxin.proto.core.UserProto.UserProfile value) { + if (userProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userProfile_ = value; + onChanged(); + } else { + userProfileBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *用户详细信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder setUserProfile( + com.akaxin.proto.core.UserProto.UserProfile.Builder builderForValue) { + if (userProfileBuilder_ == null) { + userProfile_ = builderForValue.build(); + onChanged(); + } else { + userProfileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *用户详细信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder mergeUserProfile(com.akaxin.proto.core.UserProto.UserProfile value) { + if (userProfileBuilder_ == null) { + if (userProfile_ != null) { + userProfile_ = + com.akaxin.proto.core.UserProto.UserProfile.newBuilder(userProfile_).mergeFrom(value).buildPartial(); + } else { + userProfile_ = value; + } + onChanged(); + } else { + userProfileBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *用户详细信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder clearUserProfile() { + if (userProfileBuilder_ == null) { + userProfile_ = null; + onChanged(); + } else { + userProfile_ = null; + userProfileBuilder_ = null; + } + + return this; + } + /** + *
+       *用户详细信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile.Builder getUserProfileBuilder() { + + onChanged(); + return getUserProfileFieldBuilder().getBuilder(); + } + /** + *
+       *用户详细信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getUserProfileOrBuilder() { + if (userProfileBuilder_ != null) { + return userProfileBuilder_.getMessageOrBuilder(); + } else { + return userProfile_ == null ? + com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : userProfile_; + } + } + /** + *
+       *用户详细信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> + getUserProfileFieldBuilder() { + if (userProfileBuilder_ == null) { + userProfileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder>( + getUserProfile(), + getParentForChildren(), + isClean()); + userProfile_ = null; + } + return userProfileBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiUserProfileResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiUserProfileResponse) + private static final com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse(); + } + + public static com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiUserProfileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiUserProfileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiUserProfileProto.ApiUserProfileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiUserProfileRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiUserProfileRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiUserProfileResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiUserProfileResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033site/api_user_profile.proto\022\004site\032\017cor" + + "e/user.proto\"-\n\025ApiUserProfileRequest\022\024\n" + + "\014site_user_id\030\001 \001(\t\"A\n\026ApiUserProfileRes" + + "ponse\022\'\n\014user_profile\030\001 \001(\0132\021.core.UserP" + + "rofile2]\n\025ApiUserProfileService\022D\n\007profi" + + "le\022\033.site.ApiUserProfileRequest\032\034.site.A" + + "piUserProfileResponseB,\n\025com.akaxin.prot" + + "o.siteB\023ApiUserProfileProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.UserProto.getDescriptor(), + }, assigner); + internal_static_site_ApiUserProfileRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiUserProfileRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiUserProfileRequest_descriptor, + new java.lang.String[] { "SiteUserId", }); + internal_static_site_ApiUserProfileResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiUserProfileResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiUserProfileResponse_descriptor, + new java.lang.String[] { "UserProfile", }); + com.akaxin.proto.core.UserProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiUserSearchProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiUserSearchProto.java new file mode 100755 index 0000000..47f4993 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiUserSearchProto.java @@ -0,0 +1,1406 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_user_search.proto + +package com.akaxin.proto.site; + +public final class ApiUserSearchProto { + private ApiUserSearchProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiUserSearchRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiUserSearchRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *site_login_id | phone_id | userIdPubk
+     * 
+ * + * string id = 1; + */ + java.lang.String getId(); + /** + *
+     *site_login_id | phone_id | userIdPubk
+     * 
+ * + * string id = 1; + */ + com.google.protobuf.ByteString + getIdBytes(); + } + /** + * Protobuf type {@code site.ApiUserSearchRequest} + */ + public static final class ApiUserSearchRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiUserSearchRequest) + ApiUserSearchRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiUserSearchRequest.newBuilder() to construct. + private ApiUserSearchRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiUserSearchRequest() { + id_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiUserSearchRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserSearchProto.internal_static_site_ApiUserSearchRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserSearchProto.internal_static_site_ApiUserSearchRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest.class, com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + *
+     *site_login_id | phone_id | userIdPubk
+     * 
+ * + * string id = 1; + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+     *site_login_id | phone_id | userIdPubk
+     * 
+ * + * string id = 1; + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest other = (com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest) obj; + + boolean result = true; + result = result && getId() + .equals(other.getId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiUserSearchRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiUserSearchRequest) + com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserSearchProto.internal_static_site_ApiUserSearchRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserSearchProto.internal_static_site_ApiUserSearchRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest.class, com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + id_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiUserSearchProto.internal_static_site_ApiUserSearchRequest_descriptor; + } + + public com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest build() { + com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest buildPartial() { + com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest result = new com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest(this); + result.id_ = id_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest) { + return mergeFrom((com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest other) { + if (other == com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object id_ = ""; + /** + *
+       *site_login_id | phone_id | userIdPubk
+       * 
+ * + * string id = 1; + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *site_login_id | phone_id | userIdPubk
+       * 
+ * + * string id = 1; + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *site_login_id | phone_id | userIdPubk
+       * 
+ * + * string id = 1; + */ + public Builder setId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + *
+       *site_login_id | phone_id | userIdPubk
+       * 
+ * + * string id = 1; + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + *
+       *site_login_id | phone_id | userIdPubk
+       * 
+ * + * string id = 1; + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiUserSearchRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiUserSearchRequest) + private static final com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest(); + } + + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiUserSearchRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiUserSearchRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiUserSearchResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiUserSearchResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户好友的信息
+     * 
+ * + * .core.UserProfile profile = 1; + */ + boolean hasProfile(); + /** + *
+     *用户好友的信息
+     * 
+ * + * .core.UserProfile profile = 1; + */ + com.akaxin.proto.core.UserProto.UserProfile getProfile(); + /** + *
+     *用户好友的信息
+     * 
+ * + * .core.UserProfile profile = 1; + */ + com.akaxin.proto.core.UserProto.UserProfileOrBuilder getProfileOrBuilder(); + + /** + *
+     *用户之间的关系
+     * 
+ * + * .core.UserRelation relation = 2; + */ + int getRelationValue(); + /** + *
+     *用户之间的关系
+     * 
+ * + * .core.UserRelation relation = 2; + */ + com.akaxin.proto.core.UserProto.UserRelation getRelation(); + } + /** + * Protobuf type {@code site.ApiUserSearchResponse} + */ + public static final class ApiUserSearchResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiUserSearchResponse) + ApiUserSearchResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiUserSearchResponse.newBuilder() to construct. + private ApiUserSearchResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiUserSearchResponse() { + relation_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiUserSearchResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.UserProto.UserProfile.Builder subBuilder = null; + if (profile_ != null) { + subBuilder = profile_.toBuilder(); + } + profile_ = input.readMessage(com.akaxin.proto.core.UserProto.UserProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(profile_); + profile_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + int rawValue = input.readEnum(); + + relation_ = rawValue; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserSearchProto.internal_static_site_ApiUserSearchResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserSearchProto.internal_static_site_ApiUserSearchResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse.class, com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse.Builder.class); + } + + public static final int PROFILE_FIELD_NUMBER = 1; + private com.akaxin.proto.core.UserProto.UserProfile profile_; + /** + *
+     *用户好友的信息
+     * 
+ * + * .core.UserProfile profile = 1; + */ + public boolean hasProfile() { + return profile_ != null; + } + /** + *
+     *用户好友的信息
+     * 
+ * + * .core.UserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile getProfile() { + return profile_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : profile_; + } + /** + *
+     *用户好友的信息
+     * 
+ * + * .core.UserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getProfileOrBuilder() { + return getProfile(); + } + + public static final int RELATION_FIELD_NUMBER = 2; + private int relation_; + /** + *
+     *用户之间的关系
+     * 
+ * + * .core.UserRelation relation = 2; + */ + public int getRelationValue() { + return relation_; + } + /** + *
+     *用户之间的关系
+     * 
+ * + * .core.UserRelation relation = 2; + */ + public com.akaxin.proto.core.UserProto.UserRelation getRelation() { + com.akaxin.proto.core.UserProto.UserRelation result = com.akaxin.proto.core.UserProto.UserRelation.valueOf(relation_); + return result == null ? com.akaxin.proto.core.UserProto.UserRelation.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (profile_ != null) { + output.writeMessage(1, getProfile()); + } + if (relation_ != com.akaxin.proto.core.UserProto.UserRelation.RELATION_NONE.getNumber()) { + output.writeEnum(2, relation_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (profile_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProfile()); + } + if (relation_ != com.akaxin.proto.core.UserProto.UserRelation.RELATION_NONE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, relation_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse other = (com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse) obj; + + boolean result = true; + result = result && (hasProfile() == other.hasProfile()); + if (hasProfile()) { + result = result && getProfile() + .equals(other.getProfile()); + } + result = result && relation_ == other.relation_; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProfile()) { + hash = (37 * hash) + PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getProfile().hashCode(); + } + hash = (37 * hash) + RELATION_FIELD_NUMBER; + hash = (53 * hash) + relation_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiUserSearchResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiUserSearchResponse) + com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserSearchProto.internal_static_site_ApiUserSearchResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserSearchProto.internal_static_site_ApiUserSearchResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse.class, com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (profileBuilder_ == null) { + profile_ = null; + } else { + profile_ = null; + profileBuilder_ = null; + } + relation_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiUserSearchProto.internal_static_site_ApiUserSearchResponse_descriptor; + } + + public com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse build() { + com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse buildPartial() { + com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse result = new com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse(this); + if (profileBuilder_ == null) { + result.profile_ = profile_; + } else { + result.profile_ = profileBuilder_.build(); + } + result.relation_ = relation_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse) { + return mergeFrom((com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse other) { + if (other == com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse.getDefaultInstance()) return this; + if (other.hasProfile()) { + mergeProfile(other.getProfile()); + } + if (other.relation_ != 0) { + setRelationValue(other.getRelationValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.core.UserProto.UserProfile profile_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> profileBuilder_; + /** + *
+       *用户好友的信息
+       * 
+ * + * .core.UserProfile profile = 1; + */ + public boolean hasProfile() { + return profileBuilder_ != null || profile_ != null; + } + /** + *
+       *用户好友的信息
+       * 
+ * + * .core.UserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile getProfile() { + if (profileBuilder_ == null) { + return profile_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : profile_; + } else { + return profileBuilder_.getMessage(); + } + } + /** + *
+       *用户好友的信息
+       * 
+ * + * .core.UserProfile profile = 1; + */ + public Builder setProfile(com.akaxin.proto.core.UserProto.UserProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profile_ = value; + onChanged(); + } else { + profileBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *用户好友的信息
+       * 
+ * + * .core.UserProfile profile = 1; + */ + public Builder setProfile( + com.akaxin.proto.core.UserProto.UserProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + profile_ = builderForValue.build(); + onChanged(); + } else { + profileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *用户好友的信息
+       * 
+ * + * .core.UserProfile profile = 1; + */ + public Builder mergeProfile(com.akaxin.proto.core.UserProto.UserProfile value) { + if (profileBuilder_ == null) { + if (profile_ != null) { + profile_ = + com.akaxin.proto.core.UserProto.UserProfile.newBuilder(profile_).mergeFrom(value).buildPartial(); + } else { + profile_ = value; + } + onChanged(); + } else { + profileBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *用户好友的信息
+       * 
+ * + * .core.UserProfile profile = 1; + */ + public Builder clearProfile() { + if (profileBuilder_ == null) { + profile_ = null; + onChanged(); + } else { + profile_ = null; + profileBuilder_ = null; + } + + return this; + } + /** + *
+       *用户好友的信息
+       * 
+ * + * .core.UserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile.Builder getProfileBuilder() { + + onChanged(); + return getProfileFieldBuilder().getBuilder(); + } + /** + *
+       *用户好友的信息
+       * 
+ * + * .core.UserProfile profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getProfileOrBuilder() { + if (profileBuilder_ != null) { + return profileBuilder_.getMessageOrBuilder(); + } else { + return profile_ == null ? + com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : profile_; + } + } + /** + *
+       *用户好友的信息
+       * 
+ * + * .core.UserProfile profile = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> + getProfileFieldBuilder() { + if (profileBuilder_ == null) { + profileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder>( + getProfile(), + getParentForChildren(), + isClean()); + profile_ = null; + } + return profileBuilder_; + } + + private int relation_ = 0; + /** + *
+       *用户之间的关系
+       * 
+ * + * .core.UserRelation relation = 2; + */ + public int getRelationValue() { + return relation_; + } + /** + *
+       *用户之间的关系
+       * 
+ * + * .core.UserRelation relation = 2; + */ + public Builder setRelationValue(int value) { + relation_ = value; + onChanged(); + return this; + } + /** + *
+       *用户之间的关系
+       * 
+ * + * .core.UserRelation relation = 2; + */ + public com.akaxin.proto.core.UserProto.UserRelation getRelation() { + com.akaxin.proto.core.UserProto.UserRelation result = com.akaxin.proto.core.UserProto.UserRelation.valueOf(relation_); + return result == null ? com.akaxin.proto.core.UserProto.UserRelation.UNRECOGNIZED : result; + } + /** + *
+       *用户之间的关系
+       * 
+ * + * .core.UserRelation relation = 2; + */ + public Builder setRelation(com.akaxin.proto.core.UserProto.UserRelation value) { + if (value == null) { + throw new NullPointerException(); + } + + relation_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       *用户之间的关系
+       * 
+ * + * .core.UserRelation relation = 2; + */ + public Builder clearRelation() { + + relation_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiUserSearchResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiUserSearchResponse) + private static final com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse(); + } + + public static com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiUserSearchResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiUserSearchResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiUserSearchProto.ApiUserSearchResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiUserSearchRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiUserSearchRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiUserSearchResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiUserSearchResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032site/api_user_search.proto\022\004site\032\017core" + + "/user.proto\"\"\n\024ApiUserSearchRequest\022\n\n\002i" + + "d\030\001 \001(\t\"a\n\025ApiUserSearchResponse\022\"\n\007prof" + + "ile\030\001 \001(\0132\021.core.UserProfile\022$\n\010relation" + + "\030\002 \001(\0162\022.core.UserRelation2Y\n\024ApiUserSea" + + "rchService\022A\n\006search\022\032.site.ApiUserSearc" + + "hRequest\032\033.site.ApiUserSearchResponseB+\n" + + "\025com.akaxin.proto.siteB\022ApiUserSearchPro" + + "tob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.UserProto.getDescriptor(), + }, assigner); + internal_static_site_ApiUserSearchRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiUserSearchRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiUserSearchRequest_descriptor, + new java.lang.String[] { "Id", }); + internal_static_site_ApiUserSearchResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiUserSearchResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiUserSearchResponse_descriptor, + new java.lang.String[] { "Profile", "Relation", }); + com.akaxin.proto.core.UserProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiUserUpdateMuteProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiUserUpdateMuteProto.java new file mode 100755 index 0000000..d7a2ca4 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiUserUpdateMuteProto.java @@ -0,0 +1,910 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_user_updateMute.proto + +package com.akaxin.proto.site; + +public final class ApiUserUpdateMuteProto { + private ApiUserUpdateMuteProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiUserUpdateMuteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiUserUpdateMuteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * bool mute = 1; + */ + boolean getMute(); + } + /** + * Protobuf type {@code site.ApiUserUpdateMuteRequest} + */ + public static final class ApiUserUpdateMuteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiUserUpdateMuteRequest) + ApiUserUpdateMuteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiUserUpdateMuteRequest.newBuilder() to construct. + private ApiUserUpdateMuteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiUserUpdateMuteRequest() { + mute_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiUserUpdateMuteRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + mute_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserUpdateMuteProto.internal_static_site_ApiUserUpdateMuteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserUpdateMuteProto.internal_static_site_ApiUserUpdateMuteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest.class, com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest.Builder.class); + } + + public static final int MUTE_FIELD_NUMBER = 1; + private boolean mute_; + /** + * bool mute = 1; + */ + public boolean getMute() { + return mute_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (mute_ != false) { + output.writeBool(1, mute_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mute_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, mute_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest other = (com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest) obj; + + boolean result = true; + result = result && (getMute() + == other.getMute()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMute()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiUserUpdateMuteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiUserUpdateMuteRequest) + com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserUpdateMuteProto.internal_static_site_ApiUserUpdateMuteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserUpdateMuteProto.internal_static_site_ApiUserUpdateMuteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest.class, com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + mute_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiUserUpdateMuteProto.internal_static_site_ApiUserUpdateMuteRequest_descriptor; + } + + public com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest build() { + com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest buildPartial() { + com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest result = new com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest(this); + result.mute_ = mute_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest) { + return mergeFrom((com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest other) { + if (other == com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest.getDefaultInstance()) return this; + if (other.getMute() != false) { + setMute(other.getMute()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean mute_ ; + /** + * bool mute = 1; + */ + public boolean getMute() { + return mute_; + } + /** + * bool mute = 1; + */ + public Builder setMute(boolean value) { + + mute_ = value; + onChanged(); + return this; + } + /** + * bool mute = 1; + */ + public Builder clearMute() { + + mute_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiUserUpdateMuteRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiUserUpdateMuteRequest) + private static final com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest(); + } + + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiUserUpdateMuteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiUserUpdateMuteRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiUserUpdateMuteResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiUserUpdateMuteResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiUserUpdateMuteResponse} + */ + public static final class ApiUserUpdateMuteResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiUserUpdateMuteResponse) + ApiUserUpdateMuteResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiUserUpdateMuteResponse.newBuilder() to construct. + private ApiUserUpdateMuteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiUserUpdateMuteResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiUserUpdateMuteResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserUpdateMuteProto.internal_static_site_ApiUserUpdateMuteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserUpdateMuteProto.internal_static_site_ApiUserUpdateMuteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse.class, com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse other = (com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiUserUpdateMuteResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiUserUpdateMuteResponse) + com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserUpdateMuteProto.internal_static_site_ApiUserUpdateMuteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserUpdateMuteProto.internal_static_site_ApiUserUpdateMuteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse.class, com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiUserUpdateMuteProto.internal_static_site_ApiUserUpdateMuteResponse_descriptor; + } + + public com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse build() { + com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse buildPartial() { + com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse result = new com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse) { + return mergeFrom((com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse other) { + if (other == com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiUserUpdateMuteResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiUserUpdateMuteResponse) + private static final com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse(); + } + + public static com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiUserUpdateMuteResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiUserUpdateMuteResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiUserUpdateMuteProto.ApiUserUpdateMuteResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiUserUpdateMuteRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiUserUpdateMuteRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiUserUpdateMuteResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiUserUpdateMuteResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\036site/api_user_updateMute.proto\022\004site\"(" + + "\n\030ApiUserUpdateMuteRequest\022\014\n\004mute\030\001 \001(\010" + + "\"\033\n\031ApiUserUpdateMuteResponse2i\n\030ApiUser" + + "UpdateMuteService\022M\n\nupdateMute\022\036.site.A" + + "piUserUpdateMuteRequest\032\037.site.ApiUserUp" + + "dateMuteResponseB/\n\025com.akaxin.proto.sit" + + "eB\026ApiUserUpdateMuteProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiUserUpdateMuteRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiUserUpdateMuteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiUserUpdateMuteRequest_descriptor, + new java.lang.String[] { "Mute", }); + internal_static_site_ApiUserUpdateMuteResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiUserUpdateMuteResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiUserUpdateMuteResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiUserUpdateProfileProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiUserUpdateProfileProto.java new file mode 100755 index 0000000..9b8bcf6 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiUserUpdateProfileProto.java @@ -0,0 +1,1104 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_user_updateProfile.proto + +package com.akaxin.proto.site; + +public final class ApiUserUpdateProfileProto { + private ApiUserUpdateProfileProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiUserUpdateProfileRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiUserUpdateProfileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *更新的用户详细信息
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + boolean hasUserProfile(); + /** + *
+     *更新的用户详细信息
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + com.akaxin.proto.core.UserProto.UserProfile getUserProfile(); + /** + *
+     *更新的用户详细信息
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + com.akaxin.proto.core.UserProto.UserProfileOrBuilder getUserProfileOrBuilder(); + } + /** + * Protobuf type {@code site.ApiUserUpdateProfileRequest} + */ + public static final class ApiUserUpdateProfileRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiUserUpdateProfileRequest) + ApiUserUpdateProfileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiUserUpdateProfileRequest.newBuilder() to construct. + private ApiUserUpdateProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiUserUpdateProfileRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiUserUpdateProfileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.akaxin.proto.core.UserProto.UserProfile.Builder subBuilder = null; + if (userProfile_ != null) { + subBuilder = userProfile_.toBuilder(); + } + userProfile_ = input.readMessage(com.akaxin.proto.core.UserProto.UserProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(userProfile_); + userProfile_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserUpdateProfileProto.internal_static_site_ApiUserUpdateProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserUpdateProfileProto.internal_static_site_ApiUserUpdateProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest.class, com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest.Builder.class); + } + + public static final int USER_PROFILE_FIELD_NUMBER = 1; + private com.akaxin.proto.core.UserProto.UserProfile userProfile_; + /** + *
+     *更新的用户详细信息
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + public boolean hasUserProfile() { + return userProfile_ != null; + } + /** + *
+     *更新的用户详细信息
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile getUserProfile() { + return userProfile_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : userProfile_; + } + /** + *
+     *更新的用户详细信息
+     * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getUserProfileOrBuilder() { + return getUserProfile(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (userProfile_ != null) { + output.writeMessage(1, getUserProfile()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (userProfile_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUserProfile()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest other = (com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest) obj; + + boolean result = true; + result = result && (hasUserProfile() == other.hasUserProfile()); + if (hasUserProfile()) { + result = result && getUserProfile() + .equals(other.getUserProfile()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUserProfile()) { + hash = (37 * hash) + USER_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getUserProfile().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiUserUpdateProfileRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiUserUpdateProfileRequest) + com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserUpdateProfileProto.internal_static_site_ApiUserUpdateProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserUpdateProfileProto.internal_static_site_ApiUserUpdateProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest.class, com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (userProfileBuilder_ == null) { + userProfile_ = null; + } else { + userProfile_ = null; + userProfileBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiUserUpdateProfileProto.internal_static_site_ApiUserUpdateProfileRequest_descriptor; + } + + public com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest build() { + com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest buildPartial() { + com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest result = new com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest(this); + if (userProfileBuilder_ == null) { + result.userProfile_ = userProfile_; + } else { + result.userProfile_ = userProfileBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest) { + return mergeFrom((com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest other) { + if (other == com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest.getDefaultInstance()) return this; + if (other.hasUserProfile()) { + mergeUserProfile(other.getUserProfile()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.akaxin.proto.core.UserProto.UserProfile userProfile_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> userProfileBuilder_; + /** + *
+       *更新的用户详细信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public boolean hasUserProfile() { + return userProfileBuilder_ != null || userProfile_ != null; + } + /** + *
+       *更新的用户详细信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile getUserProfile() { + if (userProfileBuilder_ == null) { + return userProfile_ == null ? com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : userProfile_; + } else { + return userProfileBuilder_.getMessage(); + } + } + /** + *
+       *更新的用户详细信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder setUserProfile(com.akaxin.proto.core.UserProto.UserProfile value) { + if (userProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userProfile_ = value; + onChanged(); + } else { + userProfileBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *更新的用户详细信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder setUserProfile( + com.akaxin.proto.core.UserProto.UserProfile.Builder builderForValue) { + if (userProfileBuilder_ == null) { + userProfile_ = builderForValue.build(); + onChanged(); + } else { + userProfileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *更新的用户详细信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder mergeUserProfile(com.akaxin.proto.core.UserProto.UserProfile value) { + if (userProfileBuilder_ == null) { + if (userProfile_ != null) { + userProfile_ = + com.akaxin.proto.core.UserProto.UserProfile.newBuilder(userProfile_).mergeFrom(value).buildPartial(); + } else { + userProfile_ = value; + } + onChanged(); + } else { + userProfileBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *更新的用户详细信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public Builder clearUserProfile() { + if (userProfileBuilder_ == null) { + userProfile_ = null; + onChanged(); + } else { + userProfile_ = null; + userProfileBuilder_ = null; + } + + return this; + } + /** + *
+       *更新的用户详细信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfile.Builder getUserProfileBuilder() { + + onChanged(); + return getUserProfileFieldBuilder().getBuilder(); + } + /** + *
+       *更新的用户详细信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + public com.akaxin.proto.core.UserProto.UserProfileOrBuilder getUserProfileOrBuilder() { + if (userProfileBuilder_ != null) { + return userProfileBuilder_.getMessageOrBuilder(); + } else { + return userProfile_ == null ? + com.akaxin.proto.core.UserProto.UserProfile.getDefaultInstance() : userProfile_; + } + } + /** + *
+       *更新的用户详细信息
+       * 
+ * + * .core.UserProfile user_profile = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder> + getUserProfileFieldBuilder() { + if (userProfileBuilder_ == null) { + userProfileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.UserProto.UserProfile, com.akaxin.proto.core.UserProto.UserProfile.Builder, com.akaxin.proto.core.UserProto.UserProfileOrBuilder>( + getUserProfile(), + getParentForChildren(), + isClean()); + userProfile_ = null; + } + return userProfileBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiUserUpdateProfileRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiUserUpdateProfileRequest) + private static final com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest(); + } + + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiUserUpdateProfileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiUserUpdateProfileRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiUserUpdateProfileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiUserUpdateProfileResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiUserUpdateProfileResponse} + */ + public static final class ApiUserUpdateProfileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiUserUpdateProfileResponse) + ApiUserUpdateProfileResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiUserUpdateProfileResponse.newBuilder() to construct. + private ApiUserUpdateProfileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiUserUpdateProfileResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiUserUpdateProfileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserUpdateProfileProto.internal_static_site_ApiUserUpdateProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserUpdateProfileProto.internal_static_site_ApiUserUpdateProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse.class, com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse other = (com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiUserUpdateProfileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiUserUpdateProfileResponse) + com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiUserUpdateProfileProto.internal_static_site_ApiUserUpdateProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiUserUpdateProfileProto.internal_static_site_ApiUserUpdateProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse.class, com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiUserUpdateProfileProto.internal_static_site_ApiUserUpdateProfileResponse_descriptor; + } + + public com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse build() { + com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse buildPartial() { + com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse result = new com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse) { + return mergeFrom((com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse other) { + if (other == com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiUserUpdateProfileResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiUserUpdateProfileResponse) + private static final com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse(); + } + + public static com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiUserUpdateProfileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiUserUpdateProfileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiUserUpdateProfileProto.ApiUserUpdateProfileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiUserUpdateProfileRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiUserUpdateProfileRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiUserUpdateProfileResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiUserUpdateProfileResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n!site/api_user_updateProfile.proto\022\004sit" + + "e\032\017core/user.proto\"F\n\033ApiUserUpdateProfi" + + "leRequest\022\'\n\014user_profile\030\001 \001(\0132\021.core.U" + + "serProfile\"\036\n\034ApiUserUpdateProfileRespon" + + "se2u\n\033ApiUserUpdateProfileService\022V\n\rupd" + + "ateProfile\022!.site.ApiUserUpdateProfileRe" + + "quest\032\".site.ApiUserUpdateProfileRespons" + + "eB2\n\025com.akaxin.proto.siteB\031ApiUserUpdat" + + "eProfileProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.UserProto.getDescriptor(), + }, assigner); + internal_static_site_ApiUserUpdateProfileRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiUserUpdateProfileRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiUserUpdateProfileRequest_descriptor, + new java.lang.String[] { "UserProfile", }); + internal_static_site_ApiUserUpdateProfileResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiUserUpdateProfileResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiUserUpdateProfileResponse_descriptor, + new java.lang.String[] { }); + com.akaxin.proto.core.UserProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiWebAuthProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiWebAuthProto.java new file mode 100755 index 0000000..3148a75 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ApiWebAuthProto.java @@ -0,0 +1,1018 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/api_web_auth.proto + +package com.akaxin.proto.site; + +public final class ApiWebAuthProto { + private ApiWebAuthProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ApiWebAuthRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiWebAuthRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *webim 二维码产生的验证key
+     * 
+ * + * string session_id = 1; + */ + java.lang.String getSessionId(); + /** + *
+     *webim 二维码产生的验证key
+     * 
+ * + * string session_id = 1; + */ + com.google.protobuf.ByteString + getSessionIdBytes(); + } + /** + * Protobuf type {@code site.ApiWebAuthRequest} + */ + public static final class ApiWebAuthRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiWebAuthRequest) + ApiWebAuthRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiWebAuthRequest.newBuilder() to construct. + private ApiWebAuthRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiWebAuthRequest() { + sessionId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiWebAuthRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + sessionId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiWebAuthProto.internal_static_site_ApiWebAuthRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiWebAuthProto.internal_static_site_ApiWebAuthRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest.class, com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest.Builder.class); + } + + public static final int SESSION_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object sessionId_; + /** + *
+     *webim 二维码产生的验证key
+     * 
+ * + * string session_id = 1; + */ + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionId_ = s; + return s; + } + } + /** + *
+     *webim 二维码产生的验证key
+     * 
+ * + * string session_id = 1; + */ + public com.google.protobuf.ByteString + getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSessionIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sessionId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSessionIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sessionId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest other = (com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest) obj; + + boolean result = true; + result = result && getSessionId() + .equals(other.getSessionId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SESSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getSessionId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiWebAuthRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiWebAuthRequest) + com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiWebAuthProto.internal_static_site_ApiWebAuthRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiWebAuthProto.internal_static_site_ApiWebAuthRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest.class, com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + sessionId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiWebAuthProto.internal_static_site_ApiWebAuthRequest_descriptor; + } + + public com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest build() { + com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest buildPartial() { + com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest result = new com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest(this); + result.sessionId_ = sessionId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest) { + return mergeFrom((com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest other) { + if (other == com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest.getDefaultInstance()) return this; + if (!other.getSessionId().isEmpty()) { + sessionId_ = other.sessionId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object sessionId_ = ""; + /** + *
+       *webim 二维码产生的验证key
+       * 
+ * + * string session_id = 1; + */ + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *webim 二维码产生的验证key
+       * 
+ * + * string session_id = 1; + */ + public com.google.protobuf.ByteString + getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *webim 二维码产生的验证key
+       * 
+ * + * string session_id = 1; + */ + public Builder setSessionId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sessionId_ = value; + onChanged(); + return this; + } + /** + *
+       *webim 二维码产生的验证key
+       * 
+ * + * string session_id = 1; + */ + public Builder clearSessionId() { + + sessionId_ = getDefaultInstance().getSessionId(); + onChanged(); + return this; + } + /** + *
+       *webim 二维码产生的验证key
+       * 
+ * + * string session_id = 1; + */ + public Builder setSessionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sessionId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiWebAuthRequest) + } + + // @@protoc_insertion_point(class_scope:site.ApiWebAuthRequest) + private static final com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest(); + } + + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiWebAuthRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiWebAuthRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApiWebAuthResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ApiWebAuthResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code site.ApiWebAuthResponse} + */ + public static final class ApiWebAuthResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ApiWebAuthResponse) + ApiWebAuthResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiWebAuthResponse.newBuilder() to construct. + private ApiWebAuthResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiWebAuthResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiWebAuthResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiWebAuthProto.internal_static_site_ApiWebAuthResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiWebAuthProto.internal_static_site_ApiWebAuthResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse.class, com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse other = (com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ApiWebAuthResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ApiWebAuthResponse) + com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ApiWebAuthProto.internal_static_site_ApiWebAuthResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ApiWebAuthProto.internal_static_site_ApiWebAuthResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse.class, com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ApiWebAuthProto.internal_static_site_ApiWebAuthResponse_descriptor; + } + + public com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse build() { + com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse buildPartial() { + com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse result = new com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse) { + return mergeFrom((com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse other) { + if (other == com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ApiWebAuthResponse) + } + + // @@protoc_insertion_point(class_scope:site.ApiWebAuthResponse) + private static final com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse(); + } + + public static com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ApiWebAuthResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiWebAuthResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ApiWebAuthProto.ApiWebAuthResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiWebAuthRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiWebAuthRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ApiWebAuthResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ApiWebAuthResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\027site/api_web_auth.proto\022\004site\"\'\n\021ApiWe" + + "bAuthRequest\022\022\n\nsession_id\030\001 \001(\t\"\024\n\022ApiW" + + "ebAuthResponse2N\n\021ApiWebAuthService\0229\n\004a" + + "uth\022\027.site.ApiWebAuthRequest\032\030.site.ApiW" + + "ebAuthResponseB(\n\025com.akaxin.proto.siteB" + + "\017ApiWebAuthProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ApiWebAuthRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ApiWebAuthRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiWebAuthRequest_descriptor, + new java.lang.String[] { "SessionId", }); + internal_static_site_ApiWebAuthResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ApiWebAuthResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ApiWebAuthResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImCtpPingProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImCtpPingProto.java new file mode 100755 index 0000000..c16e0c1 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImCtpPingProto.java @@ -0,0 +1,455 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: platform/im_ctp_ping.proto + +package com.akaxin.proto.site; + +public final class ImCtpPingProto { + private ImCtpPingProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ImCtpPingRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:client.ImCtpPingRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   *ping操作不需要request实体
+   * 
+ * + * Protobuf type {@code client.ImCtpPingRequest} + */ + public static final class ImCtpPingRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:client.ImCtpPingRequest) + ImCtpPingRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImCtpPingRequest.newBuilder() to construct. + private ImCtpPingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImCtpPingRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImCtpPingRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImCtpPingProto.internal_static_client_ImCtpPingRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImCtpPingProto.internal_static_client_ImCtpPingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest.class, com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest other = (com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *ping操作不需要request实体
+     * 
+ * + * Protobuf type {@code client.ImCtpPingRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:client.ImCtpPingRequest) + com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImCtpPingProto.internal_static_client_ImCtpPingRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImCtpPingProto.internal_static_client_ImCtpPingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest.class, com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ImCtpPingProto.internal_static_client_ImCtpPingRequest_descriptor; + } + + public com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest build() { + com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest buildPartial() { + com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest result = new com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest) { + return mergeFrom((com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest other) { + if (other == com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:client.ImCtpPingRequest) + } + + // @@protoc_insertion_point(class_scope:client.ImCtpPingRequest) + private static final com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest(); + } + + public static com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImCtpPingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImCtpPingRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ImCtpPingProto.ImCtpPingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_client_ImCtpPingRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_client_ImCtpPingRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032platform/im_ctp_ping.proto\022\006client\032\017co" + + "re/core.proto\"\022\n\020ImCtpPingRequest2H\n\020ImC" + + "tpPingService\0224\n\004ping\022\030.client.ImCtpPing" + + "Request\032\022.core.NoneResponseB\'\n\025com.akaxi" + + "n.proto.siteB\016ImCtpPingProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.CoreProto.getDescriptor(), + }, assigner); + internal_static_client_ImCtpPingRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_client_ImCtpPingRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_client_ImCtpPingRequest_descriptor, + new java.lang.String[] { }); + com.akaxin.proto.core.CoreProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImCtsMessageProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImCtsMessageProto.java new file mode 100755 index 0000000..2be9193 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImCtsMessageProto.java @@ -0,0 +1,6697 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/im_cts_message.proto + +package com.akaxin.proto.site; + +public final class ImCtsMessageProto { + private ImCtsMessageProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ImCtsMessageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ImCtsMessageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *消息类型
+     * 
+ * + * .core.MsgType type = 1; + */ + int getTypeValue(); + /** + *
+     *消息类型
+     * 
+ * + * .core.MsgType type = 1; + */ + com.akaxin.proto.core.CoreProto.MsgType getType(); + + /** + *
+     *二人文本消息
+     * 
+ * + * .core.MsgText text = 2; + */ + boolean hasText(); + /** + *
+     *二人文本消息
+     * 
+ * + * .core.MsgText text = 2; + */ + com.akaxin.proto.core.CoreProto.MsgText getText(); + /** + *
+     *二人文本消息
+     * 
+ * + * .core.MsgText text = 2; + */ + com.akaxin.proto.core.CoreProto.MsgTextOrBuilder getTextOrBuilder(); + + /** + *
+     *二人加密文本消息
+     * 
+ * + * .core.MsgSecretText secretText = 3; + */ + boolean hasSecretText(); + /** + *
+     *二人加密文本消息
+     * 
+ * + * .core.MsgSecretText secretText = 3; + */ + com.akaxin.proto.core.CoreProto.MsgSecretText getSecretText(); + /** + *
+     *二人加密文本消息
+     * 
+ * + * .core.MsgSecretText secretText = 3; + */ + com.akaxin.proto.core.CoreProto.MsgSecretTextOrBuilder getSecretTextOrBuilder(); + + /** + *
+     *群文本消息
+     * 
+ * + * .core.GroupText groupText = 4; + */ + boolean hasGroupText(); + /** + *
+     *群文本消息
+     * 
+ * + * .core.GroupText groupText = 4; + */ + com.akaxin.proto.core.CoreProto.GroupText getGroupText(); + /** + *
+     *群文本消息
+     * 
+ * + * .core.GroupText groupText = 4; + */ + com.akaxin.proto.core.CoreProto.GroupTextOrBuilder getGroupTextOrBuilder(); + + /** + *
+     *群加密消息
+     * 
+ * + * .core.GroupSecretText groupSecretText = 5; + */ + boolean hasGroupSecretText(); + /** + *
+     *群加密消息
+     * 
+ * + * .core.GroupSecretText groupSecretText = 5; + */ + com.akaxin.proto.core.CoreProto.GroupSecretText getGroupSecretText(); + /** + *
+     *群加密消息
+     * 
+ * + * .core.GroupSecretText groupSecretText = 5; + */ + com.akaxin.proto.core.CoreProto.GroupSecretTextOrBuilder getGroupSecretTextOrBuilder(); + + /** + *
+     *二人图片消息
+     * 
+ * + * .core.MsgImage image = 6; + */ + boolean hasImage(); + /** + *
+     *二人图片消息
+     * 
+ * + * .core.MsgImage image = 6; + */ + com.akaxin.proto.core.CoreProto.MsgImage getImage(); + /** + *
+     *二人图片消息
+     * 
+ * + * .core.MsgImage image = 6; + */ + com.akaxin.proto.core.CoreProto.MsgImageOrBuilder getImageOrBuilder(); + + /** + *
+     *二人加密图片消息
+     * 
+ * + * .core.MsgSecretImage secretImage = 7; + */ + boolean hasSecretImage(); + /** + *
+     *二人加密图片消息
+     * 
+ * + * .core.MsgSecretImage secretImage = 7; + */ + com.akaxin.proto.core.CoreProto.MsgSecretImage getSecretImage(); + /** + *
+     *二人加密图片消息
+     * 
+ * + * .core.MsgSecretImage secretImage = 7; + */ + com.akaxin.proto.core.CoreProto.MsgSecretImageOrBuilder getSecretImageOrBuilder(); + + /** + *
+     *群图片消息
+     * 
+ * + * .core.GroupImage groupImage = 8; + */ + boolean hasGroupImage(); + /** + *
+     *群图片消息
+     * 
+ * + * .core.GroupImage groupImage = 8; + */ + com.akaxin.proto.core.CoreProto.GroupImage getGroupImage(); + /** + *
+     *群图片消息
+     * 
+ * + * .core.GroupImage groupImage = 8; + */ + com.akaxin.proto.core.CoreProto.GroupImageOrBuilder getGroupImageOrBuilder(); + + /** + *
+     *群图片加密消息
+     * 
+ * + * .core.GroupSecretImage groupSecretImage = 9; + */ + boolean hasGroupSecretImage(); + /** + *
+     *群图片加密消息
+     * 
+ * + * .core.GroupSecretImage groupSecretImage = 9; + */ + com.akaxin.proto.core.CoreProto.GroupSecretImage getGroupSecretImage(); + /** + *
+     *群图片加密消息
+     * 
+ * + * .core.GroupSecretImage groupSecretImage = 9; + */ + com.akaxin.proto.core.CoreProto.GroupSecretImageOrBuilder getGroupSecretImageOrBuilder(); + + /** + *
+     *二人语音
+     * 
+ * + * .core.MsgVoice voice = 10; + */ + boolean hasVoice(); + /** + *
+     *二人语音
+     * 
+ * + * .core.MsgVoice voice = 10; + */ + com.akaxin.proto.core.CoreProto.MsgVoice getVoice(); + /** + *
+     *二人语音
+     * 
+ * + * .core.MsgVoice voice = 10; + */ + com.akaxin.proto.core.CoreProto.MsgVoiceOrBuilder getVoiceOrBuilder(); + + /** + *
+     *二人加密语音
+     * 
+ * + * .core.MsgSecretVoice secretVoice = 11; + */ + boolean hasSecretVoice(); + /** + *
+     *二人加密语音
+     * 
+ * + * .core.MsgSecretVoice secretVoice = 11; + */ + com.akaxin.proto.core.CoreProto.MsgSecretVoice getSecretVoice(); + /** + *
+     *二人加密语音
+     * 
+ * + * .core.MsgSecretVoice secretVoice = 11; + */ + com.akaxin.proto.core.CoreProto.MsgSecretVoiceOrBuilder getSecretVoiceOrBuilder(); + + /** + *
+     *群语音
+     * 
+ * + * .core.GroupVoice groupVoice = 12; + */ + boolean hasGroupVoice(); + /** + *
+     *群语音
+     * 
+ * + * .core.GroupVoice groupVoice = 12; + */ + com.akaxin.proto.core.CoreProto.GroupVoice getGroupVoice(); + /** + *
+     *群语音
+     * 
+ * + * .core.GroupVoice groupVoice = 12; + */ + com.akaxin.proto.core.CoreProto.GroupVoiceOrBuilder getGroupVoiceOrBuilder(); + + /** + *
+     *群加密语音
+     * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 13; + */ + boolean hasGroupSecretVoice(); + /** + *
+     *群加密语音
+     * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 13; + */ + com.akaxin.proto.core.CoreProto.GroupSecretVoice getGroupSecretVoice(); + /** + *
+     *群加密语音
+     * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 13; + */ + com.akaxin.proto.core.CoreProto.GroupSecretVoiceOrBuilder getGroupSecretVoiceOrBuilder(); + + /** + *
+     *v0.4.3 版本未使用
+     * 
+ * + * .core.U2Map u2Map = 14; + */ + boolean hasU2Map(); + /** + *
+     *v0.4.3 版本未使用
+     * 
+ * + * .core.U2Map u2Map = 14; + */ + com.akaxin.proto.core.CoreProto.U2Map getU2Map(); + /** + *
+     *v0.4.3 版本未使用
+     * 
+ * + * .core.U2Map u2Map = 14; + */ + com.akaxin.proto.core.CoreProto.U2MapOrBuilder getU2MapOrBuilder(); + + /** + *
+     *加密地图消息
+     * 
+ * + * .core.U2SecretMap u2SecretMap = 15; + */ + boolean hasU2SecretMap(); + /** + *
+     *加密地图消息
+     * 
+ * + * .core.U2SecretMap u2SecretMap = 15; + */ + com.akaxin.proto.core.CoreProto.U2SecretMap getU2SecretMap(); + /** + *
+     *加密地图消息
+     * 
+ * + * .core.U2SecretMap u2SecretMap = 15; + */ + com.akaxin.proto.core.CoreProto.U2SecretMapOrBuilder getU2SecretMapOrBuilder(); + + /** + *
+     *群地图
+     * 
+ * + * .core.GroupMap groupMap = 16; + */ + boolean hasGroupMap(); + /** + *
+     *群地图
+     * 
+ * + * .core.GroupMap groupMap = 16; + */ + com.akaxin.proto.core.CoreProto.GroupMap getGroupMap(); + /** + *
+     *群地图
+     * 
+ * + * .core.GroupMap groupMap = 16; + */ + com.akaxin.proto.core.CoreProto.GroupMapOrBuilder getGroupMapOrBuilder(); + + /** + *
+     *群加密地图
+     * 
+ * + * .core.GroupSecretMap groupSecretMap = 17; + */ + boolean hasGroupSecretMap(); + /** + *
+     *群加密地图
+     * 
+ * + * .core.GroupSecretMap groupSecretMap = 17; + */ + com.akaxin.proto.core.CoreProto.GroupSecretMap getGroupSecretMap(); + /** + *
+     *群加密地图
+     * 
+ * + * .core.GroupSecretMap groupSecretMap = 17; + */ + com.akaxin.proto.core.CoreProto.GroupSecretMapOrBuilder getGroupSecretMapOrBuilder(); + + /** + *
+     *通知消息
+     * 
+ * + * .core.U2MsgNotice u2MsgNotice = 18; + */ + boolean hasU2MsgNotice(); + /** + *
+     *通知消息
+     * 
+ * + * .core.U2MsgNotice u2MsgNotice = 18; + */ + com.akaxin.proto.core.CoreProto.U2MsgNotice getU2MsgNotice(); + /** + *
+     *通知消息
+     * 
+ * + * .core.U2MsgNotice u2MsgNotice = 18; + */ + com.akaxin.proto.core.CoreProto.U2MsgNoticeOrBuilder getU2MsgNoticeOrBuilder(); + + /** + *
+     *群消息通知
+     * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 19; + */ + boolean hasGroupMsgNotice(); + /** + *
+     *群消息通知
+     * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 19; + */ + com.akaxin.proto.core.CoreProto.GroupMsgNotice getGroupMsgNotice(); + /** + *
+     *群消息通知
+     * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 19; + */ + com.akaxin.proto.core.CoreProto.GroupMsgNoticeOrBuilder getGroupMsgNoticeOrBuilder(); + + /** + *
+     *召回消息
+     * 
+ * + * .core.U2Recall u2Recall = 20; + */ + boolean hasU2Recall(); + /** + *
+     *召回消息
+     * 
+ * + * .core.U2Recall u2Recall = 20; + */ + com.akaxin.proto.core.CoreProto.U2Recall getU2Recall(); + /** + *
+     *召回消息
+     * 
+ * + * .core.U2Recall u2Recall = 20; + */ + com.akaxin.proto.core.CoreProto.U2RecallOrBuilder getU2RecallOrBuilder(); + + /** + *
+     *群组召回消息
+     * 
+ * + * .core.GroupRecall groupRecall = 21; + */ + boolean hasGroupRecall(); + /** + *
+     *群组召回消息
+     * 
+ * + * .core.GroupRecall groupRecall = 21; + */ + com.akaxin.proto.core.CoreProto.GroupRecall getGroupRecall(); + /** + *
+     *群组召回消息
+     * 
+ * + * .core.GroupRecall groupRecall = 21; + */ + com.akaxin.proto.core.CoreProto.GroupRecallOrBuilder getGroupRecallOrBuilder(); + + /** + *
+     *web消息
+     * 
+ * + * .core.U2Web u2Web = 22; + */ + boolean hasU2Web(); + /** + *
+     *web消息
+     * 
+ * + * .core.U2Web u2Web = 22; + */ + com.akaxin.proto.core.CoreProto.U2Web getU2Web(); + /** + *
+     *web消息
+     * 
+ * + * .core.U2Web u2Web = 22; + */ + com.akaxin.proto.core.CoreProto.U2WebOrBuilder getU2WebOrBuilder(); + + /** + *
+     *群组web消息
+     * 
+ * + * .core.GroupWeb groupWeb = 23; + */ + boolean hasGroupWeb(); + /** + *
+     *群组web消息
+     * 
+ * + * .core.GroupWeb groupWeb = 23; + */ + com.akaxin.proto.core.CoreProto.GroupWeb getGroupWeb(); + /** + *
+     *群组web消息
+     * 
+ * + * .core.GroupWeb groupWeb = 23; + */ + com.akaxin.proto.core.CoreProto.GroupWebOrBuilder getGroupWebOrBuilder(); + + /** + *
+     *web通知消息
+     * 
+ * + * .core.U2WebNotice u2WebNotice = 24; + */ + boolean hasU2WebNotice(); + /** + *
+     *web通知消息
+     * 
+ * + * .core.U2WebNotice u2WebNotice = 24; + */ + com.akaxin.proto.core.CoreProto.U2WebNotice getU2WebNotice(); + /** + *
+     *web通知消息
+     * 
+ * + * .core.U2WebNotice u2WebNotice = 24; + */ + com.akaxin.proto.core.CoreProto.U2WebNoticeOrBuilder getU2WebNoticeOrBuilder(); + + /** + *
+     *群组web通知消息
+     * 
+ * + * .core.GroupWebNotice groupWebNotice = 25; + */ + boolean hasGroupWebNotice(); + /** + *
+     *群组web通知消息
+     * 
+ * + * .core.GroupWebNotice groupWebNotice = 25; + */ + com.akaxin.proto.core.CoreProto.GroupWebNotice getGroupWebNotice(); + /** + *
+     *群组web通知消息
+     * 
+ * + * .core.GroupWebNotice groupWebNotice = 25; + */ + com.akaxin.proto.core.CoreProto.GroupWebNoticeOrBuilder getGroupWebNoticeOrBuilder(); + } + /** + * Protobuf type {@code site.ImCtsMessageRequest} + */ + public static final class ImCtsMessageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ImCtsMessageRequest) + ImCtsMessageRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImCtsMessageRequest.newBuilder() to construct. + private ImCtsMessageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImCtsMessageRequest() { + type_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImCtsMessageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 18: { + com.akaxin.proto.core.CoreProto.MsgText.Builder subBuilder = null; + if (text_ != null) { + subBuilder = text_.toBuilder(); + } + text_ = input.readMessage(com.akaxin.proto.core.CoreProto.MsgText.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(text_); + text_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.akaxin.proto.core.CoreProto.MsgSecretText.Builder subBuilder = null; + if (secretText_ != null) { + subBuilder = secretText_.toBuilder(); + } + secretText_ = input.readMessage(com.akaxin.proto.core.CoreProto.MsgSecretText.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(secretText_); + secretText_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.akaxin.proto.core.CoreProto.GroupText.Builder subBuilder = null; + if (groupText_ != null) { + subBuilder = groupText_.toBuilder(); + } + groupText_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupText.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupText_); + groupText_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + com.akaxin.proto.core.CoreProto.GroupSecretText.Builder subBuilder = null; + if (groupSecretText_ != null) { + subBuilder = groupSecretText_.toBuilder(); + } + groupSecretText_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupSecretText.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupSecretText_); + groupSecretText_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.akaxin.proto.core.CoreProto.MsgImage.Builder subBuilder = null; + if (image_ != null) { + subBuilder = image_.toBuilder(); + } + image_ = input.readMessage(com.akaxin.proto.core.CoreProto.MsgImage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(image_); + image_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + com.akaxin.proto.core.CoreProto.MsgSecretImage.Builder subBuilder = null; + if (secretImage_ != null) { + subBuilder = secretImage_.toBuilder(); + } + secretImage_ = input.readMessage(com.akaxin.proto.core.CoreProto.MsgSecretImage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(secretImage_); + secretImage_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + com.akaxin.proto.core.CoreProto.GroupImage.Builder subBuilder = null; + if (groupImage_ != null) { + subBuilder = groupImage_.toBuilder(); + } + groupImage_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupImage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupImage_); + groupImage_ = subBuilder.buildPartial(); + } + + break; + } + case 74: { + com.akaxin.proto.core.CoreProto.GroupSecretImage.Builder subBuilder = null; + if (groupSecretImage_ != null) { + subBuilder = groupSecretImage_.toBuilder(); + } + groupSecretImage_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupSecretImage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupSecretImage_); + groupSecretImage_ = subBuilder.buildPartial(); + } + + break; + } + case 82: { + com.akaxin.proto.core.CoreProto.MsgVoice.Builder subBuilder = null; + if (voice_ != null) { + subBuilder = voice_.toBuilder(); + } + voice_ = input.readMessage(com.akaxin.proto.core.CoreProto.MsgVoice.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(voice_); + voice_ = subBuilder.buildPartial(); + } + + break; + } + case 90: { + com.akaxin.proto.core.CoreProto.MsgSecretVoice.Builder subBuilder = null; + if (secretVoice_ != null) { + subBuilder = secretVoice_.toBuilder(); + } + secretVoice_ = input.readMessage(com.akaxin.proto.core.CoreProto.MsgSecretVoice.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(secretVoice_); + secretVoice_ = subBuilder.buildPartial(); + } + + break; + } + case 98: { + com.akaxin.proto.core.CoreProto.GroupVoice.Builder subBuilder = null; + if (groupVoice_ != null) { + subBuilder = groupVoice_.toBuilder(); + } + groupVoice_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupVoice.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupVoice_); + groupVoice_ = subBuilder.buildPartial(); + } + + break; + } + case 106: { + com.akaxin.proto.core.CoreProto.GroupSecretVoice.Builder subBuilder = null; + if (groupSecretVoice_ != null) { + subBuilder = groupSecretVoice_.toBuilder(); + } + groupSecretVoice_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupSecretVoice.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupSecretVoice_); + groupSecretVoice_ = subBuilder.buildPartial(); + } + + break; + } + case 114: { + com.akaxin.proto.core.CoreProto.U2Map.Builder subBuilder = null; + if (u2Map_ != null) { + subBuilder = u2Map_.toBuilder(); + } + u2Map_ = input.readMessage(com.akaxin.proto.core.CoreProto.U2Map.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(u2Map_); + u2Map_ = subBuilder.buildPartial(); + } + + break; + } + case 122: { + com.akaxin.proto.core.CoreProto.U2SecretMap.Builder subBuilder = null; + if (u2SecretMap_ != null) { + subBuilder = u2SecretMap_.toBuilder(); + } + u2SecretMap_ = input.readMessage(com.akaxin.proto.core.CoreProto.U2SecretMap.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(u2SecretMap_); + u2SecretMap_ = subBuilder.buildPartial(); + } + + break; + } + case 130: { + com.akaxin.proto.core.CoreProto.GroupMap.Builder subBuilder = null; + if (groupMap_ != null) { + subBuilder = groupMap_.toBuilder(); + } + groupMap_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupMap.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupMap_); + groupMap_ = subBuilder.buildPartial(); + } + + break; + } + case 138: { + com.akaxin.proto.core.CoreProto.GroupSecretMap.Builder subBuilder = null; + if (groupSecretMap_ != null) { + subBuilder = groupSecretMap_.toBuilder(); + } + groupSecretMap_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupSecretMap.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupSecretMap_); + groupSecretMap_ = subBuilder.buildPartial(); + } + + break; + } + case 146: { + com.akaxin.proto.core.CoreProto.U2MsgNotice.Builder subBuilder = null; + if (u2MsgNotice_ != null) { + subBuilder = u2MsgNotice_.toBuilder(); + } + u2MsgNotice_ = input.readMessage(com.akaxin.proto.core.CoreProto.U2MsgNotice.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(u2MsgNotice_); + u2MsgNotice_ = subBuilder.buildPartial(); + } + + break; + } + case 154: { + com.akaxin.proto.core.CoreProto.GroupMsgNotice.Builder subBuilder = null; + if (groupMsgNotice_ != null) { + subBuilder = groupMsgNotice_.toBuilder(); + } + groupMsgNotice_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupMsgNotice.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupMsgNotice_); + groupMsgNotice_ = subBuilder.buildPartial(); + } + + break; + } + case 162: { + com.akaxin.proto.core.CoreProto.U2Recall.Builder subBuilder = null; + if (u2Recall_ != null) { + subBuilder = u2Recall_.toBuilder(); + } + u2Recall_ = input.readMessage(com.akaxin.proto.core.CoreProto.U2Recall.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(u2Recall_); + u2Recall_ = subBuilder.buildPartial(); + } + + break; + } + case 170: { + com.akaxin.proto.core.CoreProto.GroupRecall.Builder subBuilder = null; + if (groupRecall_ != null) { + subBuilder = groupRecall_.toBuilder(); + } + groupRecall_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupRecall.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupRecall_); + groupRecall_ = subBuilder.buildPartial(); + } + + break; + } + case 178: { + com.akaxin.proto.core.CoreProto.U2Web.Builder subBuilder = null; + if (u2Web_ != null) { + subBuilder = u2Web_.toBuilder(); + } + u2Web_ = input.readMessage(com.akaxin.proto.core.CoreProto.U2Web.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(u2Web_); + u2Web_ = subBuilder.buildPartial(); + } + + break; + } + case 186: { + com.akaxin.proto.core.CoreProto.GroupWeb.Builder subBuilder = null; + if (groupWeb_ != null) { + subBuilder = groupWeb_.toBuilder(); + } + groupWeb_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupWeb.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupWeb_); + groupWeb_ = subBuilder.buildPartial(); + } + + break; + } + case 194: { + com.akaxin.proto.core.CoreProto.U2WebNotice.Builder subBuilder = null; + if (u2WebNotice_ != null) { + subBuilder = u2WebNotice_.toBuilder(); + } + u2WebNotice_ = input.readMessage(com.akaxin.proto.core.CoreProto.U2WebNotice.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(u2WebNotice_); + u2WebNotice_ = subBuilder.buildPartial(); + } + + break; + } + case 202: { + com.akaxin.proto.core.CoreProto.GroupWebNotice.Builder subBuilder = null; + if (groupWebNotice_ != null) { + subBuilder = groupWebNotice_.toBuilder(); + } + groupWebNotice_ = input.readMessage(com.akaxin.proto.core.CoreProto.GroupWebNotice.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(groupWebNotice_); + groupWebNotice_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImCtsMessageProto.internal_static_site_ImCtsMessageRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImCtsMessageProto.internal_static_site_ImCtsMessageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest.class, com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + *
+     *消息类型
+     * 
+ * + * .core.MsgType type = 1; + */ + public int getTypeValue() { + return type_; + } + /** + *
+     *消息类型
+     * 
+ * + * .core.MsgType type = 1; + */ + public com.akaxin.proto.core.CoreProto.MsgType getType() { + com.akaxin.proto.core.CoreProto.MsgType result = com.akaxin.proto.core.CoreProto.MsgType.valueOf(type_); + return result == null ? com.akaxin.proto.core.CoreProto.MsgType.UNRECOGNIZED : result; + } + + public static final int TEXT_FIELD_NUMBER = 2; + private com.akaxin.proto.core.CoreProto.MsgText text_; + /** + *
+     *二人文本消息
+     * 
+ * + * .core.MsgText text = 2; + */ + public boolean hasText() { + return text_ != null; + } + /** + *
+     *二人文本消息
+     * 
+ * + * .core.MsgText text = 2; + */ + public com.akaxin.proto.core.CoreProto.MsgText getText() { + return text_ == null ? com.akaxin.proto.core.CoreProto.MsgText.getDefaultInstance() : text_; + } + /** + *
+     *二人文本消息
+     * 
+ * + * .core.MsgText text = 2; + */ + public com.akaxin.proto.core.CoreProto.MsgTextOrBuilder getTextOrBuilder() { + return getText(); + } + + public static final int SECRETTEXT_FIELD_NUMBER = 3; + private com.akaxin.proto.core.CoreProto.MsgSecretText secretText_; + /** + *
+     *二人加密文本消息
+     * 
+ * + * .core.MsgSecretText secretText = 3; + */ + public boolean hasSecretText() { + return secretText_ != null; + } + /** + *
+     *二人加密文本消息
+     * 
+ * + * .core.MsgSecretText secretText = 3; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretText getSecretText() { + return secretText_ == null ? com.akaxin.proto.core.CoreProto.MsgSecretText.getDefaultInstance() : secretText_; + } + /** + *
+     *二人加密文本消息
+     * 
+ * + * .core.MsgSecretText secretText = 3; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretTextOrBuilder getSecretTextOrBuilder() { + return getSecretText(); + } + + public static final int GROUPTEXT_FIELD_NUMBER = 4; + private com.akaxin.proto.core.CoreProto.GroupText groupText_; + /** + *
+     *群文本消息
+     * 
+ * + * .core.GroupText groupText = 4; + */ + public boolean hasGroupText() { + return groupText_ != null; + } + /** + *
+     *群文本消息
+     * 
+ * + * .core.GroupText groupText = 4; + */ + public com.akaxin.proto.core.CoreProto.GroupText getGroupText() { + return groupText_ == null ? com.akaxin.proto.core.CoreProto.GroupText.getDefaultInstance() : groupText_; + } + /** + *
+     *群文本消息
+     * 
+ * + * .core.GroupText groupText = 4; + */ + public com.akaxin.proto.core.CoreProto.GroupTextOrBuilder getGroupTextOrBuilder() { + return getGroupText(); + } + + public static final int GROUPSECRETTEXT_FIELD_NUMBER = 5; + private com.akaxin.proto.core.CoreProto.GroupSecretText groupSecretText_; + /** + *
+     *群加密消息
+     * 
+ * + * .core.GroupSecretText groupSecretText = 5; + */ + public boolean hasGroupSecretText() { + return groupSecretText_ != null; + } + /** + *
+     *群加密消息
+     * 
+ * + * .core.GroupSecretText groupSecretText = 5; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretText getGroupSecretText() { + return groupSecretText_ == null ? com.akaxin.proto.core.CoreProto.GroupSecretText.getDefaultInstance() : groupSecretText_; + } + /** + *
+     *群加密消息
+     * 
+ * + * .core.GroupSecretText groupSecretText = 5; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretTextOrBuilder getGroupSecretTextOrBuilder() { + return getGroupSecretText(); + } + + public static final int IMAGE_FIELD_NUMBER = 6; + private com.akaxin.proto.core.CoreProto.MsgImage image_; + /** + *
+     *二人图片消息
+     * 
+ * + * .core.MsgImage image = 6; + */ + public boolean hasImage() { + return image_ != null; + } + /** + *
+     *二人图片消息
+     * 
+ * + * .core.MsgImage image = 6; + */ + public com.akaxin.proto.core.CoreProto.MsgImage getImage() { + return image_ == null ? com.akaxin.proto.core.CoreProto.MsgImage.getDefaultInstance() : image_; + } + /** + *
+     *二人图片消息
+     * 
+ * + * .core.MsgImage image = 6; + */ + public com.akaxin.proto.core.CoreProto.MsgImageOrBuilder getImageOrBuilder() { + return getImage(); + } + + public static final int SECRETIMAGE_FIELD_NUMBER = 7; + private com.akaxin.proto.core.CoreProto.MsgSecretImage secretImage_; + /** + *
+     *二人加密图片消息
+     * 
+ * + * .core.MsgSecretImage secretImage = 7; + */ + public boolean hasSecretImage() { + return secretImage_ != null; + } + /** + *
+     *二人加密图片消息
+     * 
+ * + * .core.MsgSecretImage secretImage = 7; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretImage getSecretImage() { + return secretImage_ == null ? com.akaxin.proto.core.CoreProto.MsgSecretImage.getDefaultInstance() : secretImage_; + } + /** + *
+     *二人加密图片消息
+     * 
+ * + * .core.MsgSecretImage secretImage = 7; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretImageOrBuilder getSecretImageOrBuilder() { + return getSecretImage(); + } + + public static final int GROUPIMAGE_FIELD_NUMBER = 8; + private com.akaxin.proto.core.CoreProto.GroupImage groupImage_; + /** + *
+     *群图片消息
+     * 
+ * + * .core.GroupImage groupImage = 8; + */ + public boolean hasGroupImage() { + return groupImage_ != null; + } + /** + *
+     *群图片消息
+     * 
+ * + * .core.GroupImage groupImage = 8; + */ + public com.akaxin.proto.core.CoreProto.GroupImage getGroupImage() { + return groupImage_ == null ? com.akaxin.proto.core.CoreProto.GroupImage.getDefaultInstance() : groupImage_; + } + /** + *
+     *群图片消息
+     * 
+ * + * .core.GroupImage groupImage = 8; + */ + public com.akaxin.proto.core.CoreProto.GroupImageOrBuilder getGroupImageOrBuilder() { + return getGroupImage(); + } + + public static final int GROUPSECRETIMAGE_FIELD_NUMBER = 9; + private com.akaxin.proto.core.CoreProto.GroupSecretImage groupSecretImage_; + /** + *
+     *群图片加密消息
+     * 
+ * + * .core.GroupSecretImage groupSecretImage = 9; + */ + public boolean hasGroupSecretImage() { + return groupSecretImage_ != null; + } + /** + *
+     *群图片加密消息
+     * 
+ * + * .core.GroupSecretImage groupSecretImage = 9; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretImage getGroupSecretImage() { + return groupSecretImage_ == null ? com.akaxin.proto.core.CoreProto.GroupSecretImage.getDefaultInstance() : groupSecretImage_; + } + /** + *
+     *群图片加密消息
+     * 
+ * + * .core.GroupSecretImage groupSecretImage = 9; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretImageOrBuilder getGroupSecretImageOrBuilder() { + return getGroupSecretImage(); + } + + public static final int VOICE_FIELD_NUMBER = 10; + private com.akaxin.proto.core.CoreProto.MsgVoice voice_; + /** + *
+     *二人语音
+     * 
+ * + * .core.MsgVoice voice = 10; + */ + public boolean hasVoice() { + return voice_ != null; + } + /** + *
+     *二人语音
+     * 
+ * + * .core.MsgVoice voice = 10; + */ + public com.akaxin.proto.core.CoreProto.MsgVoice getVoice() { + return voice_ == null ? com.akaxin.proto.core.CoreProto.MsgVoice.getDefaultInstance() : voice_; + } + /** + *
+     *二人语音
+     * 
+ * + * .core.MsgVoice voice = 10; + */ + public com.akaxin.proto.core.CoreProto.MsgVoiceOrBuilder getVoiceOrBuilder() { + return getVoice(); + } + + public static final int SECRETVOICE_FIELD_NUMBER = 11; + private com.akaxin.proto.core.CoreProto.MsgSecretVoice secretVoice_; + /** + *
+     *二人加密语音
+     * 
+ * + * .core.MsgSecretVoice secretVoice = 11; + */ + public boolean hasSecretVoice() { + return secretVoice_ != null; + } + /** + *
+     *二人加密语音
+     * 
+ * + * .core.MsgSecretVoice secretVoice = 11; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretVoice getSecretVoice() { + return secretVoice_ == null ? com.akaxin.proto.core.CoreProto.MsgSecretVoice.getDefaultInstance() : secretVoice_; + } + /** + *
+     *二人加密语音
+     * 
+ * + * .core.MsgSecretVoice secretVoice = 11; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretVoiceOrBuilder getSecretVoiceOrBuilder() { + return getSecretVoice(); + } + + public static final int GROUPVOICE_FIELD_NUMBER = 12; + private com.akaxin.proto.core.CoreProto.GroupVoice groupVoice_; + /** + *
+     *群语音
+     * 
+ * + * .core.GroupVoice groupVoice = 12; + */ + public boolean hasGroupVoice() { + return groupVoice_ != null; + } + /** + *
+     *群语音
+     * 
+ * + * .core.GroupVoice groupVoice = 12; + */ + public com.akaxin.proto.core.CoreProto.GroupVoice getGroupVoice() { + return groupVoice_ == null ? com.akaxin.proto.core.CoreProto.GroupVoice.getDefaultInstance() : groupVoice_; + } + /** + *
+     *群语音
+     * 
+ * + * .core.GroupVoice groupVoice = 12; + */ + public com.akaxin.proto.core.CoreProto.GroupVoiceOrBuilder getGroupVoiceOrBuilder() { + return getGroupVoice(); + } + + public static final int GROUPSECRETVOICE_FIELD_NUMBER = 13; + private com.akaxin.proto.core.CoreProto.GroupSecretVoice groupSecretVoice_; + /** + *
+     *群加密语音
+     * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 13; + */ + public boolean hasGroupSecretVoice() { + return groupSecretVoice_ != null; + } + /** + *
+     *群加密语音
+     * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 13; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretVoice getGroupSecretVoice() { + return groupSecretVoice_ == null ? com.akaxin.proto.core.CoreProto.GroupSecretVoice.getDefaultInstance() : groupSecretVoice_; + } + /** + *
+     *群加密语音
+     * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 13; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretVoiceOrBuilder getGroupSecretVoiceOrBuilder() { + return getGroupSecretVoice(); + } + + public static final int U2MAP_FIELD_NUMBER = 14; + private com.akaxin.proto.core.CoreProto.U2Map u2Map_; + /** + *
+     *v0.4.3 版本未使用
+     * 
+ * + * .core.U2Map u2Map = 14; + */ + public boolean hasU2Map() { + return u2Map_ != null; + } + /** + *
+     *v0.4.3 版本未使用
+     * 
+ * + * .core.U2Map u2Map = 14; + */ + public com.akaxin.proto.core.CoreProto.U2Map getU2Map() { + return u2Map_ == null ? com.akaxin.proto.core.CoreProto.U2Map.getDefaultInstance() : u2Map_; + } + /** + *
+     *v0.4.3 版本未使用
+     * 
+ * + * .core.U2Map u2Map = 14; + */ + public com.akaxin.proto.core.CoreProto.U2MapOrBuilder getU2MapOrBuilder() { + return getU2Map(); + } + + public static final int U2SECRETMAP_FIELD_NUMBER = 15; + private com.akaxin.proto.core.CoreProto.U2SecretMap u2SecretMap_; + /** + *
+     *加密地图消息
+     * 
+ * + * .core.U2SecretMap u2SecretMap = 15; + */ + public boolean hasU2SecretMap() { + return u2SecretMap_ != null; + } + /** + *
+     *加密地图消息
+     * 
+ * + * .core.U2SecretMap u2SecretMap = 15; + */ + public com.akaxin.proto.core.CoreProto.U2SecretMap getU2SecretMap() { + return u2SecretMap_ == null ? com.akaxin.proto.core.CoreProto.U2SecretMap.getDefaultInstance() : u2SecretMap_; + } + /** + *
+     *加密地图消息
+     * 
+ * + * .core.U2SecretMap u2SecretMap = 15; + */ + public com.akaxin.proto.core.CoreProto.U2SecretMapOrBuilder getU2SecretMapOrBuilder() { + return getU2SecretMap(); + } + + public static final int GROUPMAP_FIELD_NUMBER = 16; + private com.akaxin.proto.core.CoreProto.GroupMap groupMap_; + /** + *
+     *群地图
+     * 
+ * + * .core.GroupMap groupMap = 16; + */ + public boolean hasGroupMap() { + return groupMap_ != null; + } + /** + *
+     *群地图
+     * 
+ * + * .core.GroupMap groupMap = 16; + */ + public com.akaxin.proto.core.CoreProto.GroupMap getGroupMap() { + return groupMap_ == null ? com.akaxin.proto.core.CoreProto.GroupMap.getDefaultInstance() : groupMap_; + } + /** + *
+     *群地图
+     * 
+ * + * .core.GroupMap groupMap = 16; + */ + public com.akaxin.proto.core.CoreProto.GroupMapOrBuilder getGroupMapOrBuilder() { + return getGroupMap(); + } + + public static final int GROUPSECRETMAP_FIELD_NUMBER = 17; + private com.akaxin.proto.core.CoreProto.GroupSecretMap groupSecretMap_; + /** + *
+     *群加密地图
+     * 
+ * + * .core.GroupSecretMap groupSecretMap = 17; + */ + public boolean hasGroupSecretMap() { + return groupSecretMap_ != null; + } + /** + *
+     *群加密地图
+     * 
+ * + * .core.GroupSecretMap groupSecretMap = 17; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretMap getGroupSecretMap() { + return groupSecretMap_ == null ? com.akaxin.proto.core.CoreProto.GroupSecretMap.getDefaultInstance() : groupSecretMap_; + } + /** + *
+     *群加密地图
+     * 
+ * + * .core.GroupSecretMap groupSecretMap = 17; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretMapOrBuilder getGroupSecretMapOrBuilder() { + return getGroupSecretMap(); + } + + public static final int U2MSGNOTICE_FIELD_NUMBER = 18; + private com.akaxin.proto.core.CoreProto.U2MsgNotice u2MsgNotice_; + /** + *
+     *通知消息
+     * 
+ * + * .core.U2MsgNotice u2MsgNotice = 18; + */ + public boolean hasU2MsgNotice() { + return u2MsgNotice_ != null; + } + /** + *
+     *通知消息
+     * 
+ * + * .core.U2MsgNotice u2MsgNotice = 18; + */ + public com.akaxin.proto.core.CoreProto.U2MsgNotice getU2MsgNotice() { + return u2MsgNotice_ == null ? com.akaxin.proto.core.CoreProto.U2MsgNotice.getDefaultInstance() : u2MsgNotice_; + } + /** + *
+     *通知消息
+     * 
+ * + * .core.U2MsgNotice u2MsgNotice = 18; + */ + public com.akaxin.proto.core.CoreProto.U2MsgNoticeOrBuilder getU2MsgNoticeOrBuilder() { + return getU2MsgNotice(); + } + + public static final int GROUPMSGNOTICE_FIELD_NUMBER = 19; + private com.akaxin.proto.core.CoreProto.GroupMsgNotice groupMsgNotice_; + /** + *
+     *群消息通知
+     * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 19; + */ + public boolean hasGroupMsgNotice() { + return groupMsgNotice_ != null; + } + /** + *
+     *群消息通知
+     * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 19; + */ + public com.akaxin.proto.core.CoreProto.GroupMsgNotice getGroupMsgNotice() { + return groupMsgNotice_ == null ? com.akaxin.proto.core.CoreProto.GroupMsgNotice.getDefaultInstance() : groupMsgNotice_; + } + /** + *
+     *群消息通知
+     * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 19; + */ + public com.akaxin.proto.core.CoreProto.GroupMsgNoticeOrBuilder getGroupMsgNoticeOrBuilder() { + return getGroupMsgNotice(); + } + + public static final int U2RECALL_FIELD_NUMBER = 20; + private com.akaxin.proto.core.CoreProto.U2Recall u2Recall_; + /** + *
+     *召回消息
+     * 
+ * + * .core.U2Recall u2Recall = 20; + */ + public boolean hasU2Recall() { + return u2Recall_ != null; + } + /** + *
+     *召回消息
+     * 
+ * + * .core.U2Recall u2Recall = 20; + */ + public com.akaxin.proto.core.CoreProto.U2Recall getU2Recall() { + return u2Recall_ == null ? com.akaxin.proto.core.CoreProto.U2Recall.getDefaultInstance() : u2Recall_; + } + /** + *
+     *召回消息
+     * 
+ * + * .core.U2Recall u2Recall = 20; + */ + public com.akaxin.proto.core.CoreProto.U2RecallOrBuilder getU2RecallOrBuilder() { + return getU2Recall(); + } + + public static final int GROUPRECALL_FIELD_NUMBER = 21; + private com.akaxin.proto.core.CoreProto.GroupRecall groupRecall_; + /** + *
+     *群组召回消息
+     * 
+ * + * .core.GroupRecall groupRecall = 21; + */ + public boolean hasGroupRecall() { + return groupRecall_ != null; + } + /** + *
+     *群组召回消息
+     * 
+ * + * .core.GroupRecall groupRecall = 21; + */ + public com.akaxin.proto.core.CoreProto.GroupRecall getGroupRecall() { + return groupRecall_ == null ? com.akaxin.proto.core.CoreProto.GroupRecall.getDefaultInstance() : groupRecall_; + } + /** + *
+     *群组召回消息
+     * 
+ * + * .core.GroupRecall groupRecall = 21; + */ + public com.akaxin.proto.core.CoreProto.GroupRecallOrBuilder getGroupRecallOrBuilder() { + return getGroupRecall(); + } + + public static final int U2WEB_FIELD_NUMBER = 22; + private com.akaxin.proto.core.CoreProto.U2Web u2Web_; + /** + *
+     *web消息
+     * 
+ * + * .core.U2Web u2Web = 22; + */ + public boolean hasU2Web() { + return u2Web_ != null; + } + /** + *
+     *web消息
+     * 
+ * + * .core.U2Web u2Web = 22; + */ + public com.akaxin.proto.core.CoreProto.U2Web getU2Web() { + return u2Web_ == null ? com.akaxin.proto.core.CoreProto.U2Web.getDefaultInstance() : u2Web_; + } + /** + *
+     *web消息
+     * 
+ * + * .core.U2Web u2Web = 22; + */ + public com.akaxin.proto.core.CoreProto.U2WebOrBuilder getU2WebOrBuilder() { + return getU2Web(); + } + + public static final int GROUPWEB_FIELD_NUMBER = 23; + private com.akaxin.proto.core.CoreProto.GroupWeb groupWeb_; + /** + *
+     *群组web消息
+     * 
+ * + * .core.GroupWeb groupWeb = 23; + */ + public boolean hasGroupWeb() { + return groupWeb_ != null; + } + /** + *
+     *群组web消息
+     * 
+ * + * .core.GroupWeb groupWeb = 23; + */ + public com.akaxin.proto.core.CoreProto.GroupWeb getGroupWeb() { + return groupWeb_ == null ? com.akaxin.proto.core.CoreProto.GroupWeb.getDefaultInstance() : groupWeb_; + } + /** + *
+     *群组web消息
+     * 
+ * + * .core.GroupWeb groupWeb = 23; + */ + public com.akaxin.proto.core.CoreProto.GroupWebOrBuilder getGroupWebOrBuilder() { + return getGroupWeb(); + } + + public static final int U2WEBNOTICE_FIELD_NUMBER = 24; + private com.akaxin.proto.core.CoreProto.U2WebNotice u2WebNotice_; + /** + *
+     *web通知消息
+     * 
+ * + * .core.U2WebNotice u2WebNotice = 24; + */ + public boolean hasU2WebNotice() { + return u2WebNotice_ != null; + } + /** + *
+     *web通知消息
+     * 
+ * + * .core.U2WebNotice u2WebNotice = 24; + */ + public com.akaxin.proto.core.CoreProto.U2WebNotice getU2WebNotice() { + return u2WebNotice_ == null ? com.akaxin.proto.core.CoreProto.U2WebNotice.getDefaultInstance() : u2WebNotice_; + } + /** + *
+     *web通知消息
+     * 
+ * + * .core.U2WebNotice u2WebNotice = 24; + */ + public com.akaxin.proto.core.CoreProto.U2WebNoticeOrBuilder getU2WebNoticeOrBuilder() { + return getU2WebNotice(); + } + + public static final int GROUPWEBNOTICE_FIELD_NUMBER = 25; + private com.akaxin.proto.core.CoreProto.GroupWebNotice groupWebNotice_; + /** + *
+     *群组web通知消息
+     * 
+ * + * .core.GroupWebNotice groupWebNotice = 25; + */ + public boolean hasGroupWebNotice() { + return groupWebNotice_ != null; + } + /** + *
+     *群组web通知消息
+     * 
+ * + * .core.GroupWebNotice groupWebNotice = 25; + */ + public com.akaxin.proto.core.CoreProto.GroupWebNotice getGroupWebNotice() { + return groupWebNotice_ == null ? com.akaxin.proto.core.CoreProto.GroupWebNotice.getDefaultInstance() : groupWebNotice_; + } + /** + *
+     *群组web通知消息
+     * 
+ * + * .core.GroupWebNotice groupWebNotice = 25; + */ + public com.akaxin.proto.core.CoreProto.GroupWebNoticeOrBuilder getGroupWebNoticeOrBuilder() { + return getGroupWebNotice(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.akaxin.proto.core.CoreProto.MsgType.NOTICE.getNumber()) { + output.writeEnum(1, type_); + } + if (text_ != null) { + output.writeMessage(2, getText()); + } + if (secretText_ != null) { + output.writeMessage(3, getSecretText()); + } + if (groupText_ != null) { + output.writeMessage(4, getGroupText()); + } + if (groupSecretText_ != null) { + output.writeMessage(5, getGroupSecretText()); + } + if (image_ != null) { + output.writeMessage(6, getImage()); + } + if (secretImage_ != null) { + output.writeMessage(7, getSecretImage()); + } + if (groupImage_ != null) { + output.writeMessage(8, getGroupImage()); + } + if (groupSecretImage_ != null) { + output.writeMessage(9, getGroupSecretImage()); + } + if (voice_ != null) { + output.writeMessage(10, getVoice()); + } + if (secretVoice_ != null) { + output.writeMessage(11, getSecretVoice()); + } + if (groupVoice_ != null) { + output.writeMessage(12, getGroupVoice()); + } + if (groupSecretVoice_ != null) { + output.writeMessage(13, getGroupSecretVoice()); + } + if (u2Map_ != null) { + output.writeMessage(14, getU2Map()); + } + if (u2SecretMap_ != null) { + output.writeMessage(15, getU2SecretMap()); + } + if (groupMap_ != null) { + output.writeMessage(16, getGroupMap()); + } + if (groupSecretMap_ != null) { + output.writeMessage(17, getGroupSecretMap()); + } + if (u2MsgNotice_ != null) { + output.writeMessage(18, getU2MsgNotice()); + } + if (groupMsgNotice_ != null) { + output.writeMessage(19, getGroupMsgNotice()); + } + if (u2Recall_ != null) { + output.writeMessage(20, getU2Recall()); + } + if (groupRecall_ != null) { + output.writeMessage(21, getGroupRecall()); + } + if (u2Web_ != null) { + output.writeMessage(22, getU2Web()); + } + if (groupWeb_ != null) { + output.writeMessage(23, getGroupWeb()); + } + if (u2WebNotice_ != null) { + output.writeMessage(24, getU2WebNotice()); + } + if (groupWebNotice_ != null) { + output.writeMessage(25, getGroupWebNotice()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.akaxin.proto.core.CoreProto.MsgType.NOTICE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (text_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getText()); + } + if (secretText_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getSecretText()); + } + if (groupText_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getGroupText()); + } + if (groupSecretText_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getGroupSecretText()); + } + if (image_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getImage()); + } + if (secretImage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getSecretImage()); + } + if (groupImage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getGroupImage()); + } + if (groupSecretImage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getGroupSecretImage()); + } + if (voice_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getVoice()); + } + if (secretVoice_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getSecretVoice()); + } + if (groupVoice_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getGroupVoice()); + } + if (groupSecretVoice_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, getGroupSecretVoice()); + } + if (u2Map_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getU2Map()); + } + if (u2SecretMap_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getU2SecretMap()); + } + if (groupMap_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, getGroupMap()); + } + if (groupSecretMap_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getGroupSecretMap()); + } + if (u2MsgNotice_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, getU2MsgNotice()); + } + if (groupMsgNotice_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(19, getGroupMsgNotice()); + } + if (u2Recall_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, getU2Recall()); + } + if (groupRecall_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getGroupRecall()); + } + if (u2Web_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(22, getU2Web()); + } + if (groupWeb_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(23, getGroupWeb()); + } + if (u2WebNotice_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(24, getU2WebNotice()); + } + if (groupWebNotice_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(25, getGroupWebNotice()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest other = (com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest) obj; + + boolean result = true; + result = result && type_ == other.type_; + result = result && (hasText() == other.hasText()); + if (hasText()) { + result = result && getText() + .equals(other.getText()); + } + result = result && (hasSecretText() == other.hasSecretText()); + if (hasSecretText()) { + result = result && getSecretText() + .equals(other.getSecretText()); + } + result = result && (hasGroupText() == other.hasGroupText()); + if (hasGroupText()) { + result = result && getGroupText() + .equals(other.getGroupText()); + } + result = result && (hasGroupSecretText() == other.hasGroupSecretText()); + if (hasGroupSecretText()) { + result = result && getGroupSecretText() + .equals(other.getGroupSecretText()); + } + result = result && (hasImage() == other.hasImage()); + if (hasImage()) { + result = result && getImage() + .equals(other.getImage()); + } + result = result && (hasSecretImage() == other.hasSecretImage()); + if (hasSecretImage()) { + result = result && getSecretImage() + .equals(other.getSecretImage()); + } + result = result && (hasGroupImage() == other.hasGroupImage()); + if (hasGroupImage()) { + result = result && getGroupImage() + .equals(other.getGroupImage()); + } + result = result && (hasGroupSecretImage() == other.hasGroupSecretImage()); + if (hasGroupSecretImage()) { + result = result && getGroupSecretImage() + .equals(other.getGroupSecretImage()); + } + result = result && (hasVoice() == other.hasVoice()); + if (hasVoice()) { + result = result && getVoice() + .equals(other.getVoice()); + } + result = result && (hasSecretVoice() == other.hasSecretVoice()); + if (hasSecretVoice()) { + result = result && getSecretVoice() + .equals(other.getSecretVoice()); + } + result = result && (hasGroupVoice() == other.hasGroupVoice()); + if (hasGroupVoice()) { + result = result && getGroupVoice() + .equals(other.getGroupVoice()); + } + result = result && (hasGroupSecretVoice() == other.hasGroupSecretVoice()); + if (hasGroupSecretVoice()) { + result = result && getGroupSecretVoice() + .equals(other.getGroupSecretVoice()); + } + result = result && (hasU2Map() == other.hasU2Map()); + if (hasU2Map()) { + result = result && getU2Map() + .equals(other.getU2Map()); + } + result = result && (hasU2SecretMap() == other.hasU2SecretMap()); + if (hasU2SecretMap()) { + result = result && getU2SecretMap() + .equals(other.getU2SecretMap()); + } + result = result && (hasGroupMap() == other.hasGroupMap()); + if (hasGroupMap()) { + result = result && getGroupMap() + .equals(other.getGroupMap()); + } + result = result && (hasGroupSecretMap() == other.hasGroupSecretMap()); + if (hasGroupSecretMap()) { + result = result && getGroupSecretMap() + .equals(other.getGroupSecretMap()); + } + result = result && (hasU2MsgNotice() == other.hasU2MsgNotice()); + if (hasU2MsgNotice()) { + result = result && getU2MsgNotice() + .equals(other.getU2MsgNotice()); + } + result = result && (hasGroupMsgNotice() == other.hasGroupMsgNotice()); + if (hasGroupMsgNotice()) { + result = result && getGroupMsgNotice() + .equals(other.getGroupMsgNotice()); + } + result = result && (hasU2Recall() == other.hasU2Recall()); + if (hasU2Recall()) { + result = result && getU2Recall() + .equals(other.getU2Recall()); + } + result = result && (hasGroupRecall() == other.hasGroupRecall()); + if (hasGroupRecall()) { + result = result && getGroupRecall() + .equals(other.getGroupRecall()); + } + result = result && (hasU2Web() == other.hasU2Web()); + if (hasU2Web()) { + result = result && getU2Web() + .equals(other.getU2Web()); + } + result = result && (hasGroupWeb() == other.hasGroupWeb()); + if (hasGroupWeb()) { + result = result && getGroupWeb() + .equals(other.getGroupWeb()); + } + result = result && (hasU2WebNotice() == other.hasU2WebNotice()); + if (hasU2WebNotice()) { + result = result && getU2WebNotice() + .equals(other.getU2WebNotice()); + } + result = result && (hasGroupWebNotice() == other.hasGroupWebNotice()); + if (hasGroupWebNotice()) { + result = result && getGroupWebNotice() + .equals(other.getGroupWebNotice()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasText()) { + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + } + if (hasSecretText()) { + hash = (37 * hash) + SECRETTEXT_FIELD_NUMBER; + hash = (53 * hash) + getSecretText().hashCode(); + } + if (hasGroupText()) { + hash = (37 * hash) + GROUPTEXT_FIELD_NUMBER; + hash = (53 * hash) + getGroupText().hashCode(); + } + if (hasGroupSecretText()) { + hash = (37 * hash) + GROUPSECRETTEXT_FIELD_NUMBER; + hash = (53 * hash) + getGroupSecretText().hashCode(); + } + if (hasImage()) { + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + } + if (hasSecretImage()) { + hash = (37 * hash) + SECRETIMAGE_FIELD_NUMBER; + hash = (53 * hash) + getSecretImage().hashCode(); + } + if (hasGroupImage()) { + hash = (37 * hash) + GROUPIMAGE_FIELD_NUMBER; + hash = (53 * hash) + getGroupImage().hashCode(); + } + if (hasGroupSecretImage()) { + hash = (37 * hash) + GROUPSECRETIMAGE_FIELD_NUMBER; + hash = (53 * hash) + getGroupSecretImage().hashCode(); + } + if (hasVoice()) { + hash = (37 * hash) + VOICE_FIELD_NUMBER; + hash = (53 * hash) + getVoice().hashCode(); + } + if (hasSecretVoice()) { + hash = (37 * hash) + SECRETVOICE_FIELD_NUMBER; + hash = (53 * hash) + getSecretVoice().hashCode(); + } + if (hasGroupVoice()) { + hash = (37 * hash) + GROUPVOICE_FIELD_NUMBER; + hash = (53 * hash) + getGroupVoice().hashCode(); + } + if (hasGroupSecretVoice()) { + hash = (37 * hash) + GROUPSECRETVOICE_FIELD_NUMBER; + hash = (53 * hash) + getGroupSecretVoice().hashCode(); + } + if (hasU2Map()) { + hash = (37 * hash) + U2MAP_FIELD_NUMBER; + hash = (53 * hash) + getU2Map().hashCode(); + } + if (hasU2SecretMap()) { + hash = (37 * hash) + U2SECRETMAP_FIELD_NUMBER; + hash = (53 * hash) + getU2SecretMap().hashCode(); + } + if (hasGroupMap()) { + hash = (37 * hash) + GROUPMAP_FIELD_NUMBER; + hash = (53 * hash) + getGroupMap().hashCode(); + } + if (hasGroupSecretMap()) { + hash = (37 * hash) + GROUPSECRETMAP_FIELD_NUMBER; + hash = (53 * hash) + getGroupSecretMap().hashCode(); + } + if (hasU2MsgNotice()) { + hash = (37 * hash) + U2MSGNOTICE_FIELD_NUMBER; + hash = (53 * hash) + getU2MsgNotice().hashCode(); + } + if (hasGroupMsgNotice()) { + hash = (37 * hash) + GROUPMSGNOTICE_FIELD_NUMBER; + hash = (53 * hash) + getGroupMsgNotice().hashCode(); + } + if (hasU2Recall()) { + hash = (37 * hash) + U2RECALL_FIELD_NUMBER; + hash = (53 * hash) + getU2Recall().hashCode(); + } + if (hasGroupRecall()) { + hash = (37 * hash) + GROUPRECALL_FIELD_NUMBER; + hash = (53 * hash) + getGroupRecall().hashCode(); + } + if (hasU2Web()) { + hash = (37 * hash) + U2WEB_FIELD_NUMBER; + hash = (53 * hash) + getU2Web().hashCode(); + } + if (hasGroupWeb()) { + hash = (37 * hash) + GROUPWEB_FIELD_NUMBER; + hash = (53 * hash) + getGroupWeb().hashCode(); + } + if (hasU2WebNotice()) { + hash = (37 * hash) + U2WEBNOTICE_FIELD_NUMBER; + hash = (53 * hash) + getU2WebNotice().hashCode(); + } + if (hasGroupWebNotice()) { + hash = (37 * hash) + GROUPWEBNOTICE_FIELD_NUMBER; + hash = (53 * hash) + getGroupWebNotice().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ImCtsMessageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ImCtsMessageRequest) + com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImCtsMessageProto.internal_static_site_ImCtsMessageRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImCtsMessageProto.internal_static_site_ImCtsMessageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest.class, com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + type_ = 0; + + if (textBuilder_ == null) { + text_ = null; + } else { + text_ = null; + textBuilder_ = null; + } + if (secretTextBuilder_ == null) { + secretText_ = null; + } else { + secretText_ = null; + secretTextBuilder_ = null; + } + if (groupTextBuilder_ == null) { + groupText_ = null; + } else { + groupText_ = null; + groupTextBuilder_ = null; + } + if (groupSecretTextBuilder_ == null) { + groupSecretText_ = null; + } else { + groupSecretText_ = null; + groupSecretTextBuilder_ = null; + } + if (imageBuilder_ == null) { + image_ = null; + } else { + image_ = null; + imageBuilder_ = null; + } + if (secretImageBuilder_ == null) { + secretImage_ = null; + } else { + secretImage_ = null; + secretImageBuilder_ = null; + } + if (groupImageBuilder_ == null) { + groupImage_ = null; + } else { + groupImage_ = null; + groupImageBuilder_ = null; + } + if (groupSecretImageBuilder_ == null) { + groupSecretImage_ = null; + } else { + groupSecretImage_ = null; + groupSecretImageBuilder_ = null; + } + if (voiceBuilder_ == null) { + voice_ = null; + } else { + voice_ = null; + voiceBuilder_ = null; + } + if (secretVoiceBuilder_ == null) { + secretVoice_ = null; + } else { + secretVoice_ = null; + secretVoiceBuilder_ = null; + } + if (groupVoiceBuilder_ == null) { + groupVoice_ = null; + } else { + groupVoice_ = null; + groupVoiceBuilder_ = null; + } + if (groupSecretVoiceBuilder_ == null) { + groupSecretVoice_ = null; + } else { + groupSecretVoice_ = null; + groupSecretVoiceBuilder_ = null; + } + if (u2MapBuilder_ == null) { + u2Map_ = null; + } else { + u2Map_ = null; + u2MapBuilder_ = null; + } + if (u2SecretMapBuilder_ == null) { + u2SecretMap_ = null; + } else { + u2SecretMap_ = null; + u2SecretMapBuilder_ = null; + } + if (groupMapBuilder_ == null) { + groupMap_ = null; + } else { + groupMap_ = null; + groupMapBuilder_ = null; + } + if (groupSecretMapBuilder_ == null) { + groupSecretMap_ = null; + } else { + groupSecretMap_ = null; + groupSecretMapBuilder_ = null; + } + if (u2MsgNoticeBuilder_ == null) { + u2MsgNotice_ = null; + } else { + u2MsgNotice_ = null; + u2MsgNoticeBuilder_ = null; + } + if (groupMsgNoticeBuilder_ == null) { + groupMsgNotice_ = null; + } else { + groupMsgNotice_ = null; + groupMsgNoticeBuilder_ = null; + } + if (u2RecallBuilder_ == null) { + u2Recall_ = null; + } else { + u2Recall_ = null; + u2RecallBuilder_ = null; + } + if (groupRecallBuilder_ == null) { + groupRecall_ = null; + } else { + groupRecall_ = null; + groupRecallBuilder_ = null; + } + if (u2WebBuilder_ == null) { + u2Web_ = null; + } else { + u2Web_ = null; + u2WebBuilder_ = null; + } + if (groupWebBuilder_ == null) { + groupWeb_ = null; + } else { + groupWeb_ = null; + groupWebBuilder_ = null; + } + if (u2WebNoticeBuilder_ == null) { + u2WebNotice_ = null; + } else { + u2WebNotice_ = null; + u2WebNoticeBuilder_ = null; + } + if (groupWebNoticeBuilder_ == null) { + groupWebNotice_ = null; + } else { + groupWebNotice_ = null; + groupWebNoticeBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ImCtsMessageProto.internal_static_site_ImCtsMessageRequest_descriptor; + } + + public com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest build() { + com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest buildPartial() { + com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest result = new com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest(this); + result.type_ = type_; + if (textBuilder_ == null) { + result.text_ = text_; + } else { + result.text_ = textBuilder_.build(); + } + if (secretTextBuilder_ == null) { + result.secretText_ = secretText_; + } else { + result.secretText_ = secretTextBuilder_.build(); + } + if (groupTextBuilder_ == null) { + result.groupText_ = groupText_; + } else { + result.groupText_ = groupTextBuilder_.build(); + } + if (groupSecretTextBuilder_ == null) { + result.groupSecretText_ = groupSecretText_; + } else { + result.groupSecretText_ = groupSecretTextBuilder_.build(); + } + if (imageBuilder_ == null) { + result.image_ = image_; + } else { + result.image_ = imageBuilder_.build(); + } + if (secretImageBuilder_ == null) { + result.secretImage_ = secretImage_; + } else { + result.secretImage_ = secretImageBuilder_.build(); + } + if (groupImageBuilder_ == null) { + result.groupImage_ = groupImage_; + } else { + result.groupImage_ = groupImageBuilder_.build(); + } + if (groupSecretImageBuilder_ == null) { + result.groupSecretImage_ = groupSecretImage_; + } else { + result.groupSecretImage_ = groupSecretImageBuilder_.build(); + } + if (voiceBuilder_ == null) { + result.voice_ = voice_; + } else { + result.voice_ = voiceBuilder_.build(); + } + if (secretVoiceBuilder_ == null) { + result.secretVoice_ = secretVoice_; + } else { + result.secretVoice_ = secretVoiceBuilder_.build(); + } + if (groupVoiceBuilder_ == null) { + result.groupVoice_ = groupVoice_; + } else { + result.groupVoice_ = groupVoiceBuilder_.build(); + } + if (groupSecretVoiceBuilder_ == null) { + result.groupSecretVoice_ = groupSecretVoice_; + } else { + result.groupSecretVoice_ = groupSecretVoiceBuilder_.build(); + } + if (u2MapBuilder_ == null) { + result.u2Map_ = u2Map_; + } else { + result.u2Map_ = u2MapBuilder_.build(); + } + if (u2SecretMapBuilder_ == null) { + result.u2SecretMap_ = u2SecretMap_; + } else { + result.u2SecretMap_ = u2SecretMapBuilder_.build(); + } + if (groupMapBuilder_ == null) { + result.groupMap_ = groupMap_; + } else { + result.groupMap_ = groupMapBuilder_.build(); + } + if (groupSecretMapBuilder_ == null) { + result.groupSecretMap_ = groupSecretMap_; + } else { + result.groupSecretMap_ = groupSecretMapBuilder_.build(); + } + if (u2MsgNoticeBuilder_ == null) { + result.u2MsgNotice_ = u2MsgNotice_; + } else { + result.u2MsgNotice_ = u2MsgNoticeBuilder_.build(); + } + if (groupMsgNoticeBuilder_ == null) { + result.groupMsgNotice_ = groupMsgNotice_; + } else { + result.groupMsgNotice_ = groupMsgNoticeBuilder_.build(); + } + if (u2RecallBuilder_ == null) { + result.u2Recall_ = u2Recall_; + } else { + result.u2Recall_ = u2RecallBuilder_.build(); + } + if (groupRecallBuilder_ == null) { + result.groupRecall_ = groupRecall_; + } else { + result.groupRecall_ = groupRecallBuilder_.build(); + } + if (u2WebBuilder_ == null) { + result.u2Web_ = u2Web_; + } else { + result.u2Web_ = u2WebBuilder_.build(); + } + if (groupWebBuilder_ == null) { + result.groupWeb_ = groupWeb_; + } else { + result.groupWeb_ = groupWebBuilder_.build(); + } + if (u2WebNoticeBuilder_ == null) { + result.u2WebNotice_ = u2WebNotice_; + } else { + result.u2WebNotice_ = u2WebNoticeBuilder_.build(); + } + if (groupWebNoticeBuilder_ == null) { + result.groupWebNotice_ = groupWebNotice_; + } else { + result.groupWebNotice_ = groupWebNoticeBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest) { + return mergeFrom((com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest other) { + if (other == com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasText()) { + mergeText(other.getText()); + } + if (other.hasSecretText()) { + mergeSecretText(other.getSecretText()); + } + if (other.hasGroupText()) { + mergeGroupText(other.getGroupText()); + } + if (other.hasGroupSecretText()) { + mergeGroupSecretText(other.getGroupSecretText()); + } + if (other.hasImage()) { + mergeImage(other.getImage()); + } + if (other.hasSecretImage()) { + mergeSecretImage(other.getSecretImage()); + } + if (other.hasGroupImage()) { + mergeGroupImage(other.getGroupImage()); + } + if (other.hasGroupSecretImage()) { + mergeGroupSecretImage(other.getGroupSecretImage()); + } + if (other.hasVoice()) { + mergeVoice(other.getVoice()); + } + if (other.hasSecretVoice()) { + mergeSecretVoice(other.getSecretVoice()); + } + if (other.hasGroupVoice()) { + mergeGroupVoice(other.getGroupVoice()); + } + if (other.hasGroupSecretVoice()) { + mergeGroupSecretVoice(other.getGroupSecretVoice()); + } + if (other.hasU2Map()) { + mergeU2Map(other.getU2Map()); + } + if (other.hasU2SecretMap()) { + mergeU2SecretMap(other.getU2SecretMap()); + } + if (other.hasGroupMap()) { + mergeGroupMap(other.getGroupMap()); + } + if (other.hasGroupSecretMap()) { + mergeGroupSecretMap(other.getGroupSecretMap()); + } + if (other.hasU2MsgNotice()) { + mergeU2MsgNotice(other.getU2MsgNotice()); + } + if (other.hasGroupMsgNotice()) { + mergeGroupMsgNotice(other.getGroupMsgNotice()); + } + if (other.hasU2Recall()) { + mergeU2Recall(other.getU2Recall()); + } + if (other.hasGroupRecall()) { + mergeGroupRecall(other.getGroupRecall()); + } + if (other.hasU2Web()) { + mergeU2Web(other.getU2Web()); + } + if (other.hasGroupWeb()) { + mergeGroupWeb(other.getGroupWeb()); + } + if (other.hasU2WebNotice()) { + mergeU2WebNotice(other.getU2WebNotice()); + } + if (other.hasGroupWebNotice()) { + mergeGroupWebNotice(other.getGroupWebNotice()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + *
+       *消息类型
+       * 
+ * + * .core.MsgType type = 1; + */ + public int getTypeValue() { + return type_; + } + /** + *
+       *消息类型
+       * 
+ * + * .core.MsgType type = 1; + */ + public Builder setTypeValue(int value) { + type_ = value; + onChanged(); + return this; + } + /** + *
+       *消息类型
+       * 
+ * + * .core.MsgType type = 1; + */ + public com.akaxin.proto.core.CoreProto.MsgType getType() { + com.akaxin.proto.core.CoreProto.MsgType result = com.akaxin.proto.core.CoreProto.MsgType.valueOf(type_); + return result == null ? com.akaxin.proto.core.CoreProto.MsgType.UNRECOGNIZED : result; + } + /** + *
+       *消息类型
+       * 
+ * + * .core.MsgType type = 1; + */ + public Builder setType(com.akaxin.proto.core.CoreProto.MsgType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       *消息类型
+       * 
+ * + * .core.MsgType type = 1; + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private com.akaxin.proto.core.CoreProto.MsgText text_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgText, com.akaxin.proto.core.CoreProto.MsgText.Builder, com.akaxin.proto.core.CoreProto.MsgTextOrBuilder> textBuilder_; + /** + *
+       *二人文本消息
+       * 
+ * + * .core.MsgText text = 2; + */ + public boolean hasText() { + return textBuilder_ != null || text_ != null; + } + /** + *
+       *二人文本消息
+       * 
+ * + * .core.MsgText text = 2; + */ + public com.akaxin.proto.core.CoreProto.MsgText getText() { + if (textBuilder_ == null) { + return text_ == null ? com.akaxin.proto.core.CoreProto.MsgText.getDefaultInstance() : text_; + } else { + return textBuilder_.getMessage(); + } + } + /** + *
+       *二人文本消息
+       * 
+ * + * .core.MsgText text = 2; + */ + public Builder setText(com.akaxin.proto.core.CoreProto.MsgText value) { + if (textBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + onChanged(); + } else { + textBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *二人文本消息
+       * 
+ * + * .core.MsgText text = 2; + */ + public Builder setText( + com.akaxin.proto.core.CoreProto.MsgText.Builder builderForValue) { + if (textBuilder_ == null) { + text_ = builderForValue.build(); + onChanged(); + } else { + textBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *二人文本消息
+       * 
+ * + * .core.MsgText text = 2; + */ + public Builder mergeText(com.akaxin.proto.core.CoreProto.MsgText value) { + if (textBuilder_ == null) { + if (text_ != null) { + text_ = + com.akaxin.proto.core.CoreProto.MsgText.newBuilder(text_).mergeFrom(value).buildPartial(); + } else { + text_ = value; + } + onChanged(); + } else { + textBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *二人文本消息
+       * 
+ * + * .core.MsgText text = 2; + */ + public Builder clearText() { + if (textBuilder_ == null) { + text_ = null; + onChanged(); + } else { + text_ = null; + textBuilder_ = null; + } + + return this; + } + /** + *
+       *二人文本消息
+       * 
+ * + * .core.MsgText text = 2; + */ + public com.akaxin.proto.core.CoreProto.MsgText.Builder getTextBuilder() { + + onChanged(); + return getTextFieldBuilder().getBuilder(); + } + /** + *
+       *二人文本消息
+       * 
+ * + * .core.MsgText text = 2; + */ + public com.akaxin.proto.core.CoreProto.MsgTextOrBuilder getTextOrBuilder() { + if (textBuilder_ != null) { + return textBuilder_.getMessageOrBuilder(); + } else { + return text_ == null ? + com.akaxin.proto.core.CoreProto.MsgText.getDefaultInstance() : text_; + } + } + /** + *
+       *二人文本消息
+       * 
+ * + * .core.MsgText text = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgText, com.akaxin.proto.core.CoreProto.MsgText.Builder, com.akaxin.proto.core.CoreProto.MsgTextOrBuilder> + getTextFieldBuilder() { + if (textBuilder_ == null) { + textBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgText, com.akaxin.proto.core.CoreProto.MsgText.Builder, com.akaxin.proto.core.CoreProto.MsgTextOrBuilder>( + getText(), + getParentForChildren(), + isClean()); + text_ = null; + } + return textBuilder_; + } + + private com.akaxin.proto.core.CoreProto.MsgSecretText secretText_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgSecretText, com.akaxin.proto.core.CoreProto.MsgSecretText.Builder, com.akaxin.proto.core.CoreProto.MsgSecretTextOrBuilder> secretTextBuilder_; + /** + *
+       *二人加密文本消息
+       * 
+ * + * .core.MsgSecretText secretText = 3; + */ + public boolean hasSecretText() { + return secretTextBuilder_ != null || secretText_ != null; + } + /** + *
+       *二人加密文本消息
+       * 
+ * + * .core.MsgSecretText secretText = 3; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretText getSecretText() { + if (secretTextBuilder_ == null) { + return secretText_ == null ? com.akaxin.proto.core.CoreProto.MsgSecretText.getDefaultInstance() : secretText_; + } else { + return secretTextBuilder_.getMessage(); + } + } + /** + *
+       *二人加密文本消息
+       * 
+ * + * .core.MsgSecretText secretText = 3; + */ + public Builder setSecretText(com.akaxin.proto.core.CoreProto.MsgSecretText value) { + if (secretTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + secretText_ = value; + onChanged(); + } else { + secretTextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *二人加密文本消息
+       * 
+ * + * .core.MsgSecretText secretText = 3; + */ + public Builder setSecretText( + com.akaxin.proto.core.CoreProto.MsgSecretText.Builder builderForValue) { + if (secretTextBuilder_ == null) { + secretText_ = builderForValue.build(); + onChanged(); + } else { + secretTextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *二人加密文本消息
+       * 
+ * + * .core.MsgSecretText secretText = 3; + */ + public Builder mergeSecretText(com.akaxin.proto.core.CoreProto.MsgSecretText value) { + if (secretTextBuilder_ == null) { + if (secretText_ != null) { + secretText_ = + com.akaxin.proto.core.CoreProto.MsgSecretText.newBuilder(secretText_).mergeFrom(value).buildPartial(); + } else { + secretText_ = value; + } + onChanged(); + } else { + secretTextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *二人加密文本消息
+       * 
+ * + * .core.MsgSecretText secretText = 3; + */ + public Builder clearSecretText() { + if (secretTextBuilder_ == null) { + secretText_ = null; + onChanged(); + } else { + secretText_ = null; + secretTextBuilder_ = null; + } + + return this; + } + /** + *
+       *二人加密文本消息
+       * 
+ * + * .core.MsgSecretText secretText = 3; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretText.Builder getSecretTextBuilder() { + + onChanged(); + return getSecretTextFieldBuilder().getBuilder(); + } + /** + *
+       *二人加密文本消息
+       * 
+ * + * .core.MsgSecretText secretText = 3; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretTextOrBuilder getSecretTextOrBuilder() { + if (secretTextBuilder_ != null) { + return secretTextBuilder_.getMessageOrBuilder(); + } else { + return secretText_ == null ? + com.akaxin.proto.core.CoreProto.MsgSecretText.getDefaultInstance() : secretText_; + } + } + /** + *
+       *二人加密文本消息
+       * 
+ * + * .core.MsgSecretText secretText = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgSecretText, com.akaxin.proto.core.CoreProto.MsgSecretText.Builder, com.akaxin.proto.core.CoreProto.MsgSecretTextOrBuilder> + getSecretTextFieldBuilder() { + if (secretTextBuilder_ == null) { + secretTextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgSecretText, com.akaxin.proto.core.CoreProto.MsgSecretText.Builder, com.akaxin.proto.core.CoreProto.MsgSecretTextOrBuilder>( + getSecretText(), + getParentForChildren(), + isClean()); + secretText_ = null; + } + return secretTextBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupText groupText_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupText, com.akaxin.proto.core.CoreProto.GroupText.Builder, com.akaxin.proto.core.CoreProto.GroupTextOrBuilder> groupTextBuilder_; + /** + *
+       *群文本消息
+       * 
+ * + * .core.GroupText groupText = 4; + */ + public boolean hasGroupText() { + return groupTextBuilder_ != null || groupText_ != null; + } + /** + *
+       *群文本消息
+       * 
+ * + * .core.GroupText groupText = 4; + */ + public com.akaxin.proto.core.CoreProto.GroupText getGroupText() { + if (groupTextBuilder_ == null) { + return groupText_ == null ? com.akaxin.proto.core.CoreProto.GroupText.getDefaultInstance() : groupText_; + } else { + return groupTextBuilder_.getMessage(); + } + } + /** + *
+       *群文本消息
+       * 
+ * + * .core.GroupText groupText = 4; + */ + public Builder setGroupText(com.akaxin.proto.core.CoreProto.GroupText value) { + if (groupTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupText_ = value; + onChanged(); + } else { + groupTextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群文本消息
+       * 
+ * + * .core.GroupText groupText = 4; + */ + public Builder setGroupText( + com.akaxin.proto.core.CoreProto.GroupText.Builder builderForValue) { + if (groupTextBuilder_ == null) { + groupText_ = builderForValue.build(); + onChanged(); + } else { + groupTextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群文本消息
+       * 
+ * + * .core.GroupText groupText = 4; + */ + public Builder mergeGroupText(com.akaxin.proto.core.CoreProto.GroupText value) { + if (groupTextBuilder_ == null) { + if (groupText_ != null) { + groupText_ = + com.akaxin.proto.core.CoreProto.GroupText.newBuilder(groupText_).mergeFrom(value).buildPartial(); + } else { + groupText_ = value; + } + onChanged(); + } else { + groupTextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群文本消息
+       * 
+ * + * .core.GroupText groupText = 4; + */ + public Builder clearGroupText() { + if (groupTextBuilder_ == null) { + groupText_ = null; + onChanged(); + } else { + groupText_ = null; + groupTextBuilder_ = null; + } + + return this; + } + /** + *
+       *群文本消息
+       * 
+ * + * .core.GroupText groupText = 4; + */ + public com.akaxin.proto.core.CoreProto.GroupText.Builder getGroupTextBuilder() { + + onChanged(); + return getGroupTextFieldBuilder().getBuilder(); + } + /** + *
+       *群文本消息
+       * 
+ * + * .core.GroupText groupText = 4; + */ + public com.akaxin.proto.core.CoreProto.GroupTextOrBuilder getGroupTextOrBuilder() { + if (groupTextBuilder_ != null) { + return groupTextBuilder_.getMessageOrBuilder(); + } else { + return groupText_ == null ? + com.akaxin.proto.core.CoreProto.GroupText.getDefaultInstance() : groupText_; + } + } + /** + *
+       *群文本消息
+       * 
+ * + * .core.GroupText groupText = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupText, com.akaxin.proto.core.CoreProto.GroupText.Builder, com.akaxin.proto.core.CoreProto.GroupTextOrBuilder> + getGroupTextFieldBuilder() { + if (groupTextBuilder_ == null) { + groupTextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupText, com.akaxin.proto.core.CoreProto.GroupText.Builder, com.akaxin.proto.core.CoreProto.GroupTextOrBuilder>( + getGroupText(), + getParentForChildren(), + isClean()); + groupText_ = null; + } + return groupTextBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupSecretText groupSecretText_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretText, com.akaxin.proto.core.CoreProto.GroupSecretText.Builder, com.akaxin.proto.core.CoreProto.GroupSecretTextOrBuilder> groupSecretTextBuilder_; + /** + *
+       *群加密消息
+       * 
+ * + * .core.GroupSecretText groupSecretText = 5; + */ + public boolean hasGroupSecretText() { + return groupSecretTextBuilder_ != null || groupSecretText_ != null; + } + /** + *
+       *群加密消息
+       * 
+ * + * .core.GroupSecretText groupSecretText = 5; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretText getGroupSecretText() { + if (groupSecretTextBuilder_ == null) { + return groupSecretText_ == null ? com.akaxin.proto.core.CoreProto.GroupSecretText.getDefaultInstance() : groupSecretText_; + } else { + return groupSecretTextBuilder_.getMessage(); + } + } + /** + *
+       *群加密消息
+       * 
+ * + * .core.GroupSecretText groupSecretText = 5; + */ + public Builder setGroupSecretText(com.akaxin.proto.core.CoreProto.GroupSecretText value) { + if (groupSecretTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupSecretText_ = value; + onChanged(); + } else { + groupSecretTextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群加密消息
+       * 
+ * + * .core.GroupSecretText groupSecretText = 5; + */ + public Builder setGroupSecretText( + com.akaxin.proto.core.CoreProto.GroupSecretText.Builder builderForValue) { + if (groupSecretTextBuilder_ == null) { + groupSecretText_ = builderForValue.build(); + onChanged(); + } else { + groupSecretTextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群加密消息
+       * 
+ * + * .core.GroupSecretText groupSecretText = 5; + */ + public Builder mergeGroupSecretText(com.akaxin.proto.core.CoreProto.GroupSecretText value) { + if (groupSecretTextBuilder_ == null) { + if (groupSecretText_ != null) { + groupSecretText_ = + com.akaxin.proto.core.CoreProto.GroupSecretText.newBuilder(groupSecretText_).mergeFrom(value).buildPartial(); + } else { + groupSecretText_ = value; + } + onChanged(); + } else { + groupSecretTextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群加密消息
+       * 
+ * + * .core.GroupSecretText groupSecretText = 5; + */ + public Builder clearGroupSecretText() { + if (groupSecretTextBuilder_ == null) { + groupSecretText_ = null; + onChanged(); + } else { + groupSecretText_ = null; + groupSecretTextBuilder_ = null; + } + + return this; + } + /** + *
+       *群加密消息
+       * 
+ * + * .core.GroupSecretText groupSecretText = 5; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretText.Builder getGroupSecretTextBuilder() { + + onChanged(); + return getGroupSecretTextFieldBuilder().getBuilder(); + } + /** + *
+       *群加密消息
+       * 
+ * + * .core.GroupSecretText groupSecretText = 5; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretTextOrBuilder getGroupSecretTextOrBuilder() { + if (groupSecretTextBuilder_ != null) { + return groupSecretTextBuilder_.getMessageOrBuilder(); + } else { + return groupSecretText_ == null ? + com.akaxin.proto.core.CoreProto.GroupSecretText.getDefaultInstance() : groupSecretText_; + } + } + /** + *
+       *群加密消息
+       * 
+ * + * .core.GroupSecretText groupSecretText = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretText, com.akaxin.proto.core.CoreProto.GroupSecretText.Builder, com.akaxin.proto.core.CoreProto.GroupSecretTextOrBuilder> + getGroupSecretTextFieldBuilder() { + if (groupSecretTextBuilder_ == null) { + groupSecretTextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretText, com.akaxin.proto.core.CoreProto.GroupSecretText.Builder, com.akaxin.proto.core.CoreProto.GroupSecretTextOrBuilder>( + getGroupSecretText(), + getParentForChildren(), + isClean()); + groupSecretText_ = null; + } + return groupSecretTextBuilder_; + } + + private com.akaxin.proto.core.CoreProto.MsgImage image_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgImage, com.akaxin.proto.core.CoreProto.MsgImage.Builder, com.akaxin.proto.core.CoreProto.MsgImageOrBuilder> imageBuilder_; + /** + *
+       *二人图片消息
+       * 
+ * + * .core.MsgImage image = 6; + */ + public boolean hasImage() { + return imageBuilder_ != null || image_ != null; + } + /** + *
+       *二人图片消息
+       * 
+ * + * .core.MsgImage image = 6; + */ + public com.akaxin.proto.core.CoreProto.MsgImage getImage() { + if (imageBuilder_ == null) { + return image_ == null ? com.akaxin.proto.core.CoreProto.MsgImage.getDefaultInstance() : image_; + } else { + return imageBuilder_.getMessage(); + } + } + /** + *
+       *二人图片消息
+       * 
+ * + * .core.MsgImage image = 6; + */ + public Builder setImage(com.akaxin.proto.core.CoreProto.MsgImage value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + image_ = value; + onChanged(); + } else { + imageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *二人图片消息
+       * 
+ * + * .core.MsgImage image = 6; + */ + public Builder setImage( + com.akaxin.proto.core.CoreProto.MsgImage.Builder builderForValue) { + if (imageBuilder_ == null) { + image_ = builderForValue.build(); + onChanged(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *二人图片消息
+       * 
+ * + * .core.MsgImage image = 6; + */ + public Builder mergeImage(com.akaxin.proto.core.CoreProto.MsgImage value) { + if (imageBuilder_ == null) { + if (image_ != null) { + image_ = + com.akaxin.proto.core.CoreProto.MsgImage.newBuilder(image_).mergeFrom(value).buildPartial(); + } else { + image_ = value; + } + onChanged(); + } else { + imageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *二人图片消息
+       * 
+ * + * .core.MsgImage image = 6; + */ + public Builder clearImage() { + if (imageBuilder_ == null) { + image_ = null; + onChanged(); + } else { + image_ = null; + imageBuilder_ = null; + } + + return this; + } + /** + *
+       *二人图片消息
+       * 
+ * + * .core.MsgImage image = 6; + */ + public com.akaxin.proto.core.CoreProto.MsgImage.Builder getImageBuilder() { + + onChanged(); + return getImageFieldBuilder().getBuilder(); + } + /** + *
+       *二人图片消息
+       * 
+ * + * .core.MsgImage image = 6; + */ + public com.akaxin.proto.core.CoreProto.MsgImageOrBuilder getImageOrBuilder() { + if (imageBuilder_ != null) { + return imageBuilder_.getMessageOrBuilder(); + } else { + return image_ == null ? + com.akaxin.proto.core.CoreProto.MsgImage.getDefaultInstance() : image_; + } + } + /** + *
+       *二人图片消息
+       * 
+ * + * .core.MsgImage image = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgImage, com.akaxin.proto.core.CoreProto.MsgImage.Builder, com.akaxin.proto.core.CoreProto.MsgImageOrBuilder> + getImageFieldBuilder() { + if (imageBuilder_ == null) { + imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgImage, com.akaxin.proto.core.CoreProto.MsgImage.Builder, com.akaxin.proto.core.CoreProto.MsgImageOrBuilder>( + getImage(), + getParentForChildren(), + isClean()); + image_ = null; + } + return imageBuilder_; + } + + private com.akaxin.proto.core.CoreProto.MsgSecretImage secretImage_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgSecretImage, com.akaxin.proto.core.CoreProto.MsgSecretImage.Builder, com.akaxin.proto.core.CoreProto.MsgSecretImageOrBuilder> secretImageBuilder_; + /** + *
+       *二人加密图片消息
+       * 
+ * + * .core.MsgSecretImage secretImage = 7; + */ + public boolean hasSecretImage() { + return secretImageBuilder_ != null || secretImage_ != null; + } + /** + *
+       *二人加密图片消息
+       * 
+ * + * .core.MsgSecretImage secretImage = 7; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretImage getSecretImage() { + if (secretImageBuilder_ == null) { + return secretImage_ == null ? com.akaxin.proto.core.CoreProto.MsgSecretImage.getDefaultInstance() : secretImage_; + } else { + return secretImageBuilder_.getMessage(); + } + } + /** + *
+       *二人加密图片消息
+       * 
+ * + * .core.MsgSecretImage secretImage = 7; + */ + public Builder setSecretImage(com.akaxin.proto.core.CoreProto.MsgSecretImage value) { + if (secretImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + secretImage_ = value; + onChanged(); + } else { + secretImageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *二人加密图片消息
+       * 
+ * + * .core.MsgSecretImage secretImage = 7; + */ + public Builder setSecretImage( + com.akaxin.proto.core.CoreProto.MsgSecretImage.Builder builderForValue) { + if (secretImageBuilder_ == null) { + secretImage_ = builderForValue.build(); + onChanged(); + } else { + secretImageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *二人加密图片消息
+       * 
+ * + * .core.MsgSecretImage secretImage = 7; + */ + public Builder mergeSecretImage(com.akaxin.proto.core.CoreProto.MsgSecretImage value) { + if (secretImageBuilder_ == null) { + if (secretImage_ != null) { + secretImage_ = + com.akaxin.proto.core.CoreProto.MsgSecretImage.newBuilder(secretImage_).mergeFrom(value).buildPartial(); + } else { + secretImage_ = value; + } + onChanged(); + } else { + secretImageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *二人加密图片消息
+       * 
+ * + * .core.MsgSecretImage secretImage = 7; + */ + public Builder clearSecretImage() { + if (secretImageBuilder_ == null) { + secretImage_ = null; + onChanged(); + } else { + secretImage_ = null; + secretImageBuilder_ = null; + } + + return this; + } + /** + *
+       *二人加密图片消息
+       * 
+ * + * .core.MsgSecretImage secretImage = 7; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretImage.Builder getSecretImageBuilder() { + + onChanged(); + return getSecretImageFieldBuilder().getBuilder(); + } + /** + *
+       *二人加密图片消息
+       * 
+ * + * .core.MsgSecretImage secretImage = 7; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretImageOrBuilder getSecretImageOrBuilder() { + if (secretImageBuilder_ != null) { + return secretImageBuilder_.getMessageOrBuilder(); + } else { + return secretImage_ == null ? + com.akaxin.proto.core.CoreProto.MsgSecretImage.getDefaultInstance() : secretImage_; + } + } + /** + *
+       *二人加密图片消息
+       * 
+ * + * .core.MsgSecretImage secretImage = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgSecretImage, com.akaxin.proto.core.CoreProto.MsgSecretImage.Builder, com.akaxin.proto.core.CoreProto.MsgSecretImageOrBuilder> + getSecretImageFieldBuilder() { + if (secretImageBuilder_ == null) { + secretImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgSecretImage, com.akaxin.proto.core.CoreProto.MsgSecretImage.Builder, com.akaxin.proto.core.CoreProto.MsgSecretImageOrBuilder>( + getSecretImage(), + getParentForChildren(), + isClean()); + secretImage_ = null; + } + return secretImageBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupImage groupImage_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupImage, com.akaxin.proto.core.CoreProto.GroupImage.Builder, com.akaxin.proto.core.CoreProto.GroupImageOrBuilder> groupImageBuilder_; + /** + *
+       *群图片消息
+       * 
+ * + * .core.GroupImage groupImage = 8; + */ + public boolean hasGroupImage() { + return groupImageBuilder_ != null || groupImage_ != null; + } + /** + *
+       *群图片消息
+       * 
+ * + * .core.GroupImage groupImage = 8; + */ + public com.akaxin.proto.core.CoreProto.GroupImage getGroupImage() { + if (groupImageBuilder_ == null) { + return groupImage_ == null ? com.akaxin.proto.core.CoreProto.GroupImage.getDefaultInstance() : groupImage_; + } else { + return groupImageBuilder_.getMessage(); + } + } + /** + *
+       *群图片消息
+       * 
+ * + * .core.GroupImage groupImage = 8; + */ + public Builder setGroupImage(com.akaxin.proto.core.CoreProto.GroupImage value) { + if (groupImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupImage_ = value; + onChanged(); + } else { + groupImageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群图片消息
+       * 
+ * + * .core.GroupImage groupImage = 8; + */ + public Builder setGroupImage( + com.akaxin.proto.core.CoreProto.GroupImage.Builder builderForValue) { + if (groupImageBuilder_ == null) { + groupImage_ = builderForValue.build(); + onChanged(); + } else { + groupImageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群图片消息
+       * 
+ * + * .core.GroupImage groupImage = 8; + */ + public Builder mergeGroupImage(com.akaxin.proto.core.CoreProto.GroupImage value) { + if (groupImageBuilder_ == null) { + if (groupImage_ != null) { + groupImage_ = + com.akaxin.proto.core.CoreProto.GroupImage.newBuilder(groupImage_).mergeFrom(value).buildPartial(); + } else { + groupImage_ = value; + } + onChanged(); + } else { + groupImageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群图片消息
+       * 
+ * + * .core.GroupImage groupImage = 8; + */ + public Builder clearGroupImage() { + if (groupImageBuilder_ == null) { + groupImage_ = null; + onChanged(); + } else { + groupImage_ = null; + groupImageBuilder_ = null; + } + + return this; + } + /** + *
+       *群图片消息
+       * 
+ * + * .core.GroupImage groupImage = 8; + */ + public com.akaxin.proto.core.CoreProto.GroupImage.Builder getGroupImageBuilder() { + + onChanged(); + return getGroupImageFieldBuilder().getBuilder(); + } + /** + *
+       *群图片消息
+       * 
+ * + * .core.GroupImage groupImage = 8; + */ + public com.akaxin.proto.core.CoreProto.GroupImageOrBuilder getGroupImageOrBuilder() { + if (groupImageBuilder_ != null) { + return groupImageBuilder_.getMessageOrBuilder(); + } else { + return groupImage_ == null ? + com.akaxin.proto.core.CoreProto.GroupImage.getDefaultInstance() : groupImage_; + } + } + /** + *
+       *群图片消息
+       * 
+ * + * .core.GroupImage groupImage = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupImage, com.akaxin.proto.core.CoreProto.GroupImage.Builder, com.akaxin.proto.core.CoreProto.GroupImageOrBuilder> + getGroupImageFieldBuilder() { + if (groupImageBuilder_ == null) { + groupImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupImage, com.akaxin.proto.core.CoreProto.GroupImage.Builder, com.akaxin.proto.core.CoreProto.GroupImageOrBuilder>( + getGroupImage(), + getParentForChildren(), + isClean()); + groupImage_ = null; + } + return groupImageBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupSecretImage groupSecretImage_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretImage, com.akaxin.proto.core.CoreProto.GroupSecretImage.Builder, com.akaxin.proto.core.CoreProto.GroupSecretImageOrBuilder> groupSecretImageBuilder_; + /** + *
+       *群图片加密消息
+       * 
+ * + * .core.GroupSecretImage groupSecretImage = 9; + */ + public boolean hasGroupSecretImage() { + return groupSecretImageBuilder_ != null || groupSecretImage_ != null; + } + /** + *
+       *群图片加密消息
+       * 
+ * + * .core.GroupSecretImage groupSecretImage = 9; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretImage getGroupSecretImage() { + if (groupSecretImageBuilder_ == null) { + return groupSecretImage_ == null ? com.akaxin.proto.core.CoreProto.GroupSecretImage.getDefaultInstance() : groupSecretImage_; + } else { + return groupSecretImageBuilder_.getMessage(); + } + } + /** + *
+       *群图片加密消息
+       * 
+ * + * .core.GroupSecretImage groupSecretImage = 9; + */ + public Builder setGroupSecretImage(com.akaxin.proto.core.CoreProto.GroupSecretImage value) { + if (groupSecretImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupSecretImage_ = value; + onChanged(); + } else { + groupSecretImageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群图片加密消息
+       * 
+ * + * .core.GroupSecretImage groupSecretImage = 9; + */ + public Builder setGroupSecretImage( + com.akaxin.proto.core.CoreProto.GroupSecretImage.Builder builderForValue) { + if (groupSecretImageBuilder_ == null) { + groupSecretImage_ = builderForValue.build(); + onChanged(); + } else { + groupSecretImageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群图片加密消息
+       * 
+ * + * .core.GroupSecretImage groupSecretImage = 9; + */ + public Builder mergeGroupSecretImage(com.akaxin.proto.core.CoreProto.GroupSecretImage value) { + if (groupSecretImageBuilder_ == null) { + if (groupSecretImage_ != null) { + groupSecretImage_ = + com.akaxin.proto.core.CoreProto.GroupSecretImage.newBuilder(groupSecretImage_).mergeFrom(value).buildPartial(); + } else { + groupSecretImage_ = value; + } + onChanged(); + } else { + groupSecretImageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群图片加密消息
+       * 
+ * + * .core.GroupSecretImage groupSecretImage = 9; + */ + public Builder clearGroupSecretImage() { + if (groupSecretImageBuilder_ == null) { + groupSecretImage_ = null; + onChanged(); + } else { + groupSecretImage_ = null; + groupSecretImageBuilder_ = null; + } + + return this; + } + /** + *
+       *群图片加密消息
+       * 
+ * + * .core.GroupSecretImage groupSecretImage = 9; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretImage.Builder getGroupSecretImageBuilder() { + + onChanged(); + return getGroupSecretImageFieldBuilder().getBuilder(); + } + /** + *
+       *群图片加密消息
+       * 
+ * + * .core.GroupSecretImage groupSecretImage = 9; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretImageOrBuilder getGroupSecretImageOrBuilder() { + if (groupSecretImageBuilder_ != null) { + return groupSecretImageBuilder_.getMessageOrBuilder(); + } else { + return groupSecretImage_ == null ? + com.akaxin.proto.core.CoreProto.GroupSecretImage.getDefaultInstance() : groupSecretImage_; + } + } + /** + *
+       *群图片加密消息
+       * 
+ * + * .core.GroupSecretImage groupSecretImage = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretImage, com.akaxin.proto.core.CoreProto.GroupSecretImage.Builder, com.akaxin.proto.core.CoreProto.GroupSecretImageOrBuilder> + getGroupSecretImageFieldBuilder() { + if (groupSecretImageBuilder_ == null) { + groupSecretImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretImage, com.akaxin.proto.core.CoreProto.GroupSecretImage.Builder, com.akaxin.proto.core.CoreProto.GroupSecretImageOrBuilder>( + getGroupSecretImage(), + getParentForChildren(), + isClean()); + groupSecretImage_ = null; + } + return groupSecretImageBuilder_; + } + + private com.akaxin.proto.core.CoreProto.MsgVoice voice_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgVoice, com.akaxin.proto.core.CoreProto.MsgVoice.Builder, com.akaxin.proto.core.CoreProto.MsgVoiceOrBuilder> voiceBuilder_; + /** + *
+       *二人语音
+       * 
+ * + * .core.MsgVoice voice = 10; + */ + public boolean hasVoice() { + return voiceBuilder_ != null || voice_ != null; + } + /** + *
+       *二人语音
+       * 
+ * + * .core.MsgVoice voice = 10; + */ + public com.akaxin.proto.core.CoreProto.MsgVoice getVoice() { + if (voiceBuilder_ == null) { + return voice_ == null ? com.akaxin.proto.core.CoreProto.MsgVoice.getDefaultInstance() : voice_; + } else { + return voiceBuilder_.getMessage(); + } + } + /** + *
+       *二人语音
+       * 
+ * + * .core.MsgVoice voice = 10; + */ + public Builder setVoice(com.akaxin.proto.core.CoreProto.MsgVoice value) { + if (voiceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + voice_ = value; + onChanged(); + } else { + voiceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *二人语音
+       * 
+ * + * .core.MsgVoice voice = 10; + */ + public Builder setVoice( + com.akaxin.proto.core.CoreProto.MsgVoice.Builder builderForValue) { + if (voiceBuilder_ == null) { + voice_ = builderForValue.build(); + onChanged(); + } else { + voiceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *二人语音
+       * 
+ * + * .core.MsgVoice voice = 10; + */ + public Builder mergeVoice(com.akaxin.proto.core.CoreProto.MsgVoice value) { + if (voiceBuilder_ == null) { + if (voice_ != null) { + voice_ = + com.akaxin.proto.core.CoreProto.MsgVoice.newBuilder(voice_).mergeFrom(value).buildPartial(); + } else { + voice_ = value; + } + onChanged(); + } else { + voiceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *二人语音
+       * 
+ * + * .core.MsgVoice voice = 10; + */ + public Builder clearVoice() { + if (voiceBuilder_ == null) { + voice_ = null; + onChanged(); + } else { + voice_ = null; + voiceBuilder_ = null; + } + + return this; + } + /** + *
+       *二人语音
+       * 
+ * + * .core.MsgVoice voice = 10; + */ + public com.akaxin.proto.core.CoreProto.MsgVoice.Builder getVoiceBuilder() { + + onChanged(); + return getVoiceFieldBuilder().getBuilder(); + } + /** + *
+       *二人语音
+       * 
+ * + * .core.MsgVoice voice = 10; + */ + public com.akaxin.proto.core.CoreProto.MsgVoiceOrBuilder getVoiceOrBuilder() { + if (voiceBuilder_ != null) { + return voiceBuilder_.getMessageOrBuilder(); + } else { + return voice_ == null ? + com.akaxin.proto.core.CoreProto.MsgVoice.getDefaultInstance() : voice_; + } + } + /** + *
+       *二人语音
+       * 
+ * + * .core.MsgVoice voice = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgVoice, com.akaxin.proto.core.CoreProto.MsgVoice.Builder, com.akaxin.proto.core.CoreProto.MsgVoiceOrBuilder> + getVoiceFieldBuilder() { + if (voiceBuilder_ == null) { + voiceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgVoice, com.akaxin.proto.core.CoreProto.MsgVoice.Builder, com.akaxin.proto.core.CoreProto.MsgVoiceOrBuilder>( + getVoice(), + getParentForChildren(), + isClean()); + voice_ = null; + } + return voiceBuilder_; + } + + private com.akaxin.proto.core.CoreProto.MsgSecretVoice secretVoice_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgSecretVoice, com.akaxin.proto.core.CoreProto.MsgSecretVoice.Builder, com.akaxin.proto.core.CoreProto.MsgSecretVoiceOrBuilder> secretVoiceBuilder_; + /** + *
+       *二人加密语音
+       * 
+ * + * .core.MsgSecretVoice secretVoice = 11; + */ + public boolean hasSecretVoice() { + return secretVoiceBuilder_ != null || secretVoice_ != null; + } + /** + *
+       *二人加密语音
+       * 
+ * + * .core.MsgSecretVoice secretVoice = 11; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretVoice getSecretVoice() { + if (secretVoiceBuilder_ == null) { + return secretVoice_ == null ? com.akaxin.proto.core.CoreProto.MsgSecretVoice.getDefaultInstance() : secretVoice_; + } else { + return secretVoiceBuilder_.getMessage(); + } + } + /** + *
+       *二人加密语音
+       * 
+ * + * .core.MsgSecretVoice secretVoice = 11; + */ + public Builder setSecretVoice(com.akaxin.proto.core.CoreProto.MsgSecretVoice value) { + if (secretVoiceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + secretVoice_ = value; + onChanged(); + } else { + secretVoiceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *二人加密语音
+       * 
+ * + * .core.MsgSecretVoice secretVoice = 11; + */ + public Builder setSecretVoice( + com.akaxin.proto.core.CoreProto.MsgSecretVoice.Builder builderForValue) { + if (secretVoiceBuilder_ == null) { + secretVoice_ = builderForValue.build(); + onChanged(); + } else { + secretVoiceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *二人加密语音
+       * 
+ * + * .core.MsgSecretVoice secretVoice = 11; + */ + public Builder mergeSecretVoice(com.akaxin.proto.core.CoreProto.MsgSecretVoice value) { + if (secretVoiceBuilder_ == null) { + if (secretVoice_ != null) { + secretVoice_ = + com.akaxin.proto.core.CoreProto.MsgSecretVoice.newBuilder(secretVoice_).mergeFrom(value).buildPartial(); + } else { + secretVoice_ = value; + } + onChanged(); + } else { + secretVoiceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *二人加密语音
+       * 
+ * + * .core.MsgSecretVoice secretVoice = 11; + */ + public Builder clearSecretVoice() { + if (secretVoiceBuilder_ == null) { + secretVoice_ = null; + onChanged(); + } else { + secretVoice_ = null; + secretVoiceBuilder_ = null; + } + + return this; + } + /** + *
+       *二人加密语音
+       * 
+ * + * .core.MsgSecretVoice secretVoice = 11; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretVoice.Builder getSecretVoiceBuilder() { + + onChanged(); + return getSecretVoiceFieldBuilder().getBuilder(); + } + /** + *
+       *二人加密语音
+       * 
+ * + * .core.MsgSecretVoice secretVoice = 11; + */ + public com.akaxin.proto.core.CoreProto.MsgSecretVoiceOrBuilder getSecretVoiceOrBuilder() { + if (secretVoiceBuilder_ != null) { + return secretVoiceBuilder_.getMessageOrBuilder(); + } else { + return secretVoice_ == null ? + com.akaxin.proto.core.CoreProto.MsgSecretVoice.getDefaultInstance() : secretVoice_; + } + } + /** + *
+       *二人加密语音
+       * 
+ * + * .core.MsgSecretVoice secretVoice = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgSecretVoice, com.akaxin.proto.core.CoreProto.MsgSecretVoice.Builder, com.akaxin.proto.core.CoreProto.MsgSecretVoiceOrBuilder> + getSecretVoiceFieldBuilder() { + if (secretVoiceBuilder_ == null) { + secretVoiceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.MsgSecretVoice, com.akaxin.proto.core.CoreProto.MsgSecretVoice.Builder, com.akaxin.proto.core.CoreProto.MsgSecretVoiceOrBuilder>( + getSecretVoice(), + getParentForChildren(), + isClean()); + secretVoice_ = null; + } + return secretVoiceBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupVoice groupVoice_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupVoice, com.akaxin.proto.core.CoreProto.GroupVoice.Builder, com.akaxin.proto.core.CoreProto.GroupVoiceOrBuilder> groupVoiceBuilder_; + /** + *
+       *群语音
+       * 
+ * + * .core.GroupVoice groupVoice = 12; + */ + public boolean hasGroupVoice() { + return groupVoiceBuilder_ != null || groupVoice_ != null; + } + /** + *
+       *群语音
+       * 
+ * + * .core.GroupVoice groupVoice = 12; + */ + public com.akaxin.proto.core.CoreProto.GroupVoice getGroupVoice() { + if (groupVoiceBuilder_ == null) { + return groupVoice_ == null ? com.akaxin.proto.core.CoreProto.GroupVoice.getDefaultInstance() : groupVoice_; + } else { + return groupVoiceBuilder_.getMessage(); + } + } + /** + *
+       *群语音
+       * 
+ * + * .core.GroupVoice groupVoice = 12; + */ + public Builder setGroupVoice(com.akaxin.proto.core.CoreProto.GroupVoice value) { + if (groupVoiceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupVoice_ = value; + onChanged(); + } else { + groupVoiceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群语音
+       * 
+ * + * .core.GroupVoice groupVoice = 12; + */ + public Builder setGroupVoice( + com.akaxin.proto.core.CoreProto.GroupVoice.Builder builderForValue) { + if (groupVoiceBuilder_ == null) { + groupVoice_ = builderForValue.build(); + onChanged(); + } else { + groupVoiceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群语音
+       * 
+ * + * .core.GroupVoice groupVoice = 12; + */ + public Builder mergeGroupVoice(com.akaxin.proto.core.CoreProto.GroupVoice value) { + if (groupVoiceBuilder_ == null) { + if (groupVoice_ != null) { + groupVoice_ = + com.akaxin.proto.core.CoreProto.GroupVoice.newBuilder(groupVoice_).mergeFrom(value).buildPartial(); + } else { + groupVoice_ = value; + } + onChanged(); + } else { + groupVoiceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群语音
+       * 
+ * + * .core.GroupVoice groupVoice = 12; + */ + public Builder clearGroupVoice() { + if (groupVoiceBuilder_ == null) { + groupVoice_ = null; + onChanged(); + } else { + groupVoice_ = null; + groupVoiceBuilder_ = null; + } + + return this; + } + /** + *
+       *群语音
+       * 
+ * + * .core.GroupVoice groupVoice = 12; + */ + public com.akaxin.proto.core.CoreProto.GroupVoice.Builder getGroupVoiceBuilder() { + + onChanged(); + return getGroupVoiceFieldBuilder().getBuilder(); + } + /** + *
+       *群语音
+       * 
+ * + * .core.GroupVoice groupVoice = 12; + */ + public com.akaxin.proto.core.CoreProto.GroupVoiceOrBuilder getGroupVoiceOrBuilder() { + if (groupVoiceBuilder_ != null) { + return groupVoiceBuilder_.getMessageOrBuilder(); + } else { + return groupVoice_ == null ? + com.akaxin.proto.core.CoreProto.GroupVoice.getDefaultInstance() : groupVoice_; + } + } + /** + *
+       *群语音
+       * 
+ * + * .core.GroupVoice groupVoice = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupVoice, com.akaxin.proto.core.CoreProto.GroupVoice.Builder, com.akaxin.proto.core.CoreProto.GroupVoiceOrBuilder> + getGroupVoiceFieldBuilder() { + if (groupVoiceBuilder_ == null) { + groupVoiceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupVoice, com.akaxin.proto.core.CoreProto.GroupVoice.Builder, com.akaxin.proto.core.CoreProto.GroupVoiceOrBuilder>( + getGroupVoice(), + getParentForChildren(), + isClean()); + groupVoice_ = null; + } + return groupVoiceBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupSecretVoice groupSecretVoice_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretVoice, com.akaxin.proto.core.CoreProto.GroupSecretVoice.Builder, com.akaxin.proto.core.CoreProto.GroupSecretVoiceOrBuilder> groupSecretVoiceBuilder_; + /** + *
+       *群加密语音
+       * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 13; + */ + public boolean hasGroupSecretVoice() { + return groupSecretVoiceBuilder_ != null || groupSecretVoice_ != null; + } + /** + *
+       *群加密语音
+       * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 13; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretVoice getGroupSecretVoice() { + if (groupSecretVoiceBuilder_ == null) { + return groupSecretVoice_ == null ? com.akaxin.proto.core.CoreProto.GroupSecretVoice.getDefaultInstance() : groupSecretVoice_; + } else { + return groupSecretVoiceBuilder_.getMessage(); + } + } + /** + *
+       *群加密语音
+       * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 13; + */ + public Builder setGroupSecretVoice(com.akaxin.proto.core.CoreProto.GroupSecretVoice value) { + if (groupSecretVoiceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupSecretVoice_ = value; + onChanged(); + } else { + groupSecretVoiceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群加密语音
+       * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 13; + */ + public Builder setGroupSecretVoice( + com.akaxin.proto.core.CoreProto.GroupSecretVoice.Builder builderForValue) { + if (groupSecretVoiceBuilder_ == null) { + groupSecretVoice_ = builderForValue.build(); + onChanged(); + } else { + groupSecretVoiceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群加密语音
+       * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 13; + */ + public Builder mergeGroupSecretVoice(com.akaxin.proto.core.CoreProto.GroupSecretVoice value) { + if (groupSecretVoiceBuilder_ == null) { + if (groupSecretVoice_ != null) { + groupSecretVoice_ = + com.akaxin.proto.core.CoreProto.GroupSecretVoice.newBuilder(groupSecretVoice_).mergeFrom(value).buildPartial(); + } else { + groupSecretVoice_ = value; + } + onChanged(); + } else { + groupSecretVoiceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群加密语音
+       * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 13; + */ + public Builder clearGroupSecretVoice() { + if (groupSecretVoiceBuilder_ == null) { + groupSecretVoice_ = null; + onChanged(); + } else { + groupSecretVoice_ = null; + groupSecretVoiceBuilder_ = null; + } + + return this; + } + /** + *
+       *群加密语音
+       * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 13; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretVoice.Builder getGroupSecretVoiceBuilder() { + + onChanged(); + return getGroupSecretVoiceFieldBuilder().getBuilder(); + } + /** + *
+       *群加密语音
+       * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 13; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretVoiceOrBuilder getGroupSecretVoiceOrBuilder() { + if (groupSecretVoiceBuilder_ != null) { + return groupSecretVoiceBuilder_.getMessageOrBuilder(); + } else { + return groupSecretVoice_ == null ? + com.akaxin.proto.core.CoreProto.GroupSecretVoice.getDefaultInstance() : groupSecretVoice_; + } + } + /** + *
+       *群加密语音
+       * 
+ * + * .core.GroupSecretVoice groupSecretVoice = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretVoice, com.akaxin.proto.core.CoreProto.GroupSecretVoice.Builder, com.akaxin.proto.core.CoreProto.GroupSecretVoiceOrBuilder> + getGroupSecretVoiceFieldBuilder() { + if (groupSecretVoiceBuilder_ == null) { + groupSecretVoiceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretVoice, com.akaxin.proto.core.CoreProto.GroupSecretVoice.Builder, com.akaxin.proto.core.CoreProto.GroupSecretVoiceOrBuilder>( + getGroupSecretVoice(), + getParentForChildren(), + isClean()); + groupSecretVoice_ = null; + } + return groupSecretVoiceBuilder_; + } + + private com.akaxin.proto.core.CoreProto.U2Map u2Map_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2Map, com.akaxin.proto.core.CoreProto.U2Map.Builder, com.akaxin.proto.core.CoreProto.U2MapOrBuilder> u2MapBuilder_; + /** + *
+       *v0.4.3 版本未使用
+       * 
+ * + * .core.U2Map u2Map = 14; + */ + public boolean hasU2Map() { + return u2MapBuilder_ != null || u2Map_ != null; + } + /** + *
+       *v0.4.3 版本未使用
+       * 
+ * + * .core.U2Map u2Map = 14; + */ + public com.akaxin.proto.core.CoreProto.U2Map getU2Map() { + if (u2MapBuilder_ == null) { + return u2Map_ == null ? com.akaxin.proto.core.CoreProto.U2Map.getDefaultInstance() : u2Map_; + } else { + return u2MapBuilder_.getMessage(); + } + } + /** + *
+       *v0.4.3 版本未使用
+       * 
+ * + * .core.U2Map u2Map = 14; + */ + public Builder setU2Map(com.akaxin.proto.core.CoreProto.U2Map value) { + if (u2MapBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + u2Map_ = value; + onChanged(); + } else { + u2MapBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *v0.4.3 版本未使用
+       * 
+ * + * .core.U2Map u2Map = 14; + */ + public Builder setU2Map( + com.akaxin.proto.core.CoreProto.U2Map.Builder builderForValue) { + if (u2MapBuilder_ == null) { + u2Map_ = builderForValue.build(); + onChanged(); + } else { + u2MapBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *v0.4.3 版本未使用
+       * 
+ * + * .core.U2Map u2Map = 14; + */ + public Builder mergeU2Map(com.akaxin.proto.core.CoreProto.U2Map value) { + if (u2MapBuilder_ == null) { + if (u2Map_ != null) { + u2Map_ = + com.akaxin.proto.core.CoreProto.U2Map.newBuilder(u2Map_).mergeFrom(value).buildPartial(); + } else { + u2Map_ = value; + } + onChanged(); + } else { + u2MapBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *v0.4.3 版本未使用
+       * 
+ * + * .core.U2Map u2Map = 14; + */ + public Builder clearU2Map() { + if (u2MapBuilder_ == null) { + u2Map_ = null; + onChanged(); + } else { + u2Map_ = null; + u2MapBuilder_ = null; + } + + return this; + } + /** + *
+       *v0.4.3 版本未使用
+       * 
+ * + * .core.U2Map u2Map = 14; + */ + public com.akaxin.proto.core.CoreProto.U2Map.Builder getU2MapBuilder() { + + onChanged(); + return getU2MapFieldBuilder().getBuilder(); + } + /** + *
+       *v0.4.3 版本未使用
+       * 
+ * + * .core.U2Map u2Map = 14; + */ + public com.akaxin.proto.core.CoreProto.U2MapOrBuilder getU2MapOrBuilder() { + if (u2MapBuilder_ != null) { + return u2MapBuilder_.getMessageOrBuilder(); + } else { + return u2Map_ == null ? + com.akaxin.proto.core.CoreProto.U2Map.getDefaultInstance() : u2Map_; + } + } + /** + *
+       *v0.4.3 版本未使用
+       * 
+ * + * .core.U2Map u2Map = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2Map, com.akaxin.proto.core.CoreProto.U2Map.Builder, com.akaxin.proto.core.CoreProto.U2MapOrBuilder> + getU2MapFieldBuilder() { + if (u2MapBuilder_ == null) { + u2MapBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2Map, com.akaxin.proto.core.CoreProto.U2Map.Builder, com.akaxin.proto.core.CoreProto.U2MapOrBuilder>( + getU2Map(), + getParentForChildren(), + isClean()); + u2Map_ = null; + } + return u2MapBuilder_; + } + + private com.akaxin.proto.core.CoreProto.U2SecretMap u2SecretMap_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2SecretMap, com.akaxin.proto.core.CoreProto.U2SecretMap.Builder, com.akaxin.proto.core.CoreProto.U2SecretMapOrBuilder> u2SecretMapBuilder_; + /** + *
+       *加密地图消息
+       * 
+ * + * .core.U2SecretMap u2SecretMap = 15; + */ + public boolean hasU2SecretMap() { + return u2SecretMapBuilder_ != null || u2SecretMap_ != null; + } + /** + *
+       *加密地图消息
+       * 
+ * + * .core.U2SecretMap u2SecretMap = 15; + */ + public com.akaxin.proto.core.CoreProto.U2SecretMap getU2SecretMap() { + if (u2SecretMapBuilder_ == null) { + return u2SecretMap_ == null ? com.akaxin.proto.core.CoreProto.U2SecretMap.getDefaultInstance() : u2SecretMap_; + } else { + return u2SecretMapBuilder_.getMessage(); + } + } + /** + *
+       *加密地图消息
+       * 
+ * + * .core.U2SecretMap u2SecretMap = 15; + */ + public Builder setU2SecretMap(com.akaxin.proto.core.CoreProto.U2SecretMap value) { + if (u2SecretMapBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + u2SecretMap_ = value; + onChanged(); + } else { + u2SecretMapBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *加密地图消息
+       * 
+ * + * .core.U2SecretMap u2SecretMap = 15; + */ + public Builder setU2SecretMap( + com.akaxin.proto.core.CoreProto.U2SecretMap.Builder builderForValue) { + if (u2SecretMapBuilder_ == null) { + u2SecretMap_ = builderForValue.build(); + onChanged(); + } else { + u2SecretMapBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *加密地图消息
+       * 
+ * + * .core.U2SecretMap u2SecretMap = 15; + */ + public Builder mergeU2SecretMap(com.akaxin.proto.core.CoreProto.U2SecretMap value) { + if (u2SecretMapBuilder_ == null) { + if (u2SecretMap_ != null) { + u2SecretMap_ = + com.akaxin.proto.core.CoreProto.U2SecretMap.newBuilder(u2SecretMap_).mergeFrom(value).buildPartial(); + } else { + u2SecretMap_ = value; + } + onChanged(); + } else { + u2SecretMapBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *加密地图消息
+       * 
+ * + * .core.U2SecretMap u2SecretMap = 15; + */ + public Builder clearU2SecretMap() { + if (u2SecretMapBuilder_ == null) { + u2SecretMap_ = null; + onChanged(); + } else { + u2SecretMap_ = null; + u2SecretMapBuilder_ = null; + } + + return this; + } + /** + *
+       *加密地图消息
+       * 
+ * + * .core.U2SecretMap u2SecretMap = 15; + */ + public com.akaxin.proto.core.CoreProto.U2SecretMap.Builder getU2SecretMapBuilder() { + + onChanged(); + return getU2SecretMapFieldBuilder().getBuilder(); + } + /** + *
+       *加密地图消息
+       * 
+ * + * .core.U2SecretMap u2SecretMap = 15; + */ + public com.akaxin.proto.core.CoreProto.U2SecretMapOrBuilder getU2SecretMapOrBuilder() { + if (u2SecretMapBuilder_ != null) { + return u2SecretMapBuilder_.getMessageOrBuilder(); + } else { + return u2SecretMap_ == null ? + com.akaxin.proto.core.CoreProto.U2SecretMap.getDefaultInstance() : u2SecretMap_; + } + } + /** + *
+       *加密地图消息
+       * 
+ * + * .core.U2SecretMap u2SecretMap = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2SecretMap, com.akaxin.proto.core.CoreProto.U2SecretMap.Builder, com.akaxin.proto.core.CoreProto.U2SecretMapOrBuilder> + getU2SecretMapFieldBuilder() { + if (u2SecretMapBuilder_ == null) { + u2SecretMapBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2SecretMap, com.akaxin.proto.core.CoreProto.U2SecretMap.Builder, com.akaxin.proto.core.CoreProto.U2SecretMapOrBuilder>( + getU2SecretMap(), + getParentForChildren(), + isClean()); + u2SecretMap_ = null; + } + return u2SecretMapBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupMap groupMap_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupMap, com.akaxin.proto.core.CoreProto.GroupMap.Builder, com.akaxin.proto.core.CoreProto.GroupMapOrBuilder> groupMapBuilder_; + /** + *
+       *群地图
+       * 
+ * + * .core.GroupMap groupMap = 16; + */ + public boolean hasGroupMap() { + return groupMapBuilder_ != null || groupMap_ != null; + } + /** + *
+       *群地图
+       * 
+ * + * .core.GroupMap groupMap = 16; + */ + public com.akaxin.proto.core.CoreProto.GroupMap getGroupMap() { + if (groupMapBuilder_ == null) { + return groupMap_ == null ? com.akaxin.proto.core.CoreProto.GroupMap.getDefaultInstance() : groupMap_; + } else { + return groupMapBuilder_.getMessage(); + } + } + /** + *
+       *群地图
+       * 
+ * + * .core.GroupMap groupMap = 16; + */ + public Builder setGroupMap(com.akaxin.proto.core.CoreProto.GroupMap value) { + if (groupMapBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupMap_ = value; + onChanged(); + } else { + groupMapBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群地图
+       * 
+ * + * .core.GroupMap groupMap = 16; + */ + public Builder setGroupMap( + com.akaxin.proto.core.CoreProto.GroupMap.Builder builderForValue) { + if (groupMapBuilder_ == null) { + groupMap_ = builderForValue.build(); + onChanged(); + } else { + groupMapBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群地图
+       * 
+ * + * .core.GroupMap groupMap = 16; + */ + public Builder mergeGroupMap(com.akaxin.proto.core.CoreProto.GroupMap value) { + if (groupMapBuilder_ == null) { + if (groupMap_ != null) { + groupMap_ = + com.akaxin.proto.core.CoreProto.GroupMap.newBuilder(groupMap_).mergeFrom(value).buildPartial(); + } else { + groupMap_ = value; + } + onChanged(); + } else { + groupMapBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群地图
+       * 
+ * + * .core.GroupMap groupMap = 16; + */ + public Builder clearGroupMap() { + if (groupMapBuilder_ == null) { + groupMap_ = null; + onChanged(); + } else { + groupMap_ = null; + groupMapBuilder_ = null; + } + + return this; + } + /** + *
+       *群地图
+       * 
+ * + * .core.GroupMap groupMap = 16; + */ + public com.akaxin.proto.core.CoreProto.GroupMap.Builder getGroupMapBuilder() { + + onChanged(); + return getGroupMapFieldBuilder().getBuilder(); + } + /** + *
+       *群地图
+       * 
+ * + * .core.GroupMap groupMap = 16; + */ + public com.akaxin.proto.core.CoreProto.GroupMapOrBuilder getGroupMapOrBuilder() { + if (groupMapBuilder_ != null) { + return groupMapBuilder_.getMessageOrBuilder(); + } else { + return groupMap_ == null ? + com.akaxin.proto.core.CoreProto.GroupMap.getDefaultInstance() : groupMap_; + } + } + /** + *
+       *群地图
+       * 
+ * + * .core.GroupMap groupMap = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupMap, com.akaxin.proto.core.CoreProto.GroupMap.Builder, com.akaxin.proto.core.CoreProto.GroupMapOrBuilder> + getGroupMapFieldBuilder() { + if (groupMapBuilder_ == null) { + groupMapBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupMap, com.akaxin.proto.core.CoreProto.GroupMap.Builder, com.akaxin.proto.core.CoreProto.GroupMapOrBuilder>( + getGroupMap(), + getParentForChildren(), + isClean()); + groupMap_ = null; + } + return groupMapBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupSecretMap groupSecretMap_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretMap, com.akaxin.proto.core.CoreProto.GroupSecretMap.Builder, com.akaxin.proto.core.CoreProto.GroupSecretMapOrBuilder> groupSecretMapBuilder_; + /** + *
+       *群加密地图
+       * 
+ * + * .core.GroupSecretMap groupSecretMap = 17; + */ + public boolean hasGroupSecretMap() { + return groupSecretMapBuilder_ != null || groupSecretMap_ != null; + } + /** + *
+       *群加密地图
+       * 
+ * + * .core.GroupSecretMap groupSecretMap = 17; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretMap getGroupSecretMap() { + if (groupSecretMapBuilder_ == null) { + return groupSecretMap_ == null ? com.akaxin.proto.core.CoreProto.GroupSecretMap.getDefaultInstance() : groupSecretMap_; + } else { + return groupSecretMapBuilder_.getMessage(); + } + } + /** + *
+       *群加密地图
+       * 
+ * + * .core.GroupSecretMap groupSecretMap = 17; + */ + public Builder setGroupSecretMap(com.akaxin.proto.core.CoreProto.GroupSecretMap value) { + if (groupSecretMapBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupSecretMap_ = value; + onChanged(); + } else { + groupSecretMapBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群加密地图
+       * 
+ * + * .core.GroupSecretMap groupSecretMap = 17; + */ + public Builder setGroupSecretMap( + com.akaxin.proto.core.CoreProto.GroupSecretMap.Builder builderForValue) { + if (groupSecretMapBuilder_ == null) { + groupSecretMap_ = builderForValue.build(); + onChanged(); + } else { + groupSecretMapBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群加密地图
+       * 
+ * + * .core.GroupSecretMap groupSecretMap = 17; + */ + public Builder mergeGroupSecretMap(com.akaxin.proto.core.CoreProto.GroupSecretMap value) { + if (groupSecretMapBuilder_ == null) { + if (groupSecretMap_ != null) { + groupSecretMap_ = + com.akaxin.proto.core.CoreProto.GroupSecretMap.newBuilder(groupSecretMap_).mergeFrom(value).buildPartial(); + } else { + groupSecretMap_ = value; + } + onChanged(); + } else { + groupSecretMapBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群加密地图
+       * 
+ * + * .core.GroupSecretMap groupSecretMap = 17; + */ + public Builder clearGroupSecretMap() { + if (groupSecretMapBuilder_ == null) { + groupSecretMap_ = null; + onChanged(); + } else { + groupSecretMap_ = null; + groupSecretMapBuilder_ = null; + } + + return this; + } + /** + *
+       *群加密地图
+       * 
+ * + * .core.GroupSecretMap groupSecretMap = 17; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretMap.Builder getGroupSecretMapBuilder() { + + onChanged(); + return getGroupSecretMapFieldBuilder().getBuilder(); + } + /** + *
+       *群加密地图
+       * 
+ * + * .core.GroupSecretMap groupSecretMap = 17; + */ + public com.akaxin.proto.core.CoreProto.GroupSecretMapOrBuilder getGroupSecretMapOrBuilder() { + if (groupSecretMapBuilder_ != null) { + return groupSecretMapBuilder_.getMessageOrBuilder(); + } else { + return groupSecretMap_ == null ? + com.akaxin.proto.core.CoreProto.GroupSecretMap.getDefaultInstance() : groupSecretMap_; + } + } + /** + *
+       *群加密地图
+       * 
+ * + * .core.GroupSecretMap groupSecretMap = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretMap, com.akaxin.proto.core.CoreProto.GroupSecretMap.Builder, com.akaxin.proto.core.CoreProto.GroupSecretMapOrBuilder> + getGroupSecretMapFieldBuilder() { + if (groupSecretMapBuilder_ == null) { + groupSecretMapBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupSecretMap, com.akaxin.proto.core.CoreProto.GroupSecretMap.Builder, com.akaxin.proto.core.CoreProto.GroupSecretMapOrBuilder>( + getGroupSecretMap(), + getParentForChildren(), + isClean()); + groupSecretMap_ = null; + } + return groupSecretMapBuilder_; + } + + private com.akaxin.proto.core.CoreProto.U2MsgNotice u2MsgNotice_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2MsgNotice, com.akaxin.proto.core.CoreProto.U2MsgNotice.Builder, com.akaxin.proto.core.CoreProto.U2MsgNoticeOrBuilder> u2MsgNoticeBuilder_; + /** + *
+       *通知消息
+       * 
+ * + * .core.U2MsgNotice u2MsgNotice = 18; + */ + public boolean hasU2MsgNotice() { + return u2MsgNoticeBuilder_ != null || u2MsgNotice_ != null; + } + /** + *
+       *通知消息
+       * 
+ * + * .core.U2MsgNotice u2MsgNotice = 18; + */ + public com.akaxin.proto.core.CoreProto.U2MsgNotice getU2MsgNotice() { + if (u2MsgNoticeBuilder_ == null) { + return u2MsgNotice_ == null ? com.akaxin.proto.core.CoreProto.U2MsgNotice.getDefaultInstance() : u2MsgNotice_; + } else { + return u2MsgNoticeBuilder_.getMessage(); + } + } + /** + *
+       *通知消息
+       * 
+ * + * .core.U2MsgNotice u2MsgNotice = 18; + */ + public Builder setU2MsgNotice(com.akaxin.proto.core.CoreProto.U2MsgNotice value) { + if (u2MsgNoticeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + u2MsgNotice_ = value; + onChanged(); + } else { + u2MsgNoticeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *通知消息
+       * 
+ * + * .core.U2MsgNotice u2MsgNotice = 18; + */ + public Builder setU2MsgNotice( + com.akaxin.proto.core.CoreProto.U2MsgNotice.Builder builderForValue) { + if (u2MsgNoticeBuilder_ == null) { + u2MsgNotice_ = builderForValue.build(); + onChanged(); + } else { + u2MsgNoticeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *通知消息
+       * 
+ * + * .core.U2MsgNotice u2MsgNotice = 18; + */ + public Builder mergeU2MsgNotice(com.akaxin.proto.core.CoreProto.U2MsgNotice value) { + if (u2MsgNoticeBuilder_ == null) { + if (u2MsgNotice_ != null) { + u2MsgNotice_ = + com.akaxin.proto.core.CoreProto.U2MsgNotice.newBuilder(u2MsgNotice_).mergeFrom(value).buildPartial(); + } else { + u2MsgNotice_ = value; + } + onChanged(); + } else { + u2MsgNoticeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *通知消息
+       * 
+ * + * .core.U2MsgNotice u2MsgNotice = 18; + */ + public Builder clearU2MsgNotice() { + if (u2MsgNoticeBuilder_ == null) { + u2MsgNotice_ = null; + onChanged(); + } else { + u2MsgNotice_ = null; + u2MsgNoticeBuilder_ = null; + } + + return this; + } + /** + *
+       *通知消息
+       * 
+ * + * .core.U2MsgNotice u2MsgNotice = 18; + */ + public com.akaxin.proto.core.CoreProto.U2MsgNotice.Builder getU2MsgNoticeBuilder() { + + onChanged(); + return getU2MsgNoticeFieldBuilder().getBuilder(); + } + /** + *
+       *通知消息
+       * 
+ * + * .core.U2MsgNotice u2MsgNotice = 18; + */ + public com.akaxin.proto.core.CoreProto.U2MsgNoticeOrBuilder getU2MsgNoticeOrBuilder() { + if (u2MsgNoticeBuilder_ != null) { + return u2MsgNoticeBuilder_.getMessageOrBuilder(); + } else { + return u2MsgNotice_ == null ? + com.akaxin.proto.core.CoreProto.U2MsgNotice.getDefaultInstance() : u2MsgNotice_; + } + } + /** + *
+       *通知消息
+       * 
+ * + * .core.U2MsgNotice u2MsgNotice = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2MsgNotice, com.akaxin.proto.core.CoreProto.U2MsgNotice.Builder, com.akaxin.proto.core.CoreProto.U2MsgNoticeOrBuilder> + getU2MsgNoticeFieldBuilder() { + if (u2MsgNoticeBuilder_ == null) { + u2MsgNoticeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2MsgNotice, com.akaxin.proto.core.CoreProto.U2MsgNotice.Builder, com.akaxin.proto.core.CoreProto.U2MsgNoticeOrBuilder>( + getU2MsgNotice(), + getParentForChildren(), + isClean()); + u2MsgNotice_ = null; + } + return u2MsgNoticeBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupMsgNotice groupMsgNotice_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupMsgNotice, com.akaxin.proto.core.CoreProto.GroupMsgNotice.Builder, com.akaxin.proto.core.CoreProto.GroupMsgNoticeOrBuilder> groupMsgNoticeBuilder_; + /** + *
+       *群消息通知
+       * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 19; + */ + public boolean hasGroupMsgNotice() { + return groupMsgNoticeBuilder_ != null || groupMsgNotice_ != null; + } + /** + *
+       *群消息通知
+       * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 19; + */ + public com.akaxin.proto.core.CoreProto.GroupMsgNotice getGroupMsgNotice() { + if (groupMsgNoticeBuilder_ == null) { + return groupMsgNotice_ == null ? com.akaxin.proto.core.CoreProto.GroupMsgNotice.getDefaultInstance() : groupMsgNotice_; + } else { + return groupMsgNoticeBuilder_.getMessage(); + } + } + /** + *
+       *群消息通知
+       * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 19; + */ + public Builder setGroupMsgNotice(com.akaxin.proto.core.CoreProto.GroupMsgNotice value) { + if (groupMsgNoticeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupMsgNotice_ = value; + onChanged(); + } else { + groupMsgNoticeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群消息通知
+       * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 19; + */ + public Builder setGroupMsgNotice( + com.akaxin.proto.core.CoreProto.GroupMsgNotice.Builder builderForValue) { + if (groupMsgNoticeBuilder_ == null) { + groupMsgNotice_ = builderForValue.build(); + onChanged(); + } else { + groupMsgNoticeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群消息通知
+       * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 19; + */ + public Builder mergeGroupMsgNotice(com.akaxin.proto.core.CoreProto.GroupMsgNotice value) { + if (groupMsgNoticeBuilder_ == null) { + if (groupMsgNotice_ != null) { + groupMsgNotice_ = + com.akaxin.proto.core.CoreProto.GroupMsgNotice.newBuilder(groupMsgNotice_).mergeFrom(value).buildPartial(); + } else { + groupMsgNotice_ = value; + } + onChanged(); + } else { + groupMsgNoticeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群消息通知
+       * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 19; + */ + public Builder clearGroupMsgNotice() { + if (groupMsgNoticeBuilder_ == null) { + groupMsgNotice_ = null; + onChanged(); + } else { + groupMsgNotice_ = null; + groupMsgNoticeBuilder_ = null; + } + + return this; + } + /** + *
+       *群消息通知
+       * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 19; + */ + public com.akaxin.proto.core.CoreProto.GroupMsgNotice.Builder getGroupMsgNoticeBuilder() { + + onChanged(); + return getGroupMsgNoticeFieldBuilder().getBuilder(); + } + /** + *
+       *群消息通知
+       * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 19; + */ + public com.akaxin.proto.core.CoreProto.GroupMsgNoticeOrBuilder getGroupMsgNoticeOrBuilder() { + if (groupMsgNoticeBuilder_ != null) { + return groupMsgNoticeBuilder_.getMessageOrBuilder(); + } else { + return groupMsgNotice_ == null ? + com.akaxin.proto.core.CoreProto.GroupMsgNotice.getDefaultInstance() : groupMsgNotice_; + } + } + /** + *
+       *群消息通知
+       * 
+ * + * .core.GroupMsgNotice groupMsgNotice = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupMsgNotice, com.akaxin.proto.core.CoreProto.GroupMsgNotice.Builder, com.akaxin.proto.core.CoreProto.GroupMsgNoticeOrBuilder> + getGroupMsgNoticeFieldBuilder() { + if (groupMsgNoticeBuilder_ == null) { + groupMsgNoticeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupMsgNotice, com.akaxin.proto.core.CoreProto.GroupMsgNotice.Builder, com.akaxin.proto.core.CoreProto.GroupMsgNoticeOrBuilder>( + getGroupMsgNotice(), + getParentForChildren(), + isClean()); + groupMsgNotice_ = null; + } + return groupMsgNoticeBuilder_; + } + + private com.akaxin.proto.core.CoreProto.U2Recall u2Recall_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2Recall, com.akaxin.proto.core.CoreProto.U2Recall.Builder, com.akaxin.proto.core.CoreProto.U2RecallOrBuilder> u2RecallBuilder_; + /** + *
+       *召回消息
+       * 
+ * + * .core.U2Recall u2Recall = 20; + */ + public boolean hasU2Recall() { + return u2RecallBuilder_ != null || u2Recall_ != null; + } + /** + *
+       *召回消息
+       * 
+ * + * .core.U2Recall u2Recall = 20; + */ + public com.akaxin.proto.core.CoreProto.U2Recall getU2Recall() { + if (u2RecallBuilder_ == null) { + return u2Recall_ == null ? com.akaxin.proto.core.CoreProto.U2Recall.getDefaultInstance() : u2Recall_; + } else { + return u2RecallBuilder_.getMessage(); + } + } + /** + *
+       *召回消息
+       * 
+ * + * .core.U2Recall u2Recall = 20; + */ + public Builder setU2Recall(com.akaxin.proto.core.CoreProto.U2Recall value) { + if (u2RecallBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + u2Recall_ = value; + onChanged(); + } else { + u2RecallBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *召回消息
+       * 
+ * + * .core.U2Recall u2Recall = 20; + */ + public Builder setU2Recall( + com.akaxin.proto.core.CoreProto.U2Recall.Builder builderForValue) { + if (u2RecallBuilder_ == null) { + u2Recall_ = builderForValue.build(); + onChanged(); + } else { + u2RecallBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *召回消息
+       * 
+ * + * .core.U2Recall u2Recall = 20; + */ + public Builder mergeU2Recall(com.akaxin.proto.core.CoreProto.U2Recall value) { + if (u2RecallBuilder_ == null) { + if (u2Recall_ != null) { + u2Recall_ = + com.akaxin.proto.core.CoreProto.U2Recall.newBuilder(u2Recall_).mergeFrom(value).buildPartial(); + } else { + u2Recall_ = value; + } + onChanged(); + } else { + u2RecallBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *召回消息
+       * 
+ * + * .core.U2Recall u2Recall = 20; + */ + public Builder clearU2Recall() { + if (u2RecallBuilder_ == null) { + u2Recall_ = null; + onChanged(); + } else { + u2Recall_ = null; + u2RecallBuilder_ = null; + } + + return this; + } + /** + *
+       *召回消息
+       * 
+ * + * .core.U2Recall u2Recall = 20; + */ + public com.akaxin.proto.core.CoreProto.U2Recall.Builder getU2RecallBuilder() { + + onChanged(); + return getU2RecallFieldBuilder().getBuilder(); + } + /** + *
+       *召回消息
+       * 
+ * + * .core.U2Recall u2Recall = 20; + */ + public com.akaxin.proto.core.CoreProto.U2RecallOrBuilder getU2RecallOrBuilder() { + if (u2RecallBuilder_ != null) { + return u2RecallBuilder_.getMessageOrBuilder(); + } else { + return u2Recall_ == null ? + com.akaxin.proto.core.CoreProto.U2Recall.getDefaultInstance() : u2Recall_; + } + } + /** + *
+       *召回消息
+       * 
+ * + * .core.U2Recall u2Recall = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2Recall, com.akaxin.proto.core.CoreProto.U2Recall.Builder, com.akaxin.proto.core.CoreProto.U2RecallOrBuilder> + getU2RecallFieldBuilder() { + if (u2RecallBuilder_ == null) { + u2RecallBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2Recall, com.akaxin.proto.core.CoreProto.U2Recall.Builder, com.akaxin.proto.core.CoreProto.U2RecallOrBuilder>( + getU2Recall(), + getParentForChildren(), + isClean()); + u2Recall_ = null; + } + return u2RecallBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupRecall groupRecall_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupRecall, com.akaxin.proto.core.CoreProto.GroupRecall.Builder, com.akaxin.proto.core.CoreProto.GroupRecallOrBuilder> groupRecallBuilder_; + /** + *
+       *群组召回消息
+       * 
+ * + * .core.GroupRecall groupRecall = 21; + */ + public boolean hasGroupRecall() { + return groupRecallBuilder_ != null || groupRecall_ != null; + } + /** + *
+       *群组召回消息
+       * 
+ * + * .core.GroupRecall groupRecall = 21; + */ + public com.akaxin.proto.core.CoreProto.GroupRecall getGroupRecall() { + if (groupRecallBuilder_ == null) { + return groupRecall_ == null ? com.akaxin.proto.core.CoreProto.GroupRecall.getDefaultInstance() : groupRecall_; + } else { + return groupRecallBuilder_.getMessage(); + } + } + /** + *
+       *群组召回消息
+       * 
+ * + * .core.GroupRecall groupRecall = 21; + */ + public Builder setGroupRecall(com.akaxin.proto.core.CoreProto.GroupRecall value) { + if (groupRecallBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupRecall_ = value; + onChanged(); + } else { + groupRecallBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群组召回消息
+       * 
+ * + * .core.GroupRecall groupRecall = 21; + */ + public Builder setGroupRecall( + com.akaxin.proto.core.CoreProto.GroupRecall.Builder builderForValue) { + if (groupRecallBuilder_ == null) { + groupRecall_ = builderForValue.build(); + onChanged(); + } else { + groupRecallBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群组召回消息
+       * 
+ * + * .core.GroupRecall groupRecall = 21; + */ + public Builder mergeGroupRecall(com.akaxin.proto.core.CoreProto.GroupRecall value) { + if (groupRecallBuilder_ == null) { + if (groupRecall_ != null) { + groupRecall_ = + com.akaxin.proto.core.CoreProto.GroupRecall.newBuilder(groupRecall_).mergeFrom(value).buildPartial(); + } else { + groupRecall_ = value; + } + onChanged(); + } else { + groupRecallBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群组召回消息
+       * 
+ * + * .core.GroupRecall groupRecall = 21; + */ + public Builder clearGroupRecall() { + if (groupRecallBuilder_ == null) { + groupRecall_ = null; + onChanged(); + } else { + groupRecall_ = null; + groupRecallBuilder_ = null; + } + + return this; + } + /** + *
+       *群组召回消息
+       * 
+ * + * .core.GroupRecall groupRecall = 21; + */ + public com.akaxin.proto.core.CoreProto.GroupRecall.Builder getGroupRecallBuilder() { + + onChanged(); + return getGroupRecallFieldBuilder().getBuilder(); + } + /** + *
+       *群组召回消息
+       * 
+ * + * .core.GroupRecall groupRecall = 21; + */ + public com.akaxin.proto.core.CoreProto.GroupRecallOrBuilder getGroupRecallOrBuilder() { + if (groupRecallBuilder_ != null) { + return groupRecallBuilder_.getMessageOrBuilder(); + } else { + return groupRecall_ == null ? + com.akaxin.proto.core.CoreProto.GroupRecall.getDefaultInstance() : groupRecall_; + } + } + /** + *
+       *群组召回消息
+       * 
+ * + * .core.GroupRecall groupRecall = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupRecall, com.akaxin.proto.core.CoreProto.GroupRecall.Builder, com.akaxin.proto.core.CoreProto.GroupRecallOrBuilder> + getGroupRecallFieldBuilder() { + if (groupRecallBuilder_ == null) { + groupRecallBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupRecall, com.akaxin.proto.core.CoreProto.GroupRecall.Builder, com.akaxin.proto.core.CoreProto.GroupRecallOrBuilder>( + getGroupRecall(), + getParentForChildren(), + isClean()); + groupRecall_ = null; + } + return groupRecallBuilder_; + } + + private com.akaxin.proto.core.CoreProto.U2Web u2Web_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2Web, com.akaxin.proto.core.CoreProto.U2Web.Builder, com.akaxin.proto.core.CoreProto.U2WebOrBuilder> u2WebBuilder_; + /** + *
+       *web消息
+       * 
+ * + * .core.U2Web u2Web = 22; + */ + public boolean hasU2Web() { + return u2WebBuilder_ != null || u2Web_ != null; + } + /** + *
+       *web消息
+       * 
+ * + * .core.U2Web u2Web = 22; + */ + public com.akaxin.proto.core.CoreProto.U2Web getU2Web() { + if (u2WebBuilder_ == null) { + return u2Web_ == null ? com.akaxin.proto.core.CoreProto.U2Web.getDefaultInstance() : u2Web_; + } else { + return u2WebBuilder_.getMessage(); + } + } + /** + *
+       *web消息
+       * 
+ * + * .core.U2Web u2Web = 22; + */ + public Builder setU2Web(com.akaxin.proto.core.CoreProto.U2Web value) { + if (u2WebBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + u2Web_ = value; + onChanged(); + } else { + u2WebBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *web消息
+       * 
+ * + * .core.U2Web u2Web = 22; + */ + public Builder setU2Web( + com.akaxin.proto.core.CoreProto.U2Web.Builder builderForValue) { + if (u2WebBuilder_ == null) { + u2Web_ = builderForValue.build(); + onChanged(); + } else { + u2WebBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *web消息
+       * 
+ * + * .core.U2Web u2Web = 22; + */ + public Builder mergeU2Web(com.akaxin.proto.core.CoreProto.U2Web value) { + if (u2WebBuilder_ == null) { + if (u2Web_ != null) { + u2Web_ = + com.akaxin.proto.core.CoreProto.U2Web.newBuilder(u2Web_).mergeFrom(value).buildPartial(); + } else { + u2Web_ = value; + } + onChanged(); + } else { + u2WebBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *web消息
+       * 
+ * + * .core.U2Web u2Web = 22; + */ + public Builder clearU2Web() { + if (u2WebBuilder_ == null) { + u2Web_ = null; + onChanged(); + } else { + u2Web_ = null; + u2WebBuilder_ = null; + } + + return this; + } + /** + *
+       *web消息
+       * 
+ * + * .core.U2Web u2Web = 22; + */ + public com.akaxin.proto.core.CoreProto.U2Web.Builder getU2WebBuilder() { + + onChanged(); + return getU2WebFieldBuilder().getBuilder(); + } + /** + *
+       *web消息
+       * 
+ * + * .core.U2Web u2Web = 22; + */ + public com.akaxin.proto.core.CoreProto.U2WebOrBuilder getU2WebOrBuilder() { + if (u2WebBuilder_ != null) { + return u2WebBuilder_.getMessageOrBuilder(); + } else { + return u2Web_ == null ? + com.akaxin.proto.core.CoreProto.U2Web.getDefaultInstance() : u2Web_; + } + } + /** + *
+       *web消息
+       * 
+ * + * .core.U2Web u2Web = 22; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2Web, com.akaxin.proto.core.CoreProto.U2Web.Builder, com.akaxin.proto.core.CoreProto.U2WebOrBuilder> + getU2WebFieldBuilder() { + if (u2WebBuilder_ == null) { + u2WebBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2Web, com.akaxin.proto.core.CoreProto.U2Web.Builder, com.akaxin.proto.core.CoreProto.U2WebOrBuilder>( + getU2Web(), + getParentForChildren(), + isClean()); + u2Web_ = null; + } + return u2WebBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupWeb groupWeb_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupWeb, com.akaxin.proto.core.CoreProto.GroupWeb.Builder, com.akaxin.proto.core.CoreProto.GroupWebOrBuilder> groupWebBuilder_; + /** + *
+       *群组web消息
+       * 
+ * + * .core.GroupWeb groupWeb = 23; + */ + public boolean hasGroupWeb() { + return groupWebBuilder_ != null || groupWeb_ != null; + } + /** + *
+       *群组web消息
+       * 
+ * + * .core.GroupWeb groupWeb = 23; + */ + public com.akaxin.proto.core.CoreProto.GroupWeb getGroupWeb() { + if (groupWebBuilder_ == null) { + return groupWeb_ == null ? com.akaxin.proto.core.CoreProto.GroupWeb.getDefaultInstance() : groupWeb_; + } else { + return groupWebBuilder_.getMessage(); + } + } + /** + *
+       *群组web消息
+       * 
+ * + * .core.GroupWeb groupWeb = 23; + */ + public Builder setGroupWeb(com.akaxin.proto.core.CoreProto.GroupWeb value) { + if (groupWebBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupWeb_ = value; + onChanged(); + } else { + groupWebBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群组web消息
+       * 
+ * + * .core.GroupWeb groupWeb = 23; + */ + public Builder setGroupWeb( + com.akaxin.proto.core.CoreProto.GroupWeb.Builder builderForValue) { + if (groupWebBuilder_ == null) { + groupWeb_ = builderForValue.build(); + onChanged(); + } else { + groupWebBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群组web消息
+       * 
+ * + * .core.GroupWeb groupWeb = 23; + */ + public Builder mergeGroupWeb(com.akaxin.proto.core.CoreProto.GroupWeb value) { + if (groupWebBuilder_ == null) { + if (groupWeb_ != null) { + groupWeb_ = + com.akaxin.proto.core.CoreProto.GroupWeb.newBuilder(groupWeb_).mergeFrom(value).buildPartial(); + } else { + groupWeb_ = value; + } + onChanged(); + } else { + groupWebBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群组web消息
+       * 
+ * + * .core.GroupWeb groupWeb = 23; + */ + public Builder clearGroupWeb() { + if (groupWebBuilder_ == null) { + groupWeb_ = null; + onChanged(); + } else { + groupWeb_ = null; + groupWebBuilder_ = null; + } + + return this; + } + /** + *
+       *群组web消息
+       * 
+ * + * .core.GroupWeb groupWeb = 23; + */ + public com.akaxin.proto.core.CoreProto.GroupWeb.Builder getGroupWebBuilder() { + + onChanged(); + return getGroupWebFieldBuilder().getBuilder(); + } + /** + *
+       *群组web消息
+       * 
+ * + * .core.GroupWeb groupWeb = 23; + */ + public com.akaxin.proto.core.CoreProto.GroupWebOrBuilder getGroupWebOrBuilder() { + if (groupWebBuilder_ != null) { + return groupWebBuilder_.getMessageOrBuilder(); + } else { + return groupWeb_ == null ? + com.akaxin.proto.core.CoreProto.GroupWeb.getDefaultInstance() : groupWeb_; + } + } + /** + *
+       *群组web消息
+       * 
+ * + * .core.GroupWeb groupWeb = 23; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupWeb, com.akaxin.proto.core.CoreProto.GroupWeb.Builder, com.akaxin.proto.core.CoreProto.GroupWebOrBuilder> + getGroupWebFieldBuilder() { + if (groupWebBuilder_ == null) { + groupWebBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupWeb, com.akaxin.proto.core.CoreProto.GroupWeb.Builder, com.akaxin.proto.core.CoreProto.GroupWebOrBuilder>( + getGroupWeb(), + getParentForChildren(), + isClean()); + groupWeb_ = null; + } + return groupWebBuilder_; + } + + private com.akaxin.proto.core.CoreProto.U2WebNotice u2WebNotice_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2WebNotice, com.akaxin.proto.core.CoreProto.U2WebNotice.Builder, com.akaxin.proto.core.CoreProto.U2WebNoticeOrBuilder> u2WebNoticeBuilder_; + /** + *
+       *web通知消息
+       * 
+ * + * .core.U2WebNotice u2WebNotice = 24; + */ + public boolean hasU2WebNotice() { + return u2WebNoticeBuilder_ != null || u2WebNotice_ != null; + } + /** + *
+       *web通知消息
+       * 
+ * + * .core.U2WebNotice u2WebNotice = 24; + */ + public com.akaxin.proto.core.CoreProto.U2WebNotice getU2WebNotice() { + if (u2WebNoticeBuilder_ == null) { + return u2WebNotice_ == null ? com.akaxin.proto.core.CoreProto.U2WebNotice.getDefaultInstance() : u2WebNotice_; + } else { + return u2WebNoticeBuilder_.getMessage(); + } + } + /** + *
+       *web通知消息
+       * 
+ * + * .core.U2WebNotice u2WebNotice = 24; + */ + public Builder setU2WebNotice(com.akaxin.proto.core.CoreProto.U2WebNotice value) { + if (u2WebNoticeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + u2WebNotice_ = value; + onChanged(); + } else { + u2WebNoticeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *web通知消息
+       * 
+ * + * .core.U2WebNotice u2WebNotice = 24; + */ + public Builder setU2WebNotice( + com.akaxin.proto.core.CoreProto.U2WebNotice.Builder builderForValue) { + if (u2WebNoticeBuilder_ == null) { + u2WebNotice_ = builderForValue.build(); + onChanged(); + } else { + u2WebNoticeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *web通知消息
+       * 
+ * + * .core.U2WebNotice u2WebNotice = 24; + */ + public Builder mergeU2WebNotice(com.akaxin.proto.core.CoreProto.U2WebNotice value) { + if (u2WebNoticeBuilder_ == null) { + if (u2WebNotice_ != null) { + u2WebNotice_ = + com.akaxin.proto.core.CoreProto.U2WebNotice.newBuilder(u2WebNotice_).mergeFrom(value).buildPartial(); + } else { + u2WebNotice_ = value; + } + onChanged(); + } else { + u2WebNoticeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *web通知消息
+       * 
+ * + * .core.U2WebNotice u2WebNotice = 24; + */ + public Builder clearU2WebNotice() { + if (u2WebNoticeBuilder_ == null) { + u2WebNotice_ = null; + onChanged(); + } else { + u2WebNotice_ = null; + u2WebNoticeBuilder_ = null; + } + + return this; + } + /** + *
+       *web通知消息
+       * 
+ * + * .core.U2WebNotice u2WebNotice = 24; + */ + public com.akaxin.proto.core.CoreProto.U2WebNotice.Builder getU2WebNoticeBuilder() { + + onChanged(); + return getU2WebNoticeFieldBuilder().getBuilder(); + } + /** + *
+       *web通知消息
+       * 
+ * + * .core.U2WebNotice u2WebNotice = 24; + */ + public com.akaxin.proto.core.CoreProto.U2WebNoticeOrBuilder getU2WebNoticeOrBuilder() { + if (u2WebNoticeBuilder_ != null) { + return u2WebNoticeBuilder_.getMessageOrBuilder(); + } else { + return u2WebNotice_ == null ? + com.akaxin.proto.core.CoreProto.U2WebNotice.getDefaultInstance() : u2WebNotice_; + } + } + /** + *
+       *web通知消息
+       * 
+ * + * .core.U2WebNotice u2WebNotice = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2WebNotice, com.akaxin.proto.core.CoreProto.U2WebNotice.Builder, com.akaxin.proto.core.CoreProto.U2WebNoticeOrBuilder> + getU2WebNoticeFieldBuilder() { + if (u2WebNoticeBuilder_ == null) { + u2WebNoticeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.U2WebNotice, com.akaxin.proto.core.CoreProto.U2WebNotice.Builder, com.akaxin.proto.core.CoreProto.U2WebNoticeOrBuilder>( + getU2WebNotice(), + getParentForChildren(), + isClean()); + u2WebNotice_ = null; + } + return u2WebNoticeBuilder_; + } + + private com.akaxin.proto.core.CoreProto.GroupWebNotice groupWebNotice_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupWebNotice, com.akaxin.proto.core.CoreProto.GroupWebNotice.Builder, com.akaxin.proto.core.CoreProto.GroupWebNoticeOrBuilder> groupWebNoticeBuilder_; + /** + *
+       *群组web通知消息
+       * 
+ * + * .core.GroupWebNotice groupWebNotice = 25; + */ + public boolean hasGroupWebNotice() { + return groupWebNoticeBuilder_ != null || groupWebNotice_ != null; + } + /** + *
+       *群组web通知消息
+       * 
+ * + * .core.GroupWebNotice groupWebNotice = 25; + */ + public com.akaxin.proto.core.CoreProto.GroupWebNotice getGroupWebNotice() { + if (groupWebNoticeBuilder_ == null) { + return groupWebNotice_ == null ? com.akaxin.proto.core.CoreProto.GroupWebNotice.getDefaultInstance() : groupWebNotice_; + } else { + return groupWebNoticeBuilder_.getMessage(); + } + } + /** + *
+       *群组web通知消息
+       * 
+ * + * .core.GroupWebNotice groupWebNotice = 25; + */ + public Builder setGroupWebNotice(com.akaxin.proto.core.CoreProto.GroupWebNotice value) { + if (groupWebNoticeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupWebNotice_ = value; + onChanged(); + } else { + groupWebNoticeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       *群组web通知消息
+       * 
+ * + * .core.GroupWebNotice groupWebNotice = 25; + */ + public Builder setGroupWebNotice( + com.akaxin.proto.core.CoreProto.GroupWebNotice.Builder builderForValue) { + if (groupWebNoticeBuilder_ == null) { + groupWebNotice_ = builderForValue.build(); + onChanged(); + } else { + groupWebNoticeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       *群组web通知消息
+       * 
+ * + * .core.GroupWebNotice groupWebNotice = 25; + */ + public Builder mergeGroupWebNotice(com.akaxin.proto.core.CoreProto.GroupWebNotice value) { + if (groupWebNoticeBuilder_ == null) { + if (groupWebNotice_ != null) { + groupWebNotice_ = + com.akaxin.proto.core.CoreProto.GroupWebNotice.newBuilder(groupWebNotice_).mergeFrom(value).buildPartial(); + } else { + groupWebNotice_ = value; + } + onChanged(); + } else { + groupWebNoticeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       *群组web通知消息
+       * 
+ * + * .core.GroupWebNotice groupWebNotice = 25; + */ + public Builder clearGroupWebNotice() { + if (groupWebNoticeBuilder_ == null) { + groupWebNotice_ = null; + onChanged(); + } else { + groupWebNotice_ = null; + groupWebNoticeBuilder_ = null; + } + + return this; + } + /** + *
+       *群组web通知消息
+       * 
+ * + * .core.GroupWebNotice groupWebNotice = 25; + */ + public com.akaxin.proto.core.CoreProto.GroupWebNotice.Builder getGroupWebNoticeBuilder() { + + onChanged(); + return getGroupWebNoticeFieldBuilder().getBuilder(); + } + /** + *
+       *群组web通知消息
+       * 
+ * + * .core.GroupWebNotice groupWebNotice = 25; + */ + public com.akaxin.proto.core.CoreProto.GroupWebNoticeOrBuilder getGroupWebNoticeOrBuilder() { + if (groupWebNoticeBuilder_ != null) { + return groupWebNoticeBuilder_.getMessageOrBuilder(); + } else { + return groupWebNotice_ == null ? + com.akaxin.proto.core.CoreProto.GroupWebNotice.getDefaultInstance() : groupWebNotice_; + } + } + /** + *
+       *群组web通知消息
+       * 
+ * + * .core.GroupWebNotice groupWebNotice = 25; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupWebNotice, com.akaxin.proto.core.CoreProto.GroupWebNotice.Builder, com.akaxin.proto.core.CoreProto.GroupWebNoticeOrBuilder> + getGroupWebNoticeFieldBuilder() { + if (groupWebNoticeBuilder_ == null) { + groupWebNoticeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.akaxin.proto.core.CoreProto.GroupWebNotice, com.akaxin.proto.core.CoreProto.GroupWebNotice.Builder, com.akaxin.proto.core.CoreProto.GroupWebNoticeOrBuilder>( + getGroupWebNotice(), + getParentForChildren(), + isClean()); + groupWebNotice_ = null; + } + return groupWebNoticeBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ImCtsMessageRequest) + } + + // @@protoc_insertion_point(class_scope:site.ImCtsMessageRequest) + private static final com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest(); + } + + public static com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImCtsMessageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImCtsMessageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ImCtsMessageProto.ImCtsMessageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ImCtsMessageRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ImCtsMessageRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031site/im_cts_message.proto\022\004site\032\017core/" + + "core.proto\"\330\007\n\023ImCtsMessageRequest\022\033\n\004ty" + + "pe\030\001 \001(\0162\r.core.MsgType\022\033\n\004text\030\002 \001(\0132\r." + + "core.MsgText\022\'\n\nsecretText\030\003 \001(\0132\023.core." + + "MsgSecretText\022\"\n\tgroupText\030\004 \001(\0132\017.core." + + "GroupText\022.\n\017groupSecretText\030\005 \001(\0132\025.cor" + + "e.GroupSecretText\022\035\n\005image\030\006 \001(\0132\016.core." + + "MsgImage\022)\n\013secretImage\030\007 \001(\0132\024.core.Msg" + + "SecretImage\022$\n\ngroupImage\030\010 \001(\0132\020.core.G" + + "roupImage\0220\n\020groupSecretImage\030\t \001(\0132\026.co" + + "re.GroupSecretImage\022\035\n\005voice\030\n \001(\0132\016.cor" + + "e.MsgVoice\022)\n\013secretVoice\030\013 \001(\0132\024.core.M" + + "sgSecretVoice\022$\n\ngroupVoice\030\014 \001(\0132\020.core" + + ".GroupVoice\0220\n\020groupSecretVoice\030\r \001(\0132\026." + + "core.GroupSecretVoice\022\032\n\005u2Map\030\016 \001(\0132\013.c" + + "ore.U2Map\022&\n\013u2SecretMap\030\017 \001(\0132\021.core.U2" + + "SecretMap\022 \n\010groupMap\030\020 \001(\0132\016.core.Group" + + "Map\022,\n\016groupSecretMap\030\021 \001(\0132\024.core.Group" + + "SecretMap\022&\n\013u2MsgNotice\030\022 \001(\0132\021.core.U2" + + "MsgNotice\022,\n\016groupMsgNotice\030\023 \001(\0132\024.core" + + ".GroupMsgNotice\022 \n\010u2Recall\030\024 \001(\0132\016.core" + + ".U2Recall\022&\n\013groupRecall\030\025 \001(\0132\021.core.Gr" + + "oupRecall\022\032\n\005u2Web\030\026 \001(\0132\013.core.U2Web\022 \n" + + "\010groupWeb\030\027 \001(\0132\016.core.GroupWeb\022&\n\013u2Web" + + "Notice\030\030 \001(\0132\021.core.U2WebNotice\022,\n\016group" + + "WebNotice\030\031 \001(\0132\024.core.GroupWebNotice2O\n" + + "\023ImCtsMessageService\0228\n\007message\022\031.site.I" + + "mCtsMessageRequest\032\022.core.NoneResponseB*" + + "\n\025com.akaxin.proto.siteB\021ImCtsMessagePro" + + "tob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.CoreProto.getDescriptor(), + }, assigner); + internal_static_site_ImCtsMessageRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ImCtsMessageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ImCtsMessageRequest_descriptor, + new java.lang.String[] { "Type", "Text", "SecretText", "GroupText", "GroupSecretText", "Image", "SecretImage", "GroupImage", "GroupSecretImage", "Voice", "SecretVoice", "GroupVoice", "GroupSecretVoice", "U2Map", "U2SecretMap", "GroupMap", "GroupSecretMap", "U2MsgNotice", "GroupMsgNotice", "U2Recall", "GroupRecall", "U2Web", "GroupWeb", "U2WebNotice", "GroupWebNotice", }); + com.akaxin.proto.core.CoreProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImCtsPingProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImCtsPingProto.java new file mode 100755 index 0000000..cabd05a --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImCtsPingProto.java @@ -0,0 +1,455 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/im_cts_ping.proto + +package com.akaxin.proto.site; + +public final class ImCtsPingProto { + private ImCtsPingProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ImCtsPingRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:client.ImCtsPingRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   *ping操作不需要request实体
+   * 
+ * + * Protobuf type {@code client.ImCtsPingRequest} + */ + public static final class ImCtsPingRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:client.ImCtsPingRequest) + ImCtsPingRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImCtsPingRequest.newBuilder() to construct. + private ImCtsPingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImCtsPingRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImCtsPingRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImCtsPingProto.internal_static_client_ImCtsPingRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImCtsPingProto.internal_static_client_ImCtsPingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest.class, com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest other = (com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *ping操作不需要request实体
+     * 
+ * + * Protobuf type {@code client.ImCtsPingRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:client.ImCtsPingRequest) + com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImCtsPingProto.internal_static_client_ImCtsPingRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImCtsPingProto.internal_static_client_ImCtsPingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest.class, com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ImCtsPingProto.internal_static_client_ImCtsPingRequest_descriptor; + } + + public com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest build() { + com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest buildPartial() { + com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest result = new com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest) { + return mergeFrom((com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest other) { + if (other == com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:client.ImCtsPingRequest) + } + + // @@protoc_insertion_point(class_scope:client.ImCtsPingRequest) + private static final com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest(); + } + + public static com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImCtsPingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImCtsPingRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ImCtsPingProto.ImCtsPingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_client_ImCtsPingRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_client_ImCtsPingRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026site/im_cts_ping.proto\022\006client\032\017core/c" + + "ore.proto\"\022\n\020ImCtsPingRequest2H\n\020ImCtsPi" + + "ngService\0224\n\004ping\022\030.client.ImCtsPingRequ" + + "est\032\022.core.NoneResponseB\'\n\025com.akaxin.pr" + + "oto.siteB\016ImCtsPingProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.CoreProto.getDescriptor(), + }, assigner); + internal_static_client_ImCtsPingRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_client_ImCtsPingRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_client_ImCtsPingRequest_descriptor, + new java.lang.String[] { }); + com.akaxin.proto.core.CoreProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImSiteAuthProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImSiteAuthProto.java new file mode 100755 index 0000000..ee59aae --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImSiteAuthProto.java @@ -0,0 +1,1366 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/im_site_auth.proto + +package com.akaxin.proto.site; + +public final class ImSiteAuthProto { + private ImSiteAuthProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ImSiteAuthRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ImSiteAuthRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *用户个人ID
+     * 
+ * + * string site_user_id = 1; + */ + java.lang.String getSiteUserId(); + /** + *
+     *用户个人ID
+     * 
+ * + * string site_user_id = 1; + */ + com.google.protobuf.ByteString + getSiteUserIdBytes(); + + /** + *
+     *用户认证sessionID
+     * 
+ * + * string site_session_id = 2; + */ + java.lang.String getSiteSessionId(); + /** + *
+     *用户认证sessionID
+     * 
+ * + * string site_session_id = 2; + */ + com.google.protobuf.ByteString + getSiteSessionIdBytes(); + } + /** + * Protobuf type {@code site.ImSiteAuthRequest} + */ + public static final class ImSiteAuthRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ImSiteAuthRequest) + ImSiteAuthRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImSiteAuthRequest.newBuilder() to construct. + private ImSiteAuthRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImSiteAuthRequest() { + siteUserId_ = ""; + siteSessionId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImSiteAuthRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteUserId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + siteSessionId_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImSiteAuthProto.internal_static_site_ImSiteAuthRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImSiteAuthProto.internal_static_site_ImSiteAuthRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest.class, com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest.Builder.class); + } + + public static final int SITE_USER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object siteUserId_; + /** + *
+     *用户个人ID
+     * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } + } + /** + *
+     *用户个人ID
+     * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_SESSION_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object siteSessionId_; + /** + *
+     *用户认证sessionID
+     * 
+ * + * string site_session_id = 2; + */ + public java.lang.String getSiteSessionId() { + java.lang.Object ref = siteSessionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteSessionId_ = s; + return s; + } + } + /** + *
+     *用户认证sessionID
+     * 
+ * + * string site_session_id = 2; + */ + public com.google.protobuf.ByteString + getSiteSessionIdBytes() { + java.lang.Object ref = siteSessionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteSessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteUserId_); + } + if (!getSiteSessionIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteSessionId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteUserId_); + } + if (!getSiteSessionIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteSessionId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest other = (com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest) obj; + + boolean result = true; + result = result && getSiteUserId() + .equals(other.getSiteUserId()); + result = result && getSiteSessionId() + .equals(other.getSiteSessionId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteUserId().hashCode(); + hash = (37 * hash) + SITE_SESSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteSessionId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ImSiteAuthRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ImSiteAuthRequest) + com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImSiteAuthProto.internal_static_site_ImSiteAuthRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImSiteAuthProto.internal_static_site_ImSiteAuthRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest.class, com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteUserId_ = ""; + + siteSessionId_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ImSiteAuthProto.internal_static_site_ImSiteAuthRequest_descriptor; + } + + public com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest build() { + com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest buildPartial() { + com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest result = new com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest(this); + result.siteUserId_ = siteUserId_; + result.siteSessionId_ = siteSessionId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest) { + return mergeFrom((com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest other) { + if (other == com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest.getDefaultInstance()) return this; + if (!other.getSiteUserId().isEmpty()) { + siteUserId_ = other.siteUserId_; + onChanged(); + } + if (!other.getSiteSessionId().isEmpty()) { + siteSessionId_ = other.siteSessionId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteUserId_ = ""; + /** + *
+       *用户个人ID
+       * 
+ * + * string site_user_id = 1; + */ + public java.lang.String getSiteUserId() { + java.lang.Object ref = siteUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户个人ID
+       * 
+ * + * string site_user_id = 1; + */ + public com.google.protobuf.ByteString + getSiteUserIdBytes() { + java.lang.Object ref = siteUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户个人ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteUserId_ = value; + onChanged(); + return this; + } + /** + *
+       *用户个人ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder clearSiteUserId() { + + siteUserId_ = getDefaultInstance().getSiteUserId(); + onChanged(); + return this; + } + /** + *
+       *用户个人ID
+       * 
+ * + * string site_user_id = 1; + */ + public Builder setSiteUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteUserId_ = value; + onChanged(); + return this; + } + + private java.lang.Object siteSessionId_ = ""; + /** + *
+       *用户认证sessionID
+       * 
+ * + * string site_session_id = 2; + */ + public java.lang.String getSiteSessionId() { + java.lang.Object ref = siteSessionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteSessionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *用户认证sessionID
+       * 
+ * + * string site_session_id = 2; + */ + public com.google.protobuf.ByteString + getSiteSessionIdBytes() { + java.lang.Object ref = siteSessionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteSessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *用户认证sessionID
+       * 
+ * + * string site_session_id = 2; + */ + public Builder setSiteSessionId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteSessionId_ = value; + onChanged(); + return this; + } + /** + *
+       *用户认证sessionID
+       * 
+ * + * string site_session_id = 2; + */ + public Builder clearSiteSessionId() { + + siteSessionId_ = getDefaultInstance().getSiteSessionId(); + onChanged(); + return this; + } + /** + *
+       *用户认证sessionID
+       * 
+ * + * string site_session_id = 2; + */ + public Builder setSiteSessionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteSessionId_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ImSiteAuthRequest) + } + + // @@protoc_insertion_point(class_scope:site.ImSiteAuthRequest) + private static final com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest(); + } + + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImSiteAuthRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImSiteAuthRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ImSiteAuthResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ImSiteAuthResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *服务站点的地址
+     * 
+ * + * string site_server = 1; + */ + java.lang.String getSiteServer(); + /** + *
+     *服务站点的地址
+     * 
+ * + * string site_server = 1; + */ + com.google.protobuf.ByteString + getSiteServerBytes(); + } + /** + * Protobuf type {@code site.ImSiteAuthResponse} + */ + public static final class ImSiteAuthResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ImSiteAuthResponse) + ImSiteAuthResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImSiteAuthResponse.newBuilder() to construct. + private ImSiteAuthResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImSiteAuthResponse() { + siteServer_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImSiteAuthResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteServer_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImSiteAuthProto.internal_static_site_ImSiteAuthResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImSiteAuthProto.internal_static_site_ImSiteAuthResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse.class, com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse.Builder.class); + } + + public static final int SITE_SERVER_FIELD_NUMBER = 1; + private volatile java.lang.Object siteServer_; + /** + *
+     *服务站点的地址
+     * 
+ * + * string site_server = 1; + */ + public java.lang.String getSiteServer() { + java.lang.Object ref = siteServer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteServer_ = s; + return s; + } + } + /** + *
+     *服务站点的地址
+     * 
+ * + * string site_server = 1; + */ + public com.google.protobuf.ByteString + getSiteServerBytes() { + java.lang.Object ref = siteServer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteServer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteServerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteServer_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteServerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteServer_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse other = (com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse) obj; + + boolean result = true; + result = result && getSiteServer() + .equals(other.getSiteServer()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getSiteServer().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ImSiteAuthResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ImSiteAuthResponse) + com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImSiteAuthProto.internal_static_site_ImSiteAuthResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImSiteAuthProto.internal_static_site_ImSiteAuthResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse.class, com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteServer_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ImSiteAuthProto.internal_static_site_ImSiteAuthResponse_descriptor; + } + + public com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse build() { + com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse buildPartial() { + com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse result = new com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse(this); + result.siteServer_ = siteServer_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse) { + return mergeFrom((com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse other) { + if (other == com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse.getDefaultInstance()) return this; + if (!other.getSiteServer().isEmpty()) { + siteServer_ = other.siteServer_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteServer_ = ""; + /** + *
+       *服务站点的地址
+       * 
+ * + * string site_server = 1; + */ + public java.lang.String getSiteServer() { + java.lang.Object ref = siteServer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteServer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *服务站点的地址
+       * 
+ * + * string site_server = 1; + */ + public com.google.protobuf.ByteString + getSiteServerBytes() { + java.lang.Object ref = siteServer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteServer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *服务站点的地址
+       * 
+ * + * string site_server = 1; + */ + public Builder setSiteServer( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteServer_ = value; + onChanged(); + return this; + } + /** + *
+       *服务站点的地址
+       * 
+ * + * string site_server = 1; + */ + public Builder clearSiteServer() { + + siteServer_ = getDefaultInstance().getSiteServer(); + onChanged(); + return this; + } + /** + *
+       *服务站点的地址
+       * 
+ * + * string site_server = 1; + */ + public Builder setSiteServerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteServer_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ImSiteAuthResponse) + } + + // @@protoc_insertion_point(class_scope:site.ImSiteAuthResponse) + private static final com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse(); + } + + public static com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImSiteAuthResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImSiteAuthResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ImSiteAuthProto.ImSiteAuthResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ImSiteAuthRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ImSiteAuthRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ImSiteAuthResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ImSiteAuthResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\027site/im_site_auth.proto\022\004site\"B\n\021ImSit" + + "eAuthRequest\022\024\n\014site_user_id\030\001 \001(\t\022\027\n\017si" + + "te_session_id\030\002 \001(\t\")\n\022ImSiteAuthRespons" + + "e\022\023\n\013site_server\030\001 \001(\t2N\n\021ImSiteAuthServ" + + "ice\0229\n\004auth\022\027.site.ImSiteAuthRequest\032\030.s" + + "ite.ImSiteAuthResponseB(\n\025com.akaxin.pro" + + "to.siteB\017ImSiteAuthProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ImSiteAuthRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ImSiteAuthRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ImSiteAuthRequest_descriptor, + new java.lang.String[] { "SiteUserId", "SiteSessionId", }); + internal_static_site_ImSiteAuthResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ImSiteAuthResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ImSiteAuthResponse_descriptor, + new java.lang.String[] { "SiteServer", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImSiteHelloProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImSiteHelloProto.java new file mode 100755 index 0000000..efa3bb4 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImSiteHelloProto.java @@ -0,0 +1,1193 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/im_site_hello.proto + +package com.akaxin.proto.site; + +public final class ImSiteHelloProto { + private ImSiteHelloProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ImSiteHelloRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ImSiteHelloRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *客户端版本号
+     * 
+ * + * string client_version = 1; + */ + java.lang.String getClientVersion(); + /** + *
+     *客户端版本号
+     * 
+ * + * string client_version = 1; + */ + com.google.protobuf.ByteString + getClientVersionBytes(); + } + /** + * Protobuf type {@code site.ImSiteHelloRequest} + */ + public static final class ImSiteHelloRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ImSiteHelloRequest) + ImSiteHelloRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImSiteHelloRequest.newBuilder() to construct. + private ImSiteHelloRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImSiteHelloRequest() { + clientVersion_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImSiteHelloRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + clientVersion_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImSiteHelloProto.internal_static_site_ImSiteHelloRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImSiteHelloProto.internal_static_site_ImSiteHelloRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest.class, com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest.Builder.class); + } + + public static final int CLIENT_VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object clientVersion_; + /** + *
+     *客户端版本号
+     * 
+ * + * string client_version = 1; + */ + public java.lang.String getClientVersion() { + java.lang.Object ref = clientVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientVersion_ = s; + return s; + } + } + /** + *
+     *客户端版本号
+     * 
+ * + * string client_version = 1; + */ + public com.google.protobuf.ByteString + getClientVersionBytes() { + java.lang.Object ref = clientVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + clientVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getClientVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clientVersion_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getClientVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clientVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest other = (com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest) obj; + + boolean result = true; + result = result && getClientVersion() + .equals(other.getClientVersion()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CLIENT_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getClientVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ImSiteHelloRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ImSiteHelloRequest) + com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImSiteHelloProto.internal_static_site_ImSiteHelloRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImSiteHelloProto.internal_static_site_ImSiteHelloRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest.class, com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + clientVersion_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ImSiteHelloProto.internal_static_site_ImSiteHelloRequest_descriptor; + } + + public com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest build() { + com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest buildPartial() { + com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest result = new com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest(this); + result.clientVersion_ = clientVersion_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest) { + return mergeFrom((com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest other) { + if (other == com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest.getDefaultInstance()) return this; + if (!other.getClientVersion().isEmpty()) { + clientVersion_ = other.clientVersion_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object clientVersion_ = ""; + /** + *
+       *客户端版本号
+       * 
+ * + * string client_version = 1; + */ + public java.lang.String getClientVersion() { + java.lang.Object ref = clientVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *客户端版本号
+       * 
+ * + * string client_version = 1; + */ + public com.google.protobuf.ByteString + getClientVersionBytes() { + java.lang.Object ref = clientVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + clientVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *客户端版本号
+       * 
+ * + * string client_version = 1; + */ + public Builder setClientVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + clientVersion_ = value; + onChanged(); + return this; + } + /** + *
+       *客户端版本号
+       * 
+ * + * string client_version = 1; + */ + public Builder clearClientVersion() { + + clientVersion_ = getDefaultInstance().getClientVersion(); + onChanged(); + return this; + } + /** + *
+       *客户端版本号
+       * 
+ * + * string client_version = 1; + */ + public Builder setClientVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + clientVersion_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ImSiteHelloRequest) + } + + // @@protoc_insertion_point(class_scope:site.ImSiteHelloRequest) + private static final com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest(); + } + + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImSiteHelloRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImSiteHelloRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ImSiteHelloResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ImSiteHelloResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *站点端版本号
+     * 
+ * + * string site_version = 1; + */ + java.lang.String getSiteVersion(); + /** + *
+     *站点端版本号
+     * 
+ * + * string site_version = 1; + */ + com.google.protobuf.ByteString + getSiteVersionBytes(); + } + /** + * Protobuf type {@code site.ImSiteHelloResponse} + */ + public static final class ImSiteHelloResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ImSiteHelloResponse) + ImSiteHelloResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImSiteHelloResponse.newBuilder() to construct. + private ImSiteHelloResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImSiteHelloResponse() { + siteVersion_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImSiteHelloResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + siteVersion_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImSiteHelloProto.internal_static_site_ImSiteHelloResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImSiteHelloProto.internal_static_site_ImSiteHelloResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse.class, com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse.Builder.class); + } + + public static final int SITE_VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object siteVersion_; + /** + *
+     *站点端版本号
+     * 
+ * + * string site_version = 1; + */ + public java.lang.String getSiteVersion() { + java.lang.Object ref = siteVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteVersion_ = s; + return s; + } + } + /** + *
+     *站点端版本号
+     * 
+ * + * string site_version = 1; + */ + public com.google.protobuf.ByteString + getSiteVersionBytes() { + java.lang.Object ref = siteVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSiteVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteVersion_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSiteVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse)) { + return super.equals(obj); + } + com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse other = (com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse) obj; + + boolean result = true; + result = result && getSiteVersion() + .equals(other.getSiteVersion()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getSiteVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ImSiteHelloResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ImSiteHelloResponse) + com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImSiteHelloProto.internal_static_site_ImSiteHelloResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImSiteHelloProto.internal_static_site_ImSiteHelloResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse.class, com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse.Builder.class); + } + + // Construct using com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + siteVersion_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ImSiteHelloProto.internal_static_site_ImSiteHelloResponse_descriptor; + } + + public com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse getDefaultInstanceForType() { + return com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse.getDefaultInstance(); + } + + public com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse build() { + com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse buildPartial() { + com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse result = new com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse(this); + result.siteVersion_ = siteVersion_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse) { + return mergeFrom((com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse other) { + if (other == com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse.getDefaultInstance()) return this; + if (!other.getSiteVersion().isEmpty()) { + siteVersion_ = other.siteVersion_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object siteVersion_ = ""; + /** + *
+       *站点端版本号
+       * 
+ * + * string site_version = 1; + */ + public java.lang.String getSiteVersion() { + java.lang.Object ref = siteVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *站点端版本号
+       * 
+ * + * string site_version = 1; + */ + public com.google.protobuf.ByteString + getSiteVersionBytes() { + java.lang.Object ref = siteVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *站点端版本号
+       * 
+ * + * string site_version = 1; + */ + public Builder setSiteVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + siteVersion_ = value; + onChanged(); + return this; + } + /** + *
+       *站点端版本号
+       * 
+ * + * string site_version = 1; + */ + public Builder clearSiteVersion() { + + siteVersion_ = getDefaultInstance().getSiteVersion(); + onChanged(); + return this; + } + /** + *
+       *站点端版本号
+       * 
+ * + * string site_version = 1; + */ + public Builder setSiteVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + siteVersion_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ImSiteHelloResponse) + } + + // @@protoc_insertion_point(class_scope:site.ImSiteHelloResponse) + private static final com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse(); + } + + public static com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImSiteHelloResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImSiteHelloResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ImSiteHelloProto.ImSiteHelloResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ImSiteHelloRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ImSiteHelloRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ImSiteHelloResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ImSiteHelloResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\030site/im_site_hello.proto\022\004site\",\n\022ImSi" + + "teHelloRequest\022\026\n\016client_version\030\001 \001(\t\"+" + + "\n\023ImSiteHelloResponse\022\024\n\014site_version\030\001 " + + "\001(\t2R\n\022ImSiteHelloService\022<\n\005hello\022\030.sit" + + "e.ImSiteHelloRequest\032\031.site.ImSiteHelloR" + + "esponseB)\n\025com.akaxin.proto.siteB\020ImSite" + + "HelloProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_site_ImSiteHelloRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ImSiteHelloRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ImSiteHelloRequest_descriptor, + new java.lang.String[] { "ClientVersion", }); + internal_static_site_ImSiteHelloResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_site_ImSiteHelloResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ImSiteHelloResponse_descriptor, + new java.lang.String[] { "SiteVersion", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImSyncFinishProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImSyncFinishProto.java new file mode 100755 index 0000000..990ee69 --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImSyncFinishProto.java @@ -0,0 +1,922 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/im_sync_finish.proto + +package com.akaxin.proto.site; + +public final class ImSyncFinishProto { + private ImSyncFinishProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ImSyncFinishRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ImSyncFinishRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *二人消息游标
+     * 
+ * + * int64 u2_pointer = 1; + */ + long getU2Pointer(); + + /** + *
+     *群组消息游标
+     * 
+ * + * map<string, int64> groups_pointer = 2; + */ + int getGroupsPointerCount(); + /** + *
+     *群组消息游标
+     * 
+ * + * map<string, int64> groups_pointer = 2; + */ + boolean containsGroupsPointer( + java.lang.String key); + /** + * Use {@link #getGroupsPointerMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getGroupsPointer(); + /** + *
+     *群组消息游标
+     * 
+ * + * map<string, int64> groups_pointer = 2; + */ + java.util.Map + getGroupsPointerMap(); + /** + *
+     *群组消息游标
+     * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + long getGroupsPointerOrDefault( + java.lang.String key, + long defaultValue); + /** + *
+     *群组消息游标
+     * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + long getGroupsPointerOrThrow( + java.lang.String key); + } + /** + * Protobuf type {@code site.ImSyncFinishRequest} + */ + public static final class ImSyncFinishRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ImSyncFinishRequest) + ImSyncFinishRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImSyncFinishRequest.newBuilder() to construct. + private ImSyncFinishRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImSyncFinishRequest() { + u2Pointer_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImSyncFinishRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + u2Pointer_ = input.readInt64(); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + groupsPointer_ = com.google.protobuf.MapField.newMapField( + GroupsPointerDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + groupsPointer__ = input.readMessage( + GroupsPointerDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + groupsPointer_.getMutableMap().put( + groupsPointer__.getKey(), groupsPointer__.getValue()); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImSyncFinishProto.internal_static_site_ImSyncFinishRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetGroupsPointer(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImSyncFinishProto.internal_static_site_ImSyncFinishRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest.class, com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest.Builder.class); + } + + private int bitField0_; + public static final int U2_POINTER_FIELD_NUMBER = 1; + private long u2Pointer_; + /** + *
+     *二人消息游标
+     * 
+ * + * int64 u2_pointer = 1; + */ + public long getU2Pointer() { + return u2Pointer_; + } + + public static final int GROUPS_POINTER_FIELD_NUMBER = 2; + private static final class GroupsPointerDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.Long> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.akaxin.proto.site.ImSyncFinishProto.internal_static_site_ImSyncFinishRequest_GroupsPointerEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.INT64, + 0L); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.Long> groupsPointer_; + private com.google.protobuf.MapField + internalGetGroupsPointer() { + if (groupsPointer_ == null) { + return com.google.protobuf.MapField.emptyMapField( + GroupsPointerDefaultEntryHolder.defaultEntry); + } + return groupsPointer_; + } + + public int getGroupsPointerCount() { + return internalGetGroupsPointer().getMap().size(); + } + /** + *
+     *群组消息游标
+     * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public boolean containsGroupsPointer( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetGroupsPointer().getMap().containsKey(key); + } + /** + * Use {@link #getGroupsPointerMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getGroupsPointer() { + return getGroupsPointerMap(); + } + /** + *
+     *群组消息游标
+     * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public java.util.Map getGroupsPointerMap() { + return internalGetGroupsPointer().getMap(); + } + /** + *
+     *群组消息游标
+     * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public long getGroupsPointerOrDefault( + java.lang.String key, + long defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetGroupsPointer().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     *群组消息游标
+     * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public long getGroupsPointerOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetGroupsPointer().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (u2Pointer_ != 0L) { + output.writeInt64(1, u2Pointer_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetGroupsPointer(), + GroupsPointerDefaultEntryHolder.defaultEntry, + 2); + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (u2Pointer_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, u2Pointer_); + } + for (java.util.Map.Entry entry + : internalGetGroupsPointer().getMap().entrySet()) { + com.google.protobuf.MapEntry + groupsPointer__ = GroupsPointerDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, groupsPointer__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest other = (com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest) obj; + + boolean result = true; + result = result && (getU2Pointer() + == other.getU2Pointer()); + result = result && internalGetGroupsPointer().equals( + other.internalGetGroupsPointer()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + U2_POINTER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getU2Pointer()); + if (!internalGetGroupsPointer().getMap().isEmpty()) { + hash = (37 * hash) + GROUPS_POINTER_FIELD_NUMBER; + hash = (53 * hash) + internalGetGroupsPointer().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ImSyncFinishRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ImSyncFinishRequest) + com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImSyncFinishProto.internal_static_site_ImSyncFinishRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetGroupsPointer(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableGroupsPointer(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImSyncFinishProto.internal_static_site_ImSyncFinishRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest.class, com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + u2Pointer_ = 0L; + + internalGetMutableGroupsPointer().clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ImSyncFinishProto.internal_static_site_ImSyncFinishRequest_descriptor; + } + + public com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest build() { + com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest buildPartial() { + com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest result = new com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.u2Pointer_ = u2Pointer_; + result.groupsPointer_ = internalGetGroupsPointer(); + result.groupsPointer_.makeImmutable(); + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest) { + return mergeFrom((com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest other) { + if (other == com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest.getDefaultInstance()) return this; + if (other.getU2Pointer() != 0L) { + setU2Pointer(other.getU2Pointer()); + } + internalGetMutableGroupsPointer().mergeFrom( + other.internalGetGroupsPointer()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long u2Pointer_ ; + /** + *
+       *二人消息游标
+       * 
+ * + * int64 u2_pointer = 1; + */ + public long getU2Pointer() { + return u2Pointer_; + } + /** + *
+       *二人消息游标
+       * 
+ * + * int64 u2_pointer = 1; + */ + public Builder setU2Pointer(long value) { + + u2Pointer_ = value; + onChanged(); + return this; + } + /** + *
+       *二人消息游标
+       * 
+ * + * int64 u2_pointer = 1; + */ + public Builder clearU2Pointer() { + + u2Pointer_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.Long> groupsPointer_; + private com.google.protobuf.MapField + internalGetGroupsPointer() { + if (groupsPointer_ == null) { + return com.google.protobuf.MapField.emptyMapField( + GroupsPointerDefaultEntryHolder.defaultEntry); + } + return groupsPointer_; + } + private com.google.protobuf.MapField + internalGetMutableGroupsPointer() { + onChanged();; + if (groupsPointer_ == null) { + groupsPointer_ = com.google.protobuf.MapField.newMapField( + GroupsPointerDefaultEntryHolder.defaultEntry); + } + if (!groupsPointer_.isMutable()) { + groupsPointer_ = groupsPointer_.copy(); + } + return groupsPointer_; + } + + public int getGroupsPointerCount() { + return internalGetGroupsPointer().getMap().size(); + } + /** + *
+       *群组消息游标
+       * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public boolean containsGroupsPointer( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetGroupsPointer().getMap().containsKey(key); + } + /** + * Use {@link #getGroupsPointerMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getGroupsPointer() { + return getGroupsPointerMap(); + } + /** + *
+       *群组消息游标
+       * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public java.util.Map getGroupsPointerMap() { + return internalGetGroupsPointer().getMap(); + } + /** + *
+       *群组消息游标
+       * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public long getGroupsPointerOrDefault( + java.lang.String key, + long defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetGroupsPointer().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       *群组消息游标
+       * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public long getGroupsPointerOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetGroupsPointer().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearGroupsPointer() { + internalGetMutableGroupsPointer().getMutableMap() + .clear(); + return this; + } + /** + *
+       *群组消息游标
+       * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public Builder removeGroupsPointer( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableGroupsPointer().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableGroupsPointer() { + return internalGetMutableGroupsPointer().getMutableMap(); + } + /** + *
+       *群组消息游标
+       * 
+ * + * map<string, int64> groups_pointer = 2; + */ + public Builder putGroupsPointer( + java.lang.String key, + long value) { + if (key == null) { throw new java.lang.NullPointerException(); } + + internalGetMutableGroupsPointer().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       *群组消息游标
+       * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public Builder putAllGroupsPointer( + java.util.Map values) { + internalGetMutableGroupsPointer().getMutableMap() + .putAll(values); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ImSyncFinishRequest) + } + + // @@protoc_insertion_point(class_scope:site.ImSyncFinishRequest) + private static final com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest(); + } + + public static com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImSyncFinishRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImSyncFinishRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ImSyncFinishProto.ImSyncFinishRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ImSyncFinishRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ImSyncFinishRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ImSyncFinishRequest_GroupsPointerEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ImSyncFinishRequest_GroupsPointerEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031site/im_sync_finish.proto\022\004site\032\017core/" + + "core.proto\"\245\001\n\023ImSyncFinishRequest\022\022\n\nu2" + + "_pointer\030\001 \001(\003\022D\n\016groups_pointer\030\002 \003(\0132," + + ".site.ImSyncFinishRequest.GroupsPointerE" + + "ntry\0324\n\022GroupsPointerEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\003:\0028\0012N\n\023ImSyncFinishServic" + + "e\0227\n\006finish\022\031.site.ImSyncFinishRequest\032\022" + + ".core.NoneResponseB*\n\025com.akaxin.proto.s" + + "iteB\021ImSyncFinishProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.CoreProto.getDescriptor(), + }, assigner); + internal_static_site_ImSyncFinishRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ImSyncFinishRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ImSyncFinishRequest_descriptor, + new java.lang.String[] { "U2Pointer", "GroupsPointer", }); + internal_static_site_ImSyncFinishRequest_GroupsPointerEntry_descriptor = + internal_static_site_ImSyncFinishRequest_descriptor.getNestedTypes().get(0); + internal_static_site_ImSyncFinishRequest_GroupsPointerEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ImSyncFinishRequest_GroupsPointerEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + com.akaxin.proto.core.CoreProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImSyncMessageProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImSyncMessageProto.java new file mode 100755 index 0000000..281925f --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImSyncMessageProto.java @@ -0,0 +1,922 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/im_sync_message.proto + +package com.akaxin.proto.site; + +public final class ImSyncMessageProto { + private ImSyncMessageProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ImSyncMessageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ImSyncMessageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *二人消息游标
+     * 
+ * + * int64 u2_pointer = 1; + */ + long getU2Pointer(); + + /** + *
+     *群组消息游标
+     * 
+ * + * map<string, int64> groups_pointer = 2; + */ + int getGroupsPointerCount(); + /** + *
+     *群组消息游标
+     * 
+ * + * map<string, int64> groups_pointer = 2; + */ + boolean containsGroupsPointer( + java.lang.String key); + /** + * Use {@link #getGroupsPointerMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getGroupsPointer(); + /** + *
+     *群组消息游标
+     * 
+ * + * map<string, int64> groups_pointer = 2; + */ + java.util.Map + getGroupsPointerMap(); + /** + *
+     *群组消息游标
+     * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + long getGroupsPointerOrDefault( + java.lang.String key, + long defaultValue); + /** + *
+     *群组消息游标
+     * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + long getGroupsPointerOrThrow( + java.lang.String key); + } + /** + * Protobuf type {@code site.ImSyncMessageRequest} + */ + public static final class ImSyncMessageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ImSyncMessageRequest) + ImSyncMessageRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImSyncMessageRequest.newBuilder() to construct. + private ImSyncMessageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImSyncMessageRequest() { + u2Pointer_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImSyncMessageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + u2Pointer_ = input.readInt64(); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + groupsPointer_ = com.google.protobuf.MapField.newMapField( + GroupsPointerDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + groupsPointer__ = input.readMessage( + GroupsPointerDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + groupsPointer_.getMutableMap().put( + groupsPointer__.getKey(), groupsPointer__.getValue()); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImSyncMessageProto.internal_static_site_ImSyncMessageRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetGroupsPointer(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImSyncMessageProto.internal_static_site_ImSyncMessageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest.class, com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest.Builder.class); + } + + private int bitField0_; + public static final int U2_POINTER_FIELD_NUMBER = 1; + private long u2Pointer_; + /** + *
+     *二人消息游标
+     * 
+ * + * int64 u2_pointer = 1; + */ + public long getU2Pointer() { + return u2Pointer_; + } + + public static final int GROUPS_POINTER_FIELD_NUMBER = 2; + private static final class GroupsPointerDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.Long> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.akaxin.proto.site.ImSyncMessageProto.internal_static_site_ImSyncMessageRequest_GroupsPointerEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.INT64, + 0L); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.Long> groupsPointer_; + private com.google.protobuf.MapField + internalGetGroupsPointer() { + if (groupsPointer_ == null) { + return com.google.protobuf.MapField.emptyMapField( + GroupsPointerDefaultEntryHolder.defaultEntry); + } + return groupsPointer_; + } + + public int getGroupsPointerCount() { + return internalGetGroupsPointer().getMap().size(); + } + /** + *
+     *群组消息游标
+     * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public boolean containsGroupsPointer( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetGroupsPointer().getMap().containsKey(key); + } + /** + * Use {@link #getGroupsPointerMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getGroupsPointer() { + return getGroupsPointerMap(); + } + /** + *
+     *群组消息游标
+     * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public java.util.Map getGroupsPointerMap() { + return internalGetGroupsPointer().getMap(); + } + /** + *
+     *群组消息游标
+     * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public long getGroupsPointerOrDefault( + java.lang.String key, + long defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetGroupsPointer().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     *群组消息游标
+     * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public long getGroupsPointerOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetGroupsPointer().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (u2Pointer_ != 0L) { + output.writeInt64(1, u2Pointer_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetGroupsPointer(), + GroupsPointerDefaultEntryHolder.defaultEntry, + 2); + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (u2Pointer_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, u2Pointer_); + } + for (java.util.Map.Entry entry + : internalGetGroupsPointer().getMap().entrySet()) { + com.google.protobuf.MapEntry + groupsPointer__ = GroupsPointerDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, groupsPointer__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest other = (com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest) obj; + + boolean result = true; + result = result && (getU2Pointer() + == other.getU2Pointer()); + result = result && internalGetGroupsPointer().equals( + other.internalGetGroupsPointer()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + U2_POINTER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getU2Pointer()); + if (!internalGetGroupsPointer().getMap().isEmpty()) { + hash = (37 * hash) + GROUPS_POINTER_FIELD_NUMBER; + hash = (53 * hash) + internalGetGroupsPointer().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ImSyncMessageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ImSyncMessageRequest) + com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImSyncMessageProto.internal_static_site_ImSyncMessageRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetGroupsPointer(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableGroupsPointer(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImSyncMessageProto.internal_static_site_ImSyncMessageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest.class, com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + u2Pointer_ = 0L; + + internalGetMutableGroupsPointer().clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ImSyncMessageProto.internal_static_site_ImSyncMessageRequest_descriptor; + } + + public com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest build() { + com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest buildPartial() { + com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest result = new com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.u2Pointer_ = u2Pointer_; + result.groupsPointer_ = internalGetGroupsPointer(); + result.groupsPointer_.makeImmutable(); + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest) { + return mergeFrom((com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest other) { + if (other == com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest.getDefaultInstance()) return this; + if (other.getU2Pointer() != 0L) { + setU2Pointer(other.getU2Pointer()); + } + internalGetMutableGroupsPointer().mergeFrom( + other.internalGetGroupsPointer()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long u2Pointer_ ; + /** + *
+       *二人消息游标
+       * 
+ * + * int64 u2_pointer = 1; + */ + public long getU2Pointer() { + return u2Pointer_; + } + /** + *
+       *二人消息游标
+       * 
+ * + * int64 u2_pointer = 1; + */ + public Builder setU2Pointer(long value) { + + u2Pointer_ = value; + onChanged(); + return this; + } + /** + *
+       *二人消息游标
+       * 
+ * + * int64 u2_pointer = 1; + */ + public Builder clearU2Pointer() { + + u2Pointer_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.Long> groupsPointer_; + private com.google.protobuf.MapField + internalGetGroupsPointer() { + if (groupsPointer_ == null) { + return com.google.protobuf.MapField.emptyMapField( + GroupsPointerDefaultEntryHolder.defaultEntry); + } + return groupsPointer_; + } + private com.google.protobuf.MapField + internalGetMutableGroupsPointer() { + onChanged();; + if (groupsPointer_ == null) { + groupsPointer_ = com.google.protobuf.MapField.newMapField( + GroupsPointerDefaultEntryHolder.defaultEntry); + } + if (!groupsPointer_.isMutable()) { + groupsPointer_ = groupsPointer_.copy(); + } + return groupsPointer_; + } + + public int getGroupsPointerCount() { + return internalGetGroupsPointer().getMap().size(); + } + /** + *
+       *群组消息游标
+       * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public boolean containsGroupsPointer( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetGroupsPointer().getMap().containsKey(key); + } + /** + * Use {@link #getGroupsPointerMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getGroupsPointer() { + return getGroupsPointerMap(); + } + /** + *
+       *群组消息游标
+       * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public java.util.Map getGroupsPointerMap() { + return internalGetGroupsPointer().getMap(); + } + /** + *
+       *群组消息游标
+       * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public long getGroupsPointerOrDefault( + java.lang.String key, + long defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetGroupsPointer().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       *群组消息游标
+       * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public long getGroupsPointerOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetGroupsPointer().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearGroupsPointer() { + internalGetMutableGroupsPointer().getMutableMap() + .clear(); + return this; + } + /** + *
+       *群组消息游标
+       * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public Builder removeGroupsPointer( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableGroupsPointer().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableGroupsPointer() { + return internalGetMutableGroupsPointer().getMutableMap(); + } + /** + *
+       *群组消息游标
+       * 
+ * + * map<string, int64> groups_pointer = 2; + */ + public Builder putGroupsPointer( + java.lang.String key, + long value) { + if (key == null) { throw new java.lang.NullPointerException(); } + + internalGetMutableGroupsPointer().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       *群组消息游标
+       * 
+ * + * map<string, int64> groups_pointer = 2; + */ + + public Builder putAllGroupsPointer( + java.util.Map values) { + internalGetMutableGroupsPointer().getMutableMap() + .putAll(values); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ImSyncMessageRequest) + } + + // @@protoc_insertion_point(class_scope:site.ImSyncMessageRequest) + private static final com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest(); + } + + public static com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImSyncMessageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImSyncMessageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ImSyncMessageProto.ImSyncMessageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ImSyncMessageRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ImSyncMessageRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ImSyncMessageRequest_GroupsPointerEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ImSyncMessageRequest_GroupsPointerEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032site/im_sync_message.proto\022\004site\032\017core" + + "/core.proto\"\247\001\n\024ImSyncMessageRequest\022\022\n\n" + + "u2_pointer\030\001 \001(\003\022E\n\016groups_pointer\030\002 \003(\013" + + "2-.site.ImSyncMessageRequest.GroupsPoint" + + "erEntry\0324\n\022GroupsPointerEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\003:\0028\0012Q\n\024ImSyncMessageSe" + + "rvice\0229\n\007message\022\032.site.ImSyncMessageReq" + + "uest\032\022.core.NoneResponseB+\n\025com.akaxin.p" + + "roto.siteB\022ImSyncMessageProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.CoreProto.getDescriptor(), + }, assigner); + internal_static_site_ImSyncMessageRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ImSyncMessageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ImSyncMessageRequest_descriptor, + new java.lang.String[] { "U2Pointer", "GroupsPointer", }); + internal_static_site_ImSyncMessageRequest_GroupsPointerEntry_descriptor = + internal_static_site_ImSyncMessageRequest_descriptor.getNestedTypes().get(0); + internal_static_site_ImSyncMessageRequest_GroupsPointerEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ImSyncMessageRequest_GroupsPointerEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + com.akaxin.proto.core.CoreProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImSyncMsgStatusProto.java b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImSyncMsgStatusProto.java new file mode 100755 index 0000000..bb3803c --- /dev/null +++ b/openzaly-protobuf/src/main/java/com/akaxin/proto/site/ImSyncMsgStatusProto.java @@ -0,0 +1,966 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: site/im_sync_msgStatus.proto + +package com.akaxin.proto.site; + +public final class ImSyncMsgStatusProto { + private ImSyncMsgStatusProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ImSyncMsgStatusRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:site.ImSyncMsgStatusRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *客户端需要同步状态的U2消息id
+     * 
+ * + * repeated string u2_msg_id = 1; + */ + java.util.List + getU2MsgIdList(); + /** + *
+     *客户端需要同步状态的U2消息id
+     * 
+ * + * repeated string u2_msg_id = 1; + */ + int getU2MsgIdCount(); + /** + *
+     *客户端需要同步状态的U2消息id
+     * 
+ * + * repeated string u2_msg_id = 1; + */ + java.lang.String getU2MsgId(int index); + /** + *
+     *客户端需要同步状态的U2消息id
+     * 
+ * + * repeated string u2_msg_id = 1; + */ + com.google.protobuf.ByteString + getU2MsgIdBytes(int index); + + /** + *
+     *客户端需要同步状态的Group消息id
+     * 
+ * + * repeated string group_msg_id = 2; + */ + java.util.List + getGroupMsgIdList(); + /** + *
+     *客户端需要同步状态的Group消息id
+     * 
+ * + * repeated string group_msg_id = 2; + */ + int getGroupMsgIdCount(); + /** + *
+     *客户端需要同步状态的Group消息id
+     * 
+ * + * repeated string group_msg_id = 2; + */ + java.lang.String getGroupMsgId(int index); + /** + *
+     *客户端需要同步状态的Group消息id
+     * 
+ * + * repeated string group_msg_id = 2; + */ + com.google.protobuf.ByteString + getGroupMsgIdBytes(int index); + } + /** + * Protobuf type {@code site.ImSyncMsgStatusRequest} + */ + public static final class ImSyncMsgStatusRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:site.ImSyncMsgStatusRequest) + ImSyncMsgStatusRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImSyncMsgStatusRequest.newBuilder() to construct. + private ImSyncMsgStatusRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImSyncMsgStatusRequest() { + u2MsgId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + groupMsgId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImSyncMsgStatusRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + u2MsgId_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + u2MsgId_.add(s); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + groupMsgId_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + groupMsgId_.add(s); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + u2MsgId_ = u2MsgId_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + groupMsgId_ = groupMsgId_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImSyncMsgStatusProto.internal_static_site_ImSyncMsgStatusRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImSyncMsgStatusProto.internal_static_site_ImSyncMsgStatusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest.class, com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest.Builder.class); + } + + public static final int U2_MSG_ID_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList u2MsgId_; + /** + *
+     *客户端需要同步状态的U2消息id
+     * 
+ * + * repeated string u2_msg_id = 1; + */ + public com.google.protobuf.ProtocolStringList + getU2MsgIdList() { + return u2MsgId_; + } + /** + *
+     *客户端需要同步状态的U2消息id
+     * 
+ * + * repeated string u2_msg_id = 1; + */ + public int getU2MsgIdCount() { + return u2MsgId_.size(); + } + /** + *
+     *客户端需要同步状态的U2消息id
+     * 
+ * + * repeated string u2_msg_id = 1; + */ + public java.lang.String getU2MsgId(int index) { + return u2MsgId_.get(index); + } + /** + *
+     *客户端需要同步状态的U2消息id
+     * 
+ * + * repeated string u2_msg_id = 1; + */ + public com.google.protobuf.ByteString + getU2MsgIdBytes(int index) { + return u2MsgId_.getByteString(index); + } + + public static final int GROUP_MSG_ID_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList groupMsgId_; + /** + *
+     *客户端需要同步状态的Group消息id
+     * 
+ * + * repeated string group_msg_id = 2; + */ + public com.google.protobuf.ProtocolStringList + getGroupMsgIdList() { + return groupMsgId_; + } + /** + *
+     *客户端需要同步状态的Group消息id
+     * 
+ * + * repeated string group_msg_id = 2; + */ + public int getGroupMsgIdCount() { + return groupMsgId_.size(); + } + /** + *
+     *客户端需要同步状态的Group消息id
+     * 
+ * + * repeated string group_msg_id = 2; + */ + public java.lang.String getGroupMsgId(int index) { + return groupMsgId_.get(index); + } + /** + *
+     *客户端需要同步状态的Group消息id
+     * 
+ * + * repeated string group_msg_id = 2; + */ + public com.google.protobuf.ByteString + getGroupMsgIdBytes(int index) { + return groupMsgId_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < u2MsgId_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, u2MsgId_.getRaw(i)); + } + for (int i = 0; i < groupMsgId_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, groupMsgId_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < u2MsgId_.size(); i++) { + dataSize += computeStringSizeNoTag(u2MsgId_.getRaw(i)); + } + size += dataSize; + size += 1 * getU2MsgIdList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < groupMsgId_.size(); i++) { + dataSize += computeStringSizeNoTag(groupMsgId_.getRaw(i)); + } + size += dataSize; + size += 1 * getGroupMsgIdList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest)) { + return super.equals(obj); + } + com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest other = (com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest) obj; + + boolean result = true; + result = result && getU2MsgIdList() + .equals(other.getU2MsgIdList()); + result = result && getGroupMsgIdList() + .equals(other.getGroupMsgIdList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getU2MsgIdCount() > 0) { + hash = (37 * hash) + U2_MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getU2MsgIdList().hashCode(); + } + if (getGroupMsgIdCount() > 0) { + hash = (37 * hash) + GROUP_MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupMsgIdList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code site.ImSyncMsgStatusRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:site.ImSyncMsgStatusRequest) + com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.akaxin.proto.site.ImSyncMsgStatusProto.internal_static_site_ImSyncMsgStatusRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.akaxin.proto.site.ImSyncMsgStatusProto.internal_static_site_ImSyncMsgStatusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest.class, com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest.Builder.class); + } + + // Construct using com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + u2MsgId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + groupMsgId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.akaxin.proto.site.ImSyncMsgStatusProto.internal_static_site_ImSyncMsgStatusRequest_descriptor; + } + + public com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest getDefaultInstanceForType() { + return com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest.getDefaultInstance(); + } + + public com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest build() { + com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest buildPartial() { + com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest result = new com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + u2MsgId_ = u2MsgId_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.u2MsgId_ = u2MsgId_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + groupMsgId_ = groupMsgId_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.groupMsgId_ = groupMsgId_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest) { + return mergeFrom((com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest other) { + if (other == com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest.getDefaultInstance()) return this; + if (!other.u2MsgId_.isEmpty()) { + if (u2MsgId_.isEmpty()) { + u2MsgId_ = other.u2MsgId_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureU2MsgIdIsMutable(); + u2MsgId_.addAll(other.u2MsgId_); + } + onChanged(); + } + if (!other.groupMsgId_.isEmpty()) { + if (groupMsgId_.isEmpty()) { + groupMsgId_ = other.groupMsgId_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureGroupMsgIdIsMutable(); + groupMsgId_.addAll(other.groupMsgId_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList u2MsgId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureU2MsgIdIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + u2MsgId_ = new com.google.protobuf.LazyStringArrayList(u2MsgId_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       *客户端需要同步状态的U2消息id
+       * 
+ * + * repeated string u2_msg_id = 1; + */ + public com.google.protobuf.ProtocolStringList + getU2MsgIdList() { + return u2MsgId_.getUnmodifiableView(); + } + /** + *
+       *客户端需要同步状态的U2消息id
+       * 
+ * + * repeated string u2_msg_id = 1; + */ + public int getU2MsgIdCount() { + return u2MsgId_.size(); + } + /** + *
+       *客户端需要同步状态的U2消息id
+       * 
+ * + * repeated string u2_msg_id = 1; + */ + public java.lang.String getU2MsgId(int index) { + return u2MsgId_.get(index); + } + /** + *
+       *客户端需要同步状态的U2消息id
+       * 
+ * + * repeated string u2_msg_id = 1; + */ + public com.google.protobuf.ByteString + getU2MsgIdBytes(int index) { + return u2MsgId_.getByteString(index); + } + /** + *
+       *客户端需要同步状态的U2消息id
+       * 
+ * + * repeated string u2_msg_id = 1; + */ + public Builder setU2MsgId( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureU2MsgIdIsMutable(); + u2MsgId_.set(index, value); + onChanged(); + return this; + } + /** + *
+       *客户端需要同步状态的U2消息id
+       * 
+ * + * repeated string u2_msg_id = 1; + */ + public Builder addU2MsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureU2MsgIdIsMutable(); + u2MsgId_.add(value); + onChanged(); + return this; + } + /** + *
+       *客户端需要同步状态的U2消息id
+       * 
+ * + * repeated string u2_msg_id = 1; + */ + public Builder addAllU2MsgId( + java.lang.Iterable values) { + ensureU2MsgIdIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, u2MsgId_); + onChanged(); + return this; + } + /** + *
+       *客户端需要同步状态的U2消息id
+       * 
+ * + * repeated string u2_msg_id = 1; + */ + public Builder clearU2MsgId() { + u2MsgId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       *客户端需要同步状态的U2消息id
+       * 
+ * + * repeated string u2_msg_id = 1; + */ + public Builder addU2MsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureU2MsgIdIsMutable(); + u2MsgId_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList groupMsgId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureGroupMsgIdIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + groupMsgId_ = new com.google.protobuf.LazyStringArrayList(groupMsgId_); + bitField0_ |= 0x00000002; + } + } + /** + *
+       *客户端需要同步状态的Group消息id
+       * 
+ * + * repeated string group_msg_id = 2; + */ + public com.google.protobuf.ProtocolStringList + getGroupMsgIdList() { + return groupMsgId_.getUnmodifiableView(); + } + /** + *
+       *客户端需要同步状态的Group消息id
+       * 
+ * + * repeated string group_msg_id = 2; + */ + public int getGroupMsgIdCount() { + return groupMsgId_.size(); + } + /** + *
+       *客户端需要同步状态的Group消息id
+       * 
+ * + * repeated string group_msg_id = 2; + */ + public java.lang.String getGroupMsgId(int index) { + return groupMsgId_.get(index); + } + /** + *
+       *客户端需要同步状态的Group消息id
+       * 
+ * + * repeated string group_msg_id = 2; + */ + public com.google.protobuf.ByteString + getGroupMsgIdBytes(int index) { + return groupMsgId_.getByteString(index); + } + /** + *
+       *客户端需要同步状态的Group消息id
+       * 
+ * + * repeated string group_msg_id = 2; + */ + public Builder setGroupMsgId( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupMsgIdIsMutable(); + groupMsgId_.set(index, value); + onChanged(); + return this; + } + /** + *
+       *客户端需要同步状态的Group消息id
+       * 
+ * + * repeated string group_msg_id = 2; + */ + public Builder addGroupMsgId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupMsgIdIsMutable(); + groupMsgId_.add(value); + onChanged(); + return this; + } + /** + *
+       *客户端需要同步状态的Group消息id
+       * 
+ * + * repeated string group_msg_id = 2; + */ + public Builder addAllGroupMsgId( + java.lang.Iterable values) { + ensureGroupMsgIdIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, groupMsgId_); + onChanged(); + return this; + } + /** + *
+       *客户端需要同步状态的Group消息id
+       * 
+ * + * repeated string group_msg_id = 2; + */ + public Builder clearGroupMsgId() { + groupMsgId_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       *客户端需要同步状态的Group消息id
+       * 
+ * + * repeated string group_msg_id = 2; + */ + public Builder addGroupMsgIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureGroupMsgIdIsMutable(); + groupMsgId_.add(value); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:site.ImSyncMsgStatusRequest) + } + + // @@protoc_insertion_point(class_scope:site.ImSyncMsgStatusRequest) + private static final com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest(); + } + + public static com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ImSyncMsgStatusRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImSyncMsgStatusRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.akaxin.proto.site.ImSyncMsgStatusProto.ImSyncMsgStatusRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_site_ImSyncMsgStatusRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_site_ImSyncMsgStatusRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034site/im_sync_msgStatus.proto\022\004site\032\017co" + + "re/core.proto\"A\n\026ImSyncMsgStatusRequest\022" + + "\021\n\tu2_msg_id\030\001 \003(\t\022\024\n\014group_msg_id\030\002 \003(\t" + + "2W\n\026ImSyncMsgStatusService\022=\n\tmsgStatus\022" + + "\034.site.ImSyncMsgStatusRequest\032\022.core.Non" + + "eResponseB-\n\025com.akaxin.proto.siteB\024ImSy" + + "ncMsgStatusProtob\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.akaxin.proto.core.CoreProto.getDescriptor(), + }, assigner); + internal_static_site_ImSyncMsgStatusRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_site_ImSyncMsgStatusRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_site_ImSyncMsgStatusRequest_descriptor, + new java.lang.String[] { "U2MsgId", "GroupMsgId", }); + com.akaxin.proto.core.CoreProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/openzaly-storage/.gitignore b/openzaly-storage/.gitignore new file mode 100755 index 0000000..b83d222 --- /dev/null +++ b/openzaly-storage/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/openzaly-storage/pom.xml b/openzaly-storage/pom.xml new file mode 100755 index 0000000..de3d4fe --- /dev/null +++ b/openzaly-storage/pom.xml @@ -0,0 +1,73 @@ + + + 4.0.0 + + com.akaxin + openzaly-parent + 0.0.1 + + com.akaxin.site + openzaly-storage + 0.0.1-RELEASE + + + 1.6 + 1.6 + + + + + + org.springframework.boot + spring-boot-starter-jdbc + + + org.springframework.boot + spring-boot-starter-logging + + + mysql + mysql-connector-java + + + + + + + c3p0 + c3p0 + 0.9.1.2 + + + + + + mysql + mysql-connector-java + + + + + + org.xerial + sqlite-jdbc + + + + + com.akaxin.common + openzaly-common + 0.0.1-RELEASE + + + + + \ No newline at end of file diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/DataSourceManager.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/DataSourceManager.java new file mode 100755 index 0000000..f06ccb2 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/DataSourceManager.java @@ -0,0 +1,143 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.sql.SQLException; +import java.util.Properties; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.site.storage.dao.config.DBConfig; +import com.akaxin.site.storage.dao.config.DBType; +import com.akaxin.site.storage.dao.config.JdbcConst; +import com.akaxin.site.storage.dao.config.PrepareSiteConfigData; +import com.akaxin.site.storage.dao.mysql.manager.MysqlManager; +import com.akaxin.site.storage.dao.sqlite.manager.SQLiteJDBCManager; +import com.akaxin.site.storage.dao.sqlite.manager.SQLiteUpgrade; +import com.akaxin.site.storage.exception.InitDatabaseException; +import com.akaxin.site.storage.exception.MigrateDatabaseException; +import com.akaxin.site.storage.exception.NeedInitMysqlException; +import com.akaxin.site.storage.exception.UpgradeDatabaseException; +import com.akaxin.site.storage.util.FileUtils; +import com.akaxin.site.storage.util.MigrateUtils; + +/** + * 数据源初始化管理,不做具体操作对外提供方法 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:15:15 + */ +public class DataSourceManager { + private static final Logger logger = LoggerFactory.getLogger(DataSourceManager.class); + + private static final String OPENZALY_DATABASE_CONFIG = "openzaly-server.config"; + + private DataSourceManager() { + } + + // server启动,初始化数据库 + public static void init(DBConfig config) + throws InitDatabaseException, UpgradeDatabaseException, NeedInitMysqlException { + try { + DBType dbType = DBType.PERSONAL; + Properties pro = loadDatabaseConfig(OPENZALY_DATABASE_CONFIG); + if (pro != null && pro.size() > 0) { + // get edition from config file + String edition = MysqlManager.trimToNull(pro, JdbcConst.OPENZALY_EDITION); + if (StringUtils.isNotEmpty(edition)) { + dbType = DBType.getDBType(edition); + } + } + config.setDb(dbType); + logger.info("load database config finish databaseType:{}", dbType); + + switch (dbType) { + case PERSONAL: + System.setProperty("database", dbType.getName()); + SQLiteJDBCManager.initSqliteDB(config); + PrepareSiteConfigData.init(config);// 初始化数据库中初始数据 + break; + case TEAM: + System.setProperty("database", dbType.getName()); + MysqlManager.initMysqlDB(pro); // 初始化数据库以及数据库连接 + PrepareSiteConfigData.init(config);// 初始化数据库中初始数据 + break; + } + } catch (SQLException e) { + throw new InitDatabaseException("init database error", e); + } + } + + // 初始化,生成mysql的配置文件 + public static void initMysqlConfig() throws FileNotFoundException, IOException { + // 生成配置文件 + File configFile = new File(OPENZALY_DATABASE_CONFIG); + if (!configFile.exists()) { + FileUtils.writeResourceToFile("/" + OPENZALY_DATABASE_CONFIG, configFile); + } + } + + // 手动升级数据库 + public static int upgradeDB(DBConfig config) throws UpgradeDatabaseException { + try { + switch (config.getDb()) { + case PERSONAL: + return SQLiteUpgrade.doUpgrade(config, true); + case TEAM: + throw new UpgradeDatabaseException("database upgrade can't support mysql"); + } + } catch (SQLException e) { + throw new UpgradeDatabaseException("upgrade database error", e); + } + return 0; + } + + // 迁移数据库,把sqlite迁移至mysql数据库 + public static void migrateDB() throws MigrateDatabaseException, NeedInitMysqlException { + // 加载配置文件中的数据库配置 + Properties prop = loadDatabaseConfig(OPENZALY_DATABASE_CONFIG); + MigrateUtils.sqlite2Mysql(prop); + } + + public static Properties loadDatabaseConfig(String configPath) { + Properties properties = null; + InputStream inputStream = null; + try { + properties = new Properties(); + inputStream = new FileInputStream(configPath); + properties.load(inputStream); + } catch (Exception e) { + logger.error("load database config fail,openzaly will use sqlite database,cause={}", e.getMessage()); + } finally { + try { + if (inputStream != null) { + inputStream.close(); + } + } catch (IOException e) { + logger.error("close db config inputstream error", e); + } + } + return properties; + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IFriendApplyDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IFriendApplyDao.java new file mode 100755 index 0000000..e57ca74 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IFriendApplyDao.java @@ -0,0 +1,23 @@ +package com.akaxin.site.storage.api; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.bean.ApplyFriendBean; +import com.akaxin.site.storage.bean.ApplyUserBean; + +public interface IFriendApplyDao { + + boolean saveApply(String siteUserId, String siteFriendId, String applyReason) throws SQLException; + + boolean deleteApply(String siteUserId, String siteFriendId) throws SQLException; + + int getApplyCount(String siteUserId, String siteFriendId) throws SQLException; + + ApplyFriendBean getApplyInfo(String siteUserId, String siteFriendId, boolean isMaster) throws SQLException; + + List getApplyUsers(String siteUserId) throws SQLException; + + int getApplyCount(String siteUserId) throws SQLException; + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IGroupDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IGroupDao.java new file mode 100755 index 0000000..cb9ce4d --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IGroupDao.java @@ -0,0 +1,68 @@ +package com.akaxin.site.storage.api; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.bean.GroupMemberBean; +import com.akaxin.site.storage.bean.GroupProfileBean; +import com.akaxin.site.storage.bean.SimpleGroupBean; +import com.akaxin.site.storage.bean.SimpleUserBean; + +public interface IGroupDao { + + int getUserGroupCount(String siteUserId) throws SQLException; + + public List getGroupList(int pageNum, int pageSize) throws SQLException; + + public List getUserGroupList(String userId) throws SQLException; + + List getUserGroupList(String siteUserId, int pageNum, int pageSize) throws SQLException; + + public String getGroupOwner(String groupId) throws SQLException; + + public int getGroupMembersCount(String groupId) throws SQLException; + + public List getGroupMembersId(String groupId) throws SQLException; + + public GroupProfileBean addGroupProfile(GroupProfileBean bean) throws SQLException; + + public boolean addGroupMember(String siteUserId, String groupId, int status) throws SQLException; + + boolean deleteGroupProfile(String groupId) throws SQLException; + + public int updateGroupProfile(GroupProfileBean bean) throws SQLException; + + int updateGroupOwner(String siteUserId, String groupid) throws SQLException; + + public GroupProfileBean queryGroupProfile(String groupId) throws SQLException; + + public GroupProfileBean querySimpleGroupProfile(String groupId) throws SQLException; + + public int getGroupStatus(String groupId) throws SQLException; + + public List getUserGroupsId(String userId) throws SQLException; + + public GroupMemberBean getGroupMember(String siteUserId, String groupId) throws SQLException; + + public List getGroupMemberList(String groupId, int pageNum, int pageSize) throws SQLException; + + public boolean deleteGroupMember(String groupId, List userIds) throws SQLException; + + public int getNonGroupMemberNum(String groupId) throws SQLException; + + public List getNonGroupMemberList(String groupId, int pageNum, int pageSize) throws SQLException; + + int getUserFriendNonGroupMemberNum(String siteUserId, String groupId) throws SQLException; + + public List getUserFriendNonGroupMemberList(String siteUserId, String groupId, int pageNum, + int pageSize) throws SQLException; + + public int updateGroupIGC(GroupProfileBean bean) throws SQLException; + + int getTotalGroupNum() throws SQLException; + + int getGroupNum(long now, int day) throws SQLException; + + boolean rmGroupProfile(String groupId) throws SQLException; + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IGroupProfileDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IGroupProfileDao.java new file mode 100755 index 0000000..03285d0 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IGroupProfileDao.java @@ -0,0 +1,5 @@ +package com.akaxin.site.storage.api; + +public interface IGroupProfileDao { + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IMessageDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IMessageDao.java new file mode 100755 index 0000000..125b61c --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IMessageDao.java @@ -0,0 +1,53 @@ +package com.akaxin.site.storage.api; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.bean.GroupMessageBean; +import com.akaxin.site.storage.bean.U2MessageBean; + +/** + * 处理二人消息,群消息等 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-11-20 12:49:15 + */ +public interface IMessageDao { + // u2 message + public boolean saveU2Message(U2MessageBean u2Bean) throws SQLException; + + public boolean updateU2Pointer(String id, String deviceId, long finish) throws SQLException; + + public List queryU2Message(String id, String deviceId, long start, long limit) throws SQLException; + + long queryU2Pointer(String userId, String deviceId) throws SQLException; + + long queryMaxU2Pointer(String userId) throws SQLException; + + long queryMaxU2MessageId(String userId) throws SQLException; + + List queryU2MessageByMsgId(List msgIds) throws SQLException; + + // group message + public boolean saveGroupMessage(GroupMessageBean gmsgBean) throws SQLException; + + public List queryGroupMessage(String groupId, String userId, String deviceId, long start, + int limit) throws SQLException; + + public long queryGroupMessagePointer(String groupId, String siteUserId, String deviceId) throws SQLException; + + public boolean updateGroupPointer(String gid, String userId, String deviceId, long finish) throws SQLException; + + public long queryMaxGroupPointer(String groupId) throws SQLException; + + public long queryMaxUserGroupPointer(String groupId, String siteUserId) throws SQLException; + + List queryGroupMesageByMsgId(List msgIds) throws SQLException; + + // manager + public int queryU2MessagePerDay(long now, int day) throws SQLException; + + boolean delUserMessage(String siteUserId) throws SQLException; + + List queryMessageFile(String siteUserId) throws SQLException; +} \ No newline at end of file diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IPluginDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IPluginDao.java new file mode 100755 index 0000000..cabb785 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IPluginDao.java @@ -0,0 +1,26 @@ +package com.akaxin.site.storage.api; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.bean.PluginBean; + +public interface IPluginDao { + + public boolean addPlugin(PluginBean bean) throws SQLException; + + public boolean updatePlugin(PluginBean bean) throws SQLException; + + public boolean deletePlugin(int pluginId) throws SQLException; + + public PluginBean getPluginProfile(int pluginId) throws SQLException; + + public List getPluginPageList(int pageNum, int pageSize, int position, int permissionStatus) + throws SQLException; + + public List getPluginPageList(int pageNum, int pageSize, int position) throws SQLException; + + public List getAllPluginList(int pageNum, int pageSize) throws SQLException; + + String reSetAuthKey(int pluginId) throws SQLException; +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/api/ISiteConfigDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/ISiteConfigDao.java new file mode 100755 index 0000000..ae8f2eb --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/ISiteConfigDao.java @@ -0,0 +1,15 @@ +package com.akaxin.site.storage.api; + +import java.sql.SQLException; +import java.util.Map; + +public interface ISiteConfigDao { + Map getSiteConfig() throws SQLException; + + String getSiteConfigValue(int key) throws SQLException; + + int updateSiteConfig(Map configMap, boolean isAdmin) throws SQLException; + + int updateSiteConfig(int key, String value) throws SQLException; + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/api/ISiteUsersDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/ISiteUsersDao.java new file mode 100755 index 0000000..d6db085 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/ISiteUsersDao.java @@ -0,0 +1,10 @@ +package com.akaxin.site.storage.api; + +import java.sql.SQLException; +import java.util.List; + +public interface ISiteUsersDao { + + public List getSiteUserByPage(int pageNum, int pageSize) throws SQLException; + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/api/ITokenDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/ITokenDao.java new file mode 100755 index 0000000..c0b2fcd --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/ITokenDao.java @@ -0,0 +1,15 @@ +package com.akaxin.site.storage.api; + +import java.sql.SQLException; + +import com.akaxin.site.storage.bean.ExpireToken; + +public interface ITokenDao { + + boolean addToken(ExpireToken bean) throws SQLException; + + ExpireToken getExpireToken(String token) throws SQLException; + + ExpireToken getExpireTokenByBid(String bid, long time) throws SQLException; + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IUicDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IUicDao.java new file mode 100755 index 0000000..82eb180 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IUicDao.java @@ -0,0 +1,22 @@ +package com.akaxin.site.storage.api; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.bean.UicBean; + +public interface IUicDao { + + public boolean addUic(UicBean bean) throws SQLException; + + public boolean batchAddUic(UicBean bean, int num, int length) throws SQLException; + + public boolean updateUic(UicBean bean) throws SQLException; + + public UicBean getUicInfo(String uic) throws SQLException; + + public List getUicPageList(int pageNum, int pageSize, int status) throws SQLException; + + List getAllUicPageList(int pageNum, int pageSize) throws SQLException; + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IUserDeviceDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IUserDeviceDao.java new file mode 100755 index 0000000..b60c487 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IUserDeviceDao.java @@ -0,0 +1,31 @@ +package com.akaxin.site.storage.api; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.bean.UserDeviceBean; + +public interface IUserDeviceDao { + + boolean saveUserDevice(UserDeviceBean bean) throws SQLException; + + boolean updateUserDevice(UserDeviceBean bean) throws SQLException; + + boolean updateActiveTime(String siteUserId, String deviceId) throws SQLException; + + public UserDeviceBean getDeviceDetails(String siteUserId, String deviceId) throws SQLException; + + public String getDeviceId(String siteUserId, String devicePuk) throws SQLException; + + public UserDeviceBean getLatestDevice(String siteUserId) throws SQLException; + + public List getUserDeviceList(String siteUserId) throws SQLException; + + public List getActiveDeviceList(String siteUserId) throws SQLException; + + public List getUserTokens(String siteUserId) throws SQLException; + + public int limitDeviceNum(String siteUserId, int limit) throws SQLException; + + boolean delDevice(String siteUserId)throws SQLException; +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IUserFriendDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IUserFriendDao.java new file mode 100755 index 0000000..376a097 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IUserFriendDao.java @@ -0,0 +1,42 @@ +package com.akaxin.site.storage.api; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.UserFriendBean; + +public interface IUserFriendDao { + + public int getUserFriendNum(String siteUserId) throws SQLException; + + public List getUserFriends(String userId) throws SQLException; + + public List getUserFriendsByPage(String siteUserId, int pageNum, int pageSize) throws SQLException; + + boolean saveRelation(String siteUserId, String siteFriendId, int relation) throws SQLException; + + int queryRelation(String siteUserId, String siteFriendId) throws SQLException; + + boolean queryIsFriendRelation(String siteUserId, String siteFriendId, boolean isMaster) throws SQLException; + + boolean deleteRelation(String siteUserId, String siteFriendId) throws SQLException; + + boolean updateRelation(String siteUserId, String siteFriendId, int relation) throws SQLException; + + public UserFriendBean getFriendSetting(String siteUserId, String siteFriendId) throws SQLException; + + public boolean updateFriendSetting(String siteUserId, UserFriendBean bean) throws SQLException; + + public boolean isMute(String siteUserId, String siteFriendId) throws SQLException; + + public boolean updateMute(String siteUserId, String siteFriendId, boolean mute) throws SQLException; + + public boolean remarkFriend(String siteUserId, String siteFriendId, String aliasName, String aliasInLatin) + throws SQLException; + + public int friendNum(long now, int day) throws SQLException; + + boolean delUserFriend(String siteUserId) throws SQLException; + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IUserGroupDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IUserGroupDao.java new file mode 100755 index 0000000..6bf696c --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IUserGroupDao.java @@ -0,0 +1,22 @@ +package com.akaxin.site.storage.api; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.bean.UserGroupBean; + +public interface IUserGroupDao { + + List checkGroupMember(String siteGroupId, List userIds) throws SQLException; + + UserGroupBean getUserGroupSetting(String siteUserId, String siteGroupId) throws SQLException; + + boolean updateUserGroupSetting(String siteUserId, UserGroupBean bean) throws SQLException; + + public boolean isMute(String siteUserId, String siteGroupId) throws SQLException; + + public boolean updateMute(String siteUserId, String siteGroupId, boolean mute) throws SQLException; + + public int queryGroupMessagePerDay(long now, int day) throws SQLException; + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IUserProfileDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IUserProfileDao.java new file mode 100755 index 0000000..f56b5a7 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IUserProfileDao.java @@ -0,0 +1,60 @@ +package com.akaxin.site.storage.api; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.SimpleUserRelationBean; +import com.akaxin.site.storage.bean.UserFriendBean; +import com.akaxin.site.storage.bean.UserProfileBean; + +public interface IUserProfileDao { + + public boolean saveProfile(UserProfileBean bean) throws SQLException; + + public String getSiteUserIdByGlobalUserId(String globalUserId) throws SQLException; + + public String getSiteUserIdByPhone(String phoneId) throws SQLException; + + public String getSiteUserIdByLowercaseLoginId(String lowercaseLoginId) throws SQLException; + + public String getGlobalUserIdBySiteUserId(String siteUserId) throws SQLException; + + public String getSiteLoginIdBySiteUserId(String siteUserId) throws SQLException; + + public SimpleUserBean getSimpleProfileById(String siteUserId, boolean isMaster) throws SQLException; + + public SimpleUserBean getSimpleProfileByGlobalUserId(String globalUserId, boolean isMaster) throws SQLException; + + public UserFriendBean getFriendProfileById(String siteUserId, String siteFriend) throws SQLException; + + public UserProfileBean getUserProfileById(String siteUserId) throws SQLException; + + public UserProfileBean getUserProfileByGlobalUserId(String globalUserId) throws SQLException; + + public UserProfileBean getUserProfileByFullPhoneId(String fullPhoneId) throws SQLException; + + public int updateProfile(UserProfileBean userBean) throws SQLException; + + int updateUserIdPubk(String siteUserId, String globalUserId, String userIdPubk) throws SQLException; + + public int updateUserStatus(String siteUserId, int status) throws SQLException; + + public List getUserRelationPageList(String siteUserId, int pageNum, int pageSize) + throws SQLException; + + int getTotalUserNum() throws SQLException; + + public List getUserPageList(int pageNum, int pageSize) throws SQLException; + + public boolean isMute(String userId) throws SQLException; + + public boolean updateMute(String userId, boolean mute) throws SQLException; + + public int queryRegisterNumPerDay(long now, int day) throws SQLException; + + int getUserNum(long now, int day) throws SQLException; + + boolean delUser(String siteUserId) throws SQLException; + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IUserSessionDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IUserSessionDao.java new file mode 100755 index 0000000..8affa09 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/api/IUserSessionDao.java @@ -0,0 +1,21 @@ +package com.akaxin.site.storage.api; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.bean.SimpleAuthBean; +import com.akaxin.site.storage.bean.UserSessionBean; + +public interface IUserSessionDao { + public boolean saveUserSession(UserSessionBean bean) throws SQLException; + + public boolean onlineSession(String siteUserId, String deviceId) throws SQLException; + + public boolean offlineSession(String siteUserId, String deviceId) throws SQLException; + + public SimpleAuthBean getUserSession(String sessionId) throws SQLException; + + public List getSessionDeivceIds(String userId) throws SQLException; + + public boolean deleteUserSession(String siteUserId, String deviceId) throws SQLException; +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/ApplyFriendBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/ApplyFriendBean.java new file mode 100755 index 0000000..4cb973e --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/ApplyFriendBean.java @@ -0,0 +1,46 @@ +package com.akaxin.site.storage.bean; + +import com.akaxin.common.utils.GsonUtils; + +public class ApplyFriendBean { + private String siteUserId; + private String siteFriendId; + private String applyInfo; + private long applyTime; + + public String getSiteUserId() { + return siteUserId; + } + + public void setSiteUserId(String siteUserId) { + this.siteUserId = siteUserId; + } + + public String getSiteFriendId() { + return siteFriendId; + } + + public void setSiteFriendId(String siteFriendId) { + this.siteFriendId = siteFriendId; + } + + public String getApplyInfo() { + return applyInfo; + } + + public void setApplyInfo(String applyInfo) { + this.applyInfo = applyInfo; + } + + public long getApplyTime() { + return applyTime; + } + + public void setApplyTime(long applyTime) { + this.applyTime = applyTime; + } + + public String toString() { + return GsonUtils.toJson(this); + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/ApplyUserBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/ApplyUserBean.java new file mode 100755 index 0000000..993b410 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/ApplyUserBean.java @@ -0,0 +1,24 @@ +package com.akaxin.site.storage.bean; + +public class ApplyUserBean extends SimpleUserBean { + + private String applyReason; + private long applyTime; + + public String getApplyReason() { + return applyReason; + } + + public void setApplyReason(String applyReason) { + this.applyReason = applyReason; + } + + public long getApplyTime() { + return applyTime; + } + + public void setApplyTime(long applyTime) { + this.applyTime = applyTime; + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/ExpireToken.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/ExpireToken.java new file mode 100755 index 0000000..7669638 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/ExpireToken.java @@ -0,0 +1,122 @@ +package com.akaxin.site.storage.bean; + +import com.akaxin.common.utils.GsonUtils; + +/** + * 站点token + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-12 15:03:42 + */ +public class ExpireToken { + private int id; + private String token; + private String bid; + private int btype; + private int status; + // private String content; + private long createTime; + private long expireTime; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + /** + * @return the token + */ + public String getToken() { + return token; + } + + /** + * @param token + * the token to set + */ + public void setToken(String token) { + this.token = token; + } + + /** + * @return the bid + */ + public String getBid() { + return bid; + } + + /** + * @param bid + * the bid to set + */ + public void setBid(String bid) { + this.bid = bid; + } + + /** + * @return the btype + */ + public int getBtype() { + return btype; + } + + /** + * @param btype + * the btype to set + */ + public void setBtype(int btype) { + this.btype = btype; + } + + /** + * @return the status + */ + public int getStatus() { + return status; + } + + /** + * @param status + * the status to set + */ + public void setStatus(int status) { + this.status = status; + } + + /** + * @return the createTime + */ + public long getCreateTime() { + return createTime; + } + + /** + * @param createTime + * the createTime to set + */ + public void setCreateTime(long createTime) { + this.createTime = createTime; + } + + /** + * @return the expireTime + */ + public long getExpireTime() { + return expireTime; + } + + /** + * @param expireTime + * the expireTime to set + */ + public void setExpireTime(long expireTime) { + this.expireTime = expireTime; + } + + public String toString() { + return GsonUtils.toJson(this); + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/GroupMemberBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/GroupMemberBean.java new file mode 100755 index 0000000..3ea7dd2 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/GroupMemberBean.java @@ -0,0 +1,21 @@ +package com.akaxin.site.storage.bean; + +/** + * 群成员bean + * + * @author Sam + * @since 2017.10.25 + * + */ +public class GroupMemberBean extends SimpleUserBean { + private int userRole; + + public int getUserRole() { + return userRole; + } + + public void setUserRole(int userRole) { + this.userRole = userRole; + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/GroupMessageBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/GroupMessageBean.java new file mode 100755 index 0000000..c1137f2 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/GroupMessageBean.java @@ -0,0 +1,82 @@ +package com.akaxin.site.storage.bean; + +import com.akaxin.common.utils.GsonUtils; + +public class GroupMessageBean { + private int id; + private String siteGroupId; + private String msgId; + private String sendUserId; + private String sendDeviceId; + private int msgType; + private String content; + private long msgTime; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getSiteGroupId() { + return siteGroupId; + } + + public void setSiteGroupId(String siteGroupId) { + this.siteGroupId = siteGroupId; + } + + public String getMsgId() { + return msgId; + } + + public void setMsgId(String msgId) { + this.msgId = msgId; + } + + public String getSendUserId() { + return sendUserId; + } + + public void setSendUserId(String sendUserId) { + this.sendUserId = sendUserId; + } + + public String getSendDeviceId() { + return sendDeviceId; + } + + public void setSendDeviceId(String sendDeviceId) { + this.sendDeviceId = sendDeviceId; + } + + public int getMsgType() { + return msgType; + } + + public void setMsgType(int msgType) { + this.msgType = msgType; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public long getMsgTime() { + return msgTime; + } + + public void setMsgTime(long msgTime) { + this.msgTime = msgTime; + } + + public String toString() { + return GsonUtils.toJson(this); + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/GroupProfileBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/GroupProfileBean.java new file mode 100755 index 0000000..79b2fde --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/GroupProfileBean.java @@ -0,0 +1,112 @@ +package com.akaxin.site.storage.bean; + +import com.akaxin.common.utils.GsonUtils; + +public class GroupProfileBean { + private int id; + private String groupId; + private String groupName; + private String groupPhoto; + private String groupNotice; + private int tsStatus; + private int groupStatus; + private String createUserId; + private long createTime; + private boolean closeInviteGroupChat; + + public int getDefaultState() { + return defaultState; + } + + public void setDefaultState(int defaultState) { + this.defaultState = defaultState; + } + + //默认添加状态 + private int defaultState; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getGroupId() { + return groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public String getGroupName() { + return groupName; + } + + public void setGroupName(String groupName) { + this.groupName = groupName; + } + + public String getGroupPhoto() { + return groupPhoto; + } + + public void setGroupPhoto(String groupPhoto) { + this.groupPhoto = groupPhoto; + } + + public String getGroupNotice() { + return groupNotice; + } + + public void setGroupNotice(String groupNotice) { + this.groupNotice = groupNotice; + } + + public int getTsStatus() { + return tsStatus; + } + + public void setTsStatus(int tsStatus) { + this.tsStatus = tsStatus; + } + + public int getGroupStatus() { + return groupStatus; + } + + public void setGroupStatus(int groupStatus) { + this.groupStatus = groupStatus; + } + + public String getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public long getCreateTime() { + return createTime; + } + + public void setCreateTime(long createTime) { + this.createTime = createTime; + } + + public boolean isCloseInviteGroupChat() { + return closeInviteGroupChat; + } + + public void setCloseInviteGroupChat(boolean closeInviteGroupChat) { + this.closeInviteGroupChat = closeInviteGroupChat; + } + + public String toString() { + return GsonUtils.toJson(this); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/MonitorBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/MonitorBean.java new file mode 100755 index 0000000..c976c39 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/MonitorBean.java @@ -0,0 +1,83 @@ +package com.akaxin.site.storage.bean; + +public class MonitorBean { + private int registerNum; + private int messageNum; + private int groupMsgNum; + private int u2MsgNum; + private int userNum; + private int groupNum; + private int friendNum; + + public MonitorBean(int registerNum, int messageNum, int groupMsgNum, int u2MsgNum, int userNum, int groupNum, int friendNum) { + this.registerNum = registerNum; + this.messageNum = messageNum; + this.groupMsgNum = groupMsgNum; + this.u2MsgNum = u2MsgNum; + this.userNum = userNum; + this.groupNum = groupNum; + this.friendNum = friendNum; + } + public MonitorBean() {} + + public int getRegisterNum() { + return registerNum; + } + + public void setRegisterNum(int registerNum) { + this.registerNum = registerNum; + } + + public int getMessageNum() { + return messageNum; + } + + public void setMessageNum(int messageNum) { + this.messageNum = messageNum; + } + + public int getGroupMsgNum() { + return groupMsgNum; + } + + public void setGroupMsgNum(int groupMsgNum) { + this.groupMsgNum = groupMsgNum; + } + + public int getU2MsgNum() { + return u2MsgNum; + } + + public void setU2MsgNum(int u2MsgNum) { + this.u2MsgNum = u2MsgNum; + } + + public int getUserNum() { + return userNum; + } + + public void setUserNum(int userNum) { + this.userNum = userNum; + } + + public int getGroupNum() { + return groupNum; + } + + public void setGroupNum(int groupNum) { + this.groupNum = groupNum; + } + + public int getFriendNum() { + return friendNum; + } + + public void setFriendNum(int friendNum) { + this.friendNum = friendNum; + } + + public MonitorBean(int registerNum) { + + this.registerNum = registerNum; + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/PluginBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/PluginBean.java new file mode 100755 index 0000000..52a8cf3 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/PluginBean.java @@ -0,0 +1,118 @@ +package com.akaxin.site.storage.bean; + +import com.akaxin.common.utils.GsonUtils; + +public class PluginBean { + private int id; + private String name; + private String urlPage; + private String apiUrl; + private String icon; + private String authKey; + private String allowedIp; + private int position;// 扩展的位置,首页还是消息帧 + private int sort;// 排序字段 + private int displayMode;// 在客户端展示的方式 + private int permissionStatus;// 是否可用 + private long addTime; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getUrlPage() { + return urlPage; + } + + public void setUrlPage(String urlPage) { + this.urlPage = urlPage; + } + + public String getApiUrl() { + return apiUrl; + } + + public void setApiUrl(String apiUrl) { + this.apiUrl = apiUrl; + } + + public String getIcon() { + return icon; + } + + public void setIcon(String icon) { + this.icon = icon; + } + + public String getAuthKey() { + return authKey; + } + + public void setAuthKey(String authKey) { + this.authKey = authKey; + } + + public String getAllowedIp() { + return allowedIp; + } + + public void setAllowedIp(String allowedIp) { + this.allowedIp = allowedIp; + } + + public int getSort() { + return sort; + } + + public void setSort(int sort) { + this.sort = sort; + } + + public long getAddTime() { + return addTime; + } + + public void setAddTime(long addTime) { + this.addTime = addTime; + } + + public int getPosition() { + return position; + } + + public void setPosition(int position) { + this.position = position; + } + + public int getDisplayMode() { + return displayMode; + } + + public void setDisplayMode(int displayMode) { + this.displayMode = displayMode; + } + + public int getPermissionStatus() { + return permissionStatus; + } + + public void setPermissionStatus(int permissionStatus) { + this.permissionStatus = permissionStatus; + } + + public String toString() { + return GsonUtils.toJson(this); + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/SimpleAuthBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/SimpleAuthBean.java new file mode 100755 index 0000000..df57457 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/SimpleAuthBean.java @@ -0,0 +1,29 @@ +package com.akaxin.site.storage.bean; + +import com.akaxin.common.utils.GsonUtils; + +public class SimpleAuthBean { + private String siteUserId; + private String deviceId; + + public String getSiteUserId() { + return siteUserId; + } + + public void setSiteUserId(String siteUserId) { + this.siteUserId = siteUserId; + } + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String toString() { + return GsonUtils.toJson(this); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/SimpleGroupBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/SimpleGroupBean.java new file mode 100755 index 0000000..93cf5f6 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/SimpleGroupBean.java @@ -0,0 +1,45 @@ +package com.akaxin.site.storage.bean; + +import com.akaxin.common.utils.GsonUtils; + +/** + * 群对象简单bean + * + * @author Sam + * @since 2017.10.25 + * + */ +public class SimpleGroupBean { + + private String groupId; + private String groupName; + private String groupPhoto; + + public String getGroupId() { + return groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public String getGroupName() { + return groupName; + } + + public void setGroupName(String groupName) { + this.groupName = groupName; + } + + public String getGroupPhoto() { + return groupPhoto; + } + + public void setGroupPhoto(String groupPhoto) { + this.groupPhoto = groupPhoto; + } + + public String toString() { + return GsonUtils.toJson(this); + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/SimpleUserBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/SimpleUserBean.java new file mode 100755 index 0000000..5b58629 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/SimpleUserBean.java @@ -0,0 +1,98 @@ +package com.akaxin.site.storage.bean; + +import com.akaxin.common.utils.GsonUtils; + +/** + * 用户对象 + * + * @author Sam + * @since 2017.10.25 + * + */ +public class SimpleUserBean { + protected String siteUserId;// siteUserId + private String siteLoginId;// loginId 登陆账号 + private String userName;// 用户名,昵称nickname + private String userNameInLatin; + private String aliasName;// 备注 + private String aliasNameInLatin;// 备注拼音 + private String userPhoto; + private int userStatus; + + public String getUserId() { + return siteUserId; + } + + public void setUserId(String siteUserId) { + this.siteUserId = siteUserId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getUserPhoto() { + return userPhoto; + } + + public void setUserPhoto(String userPhoto) { + this.userPhoto = userPhoto; + } + + public int getUserStatus() { + return userStatus; + } + + public void setUserStatus(int userStatus) { + this.userStatus = userStatus; + } + + public String getSiteLoginId() { + return siteLoginId; + } + + public void setSiteLoginId(String siteLoginId) { + this.siteLoginId = siteLoginId; + } + + public String getUserNameInLatin() { + return userNameInLatin; + } + + public void setUserNameInLatin(String userNameInLatin) { + this.userNameInLatin = userNameInLatin; + } + + public String getSiteUserId() { + return siteUserId; + } + + public void setSiteUserId(String siteUserId) { + this.siteUserId = siteUserId; + } + + public String getAliasName() { + return aliasName; + } + + public void setAliasName(String aliasName) { + this.aliasName = aliasName; + } + + public String getAliasNameInLatin() { + return aliasNameInLatin; + } + + public void setAliasNameInLatin(String aliasNameInLatin) { + this.aliasNameInLatin = aliasNameInLatin; + } + + public String toString() { + return GsonUtils.toJson(this); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/SimpleUserRelationBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/SimpleUserRelationBean.java new file mode 100755 index 0000000..b9ff228 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/SimpleUserRelationBean.java @@ -0,0 +1,30 @@ +package com.akaxin.site.storage.bean; + +/** + * 当前用户siteUserId,与继承的用户userId,之间的用户关系 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-12-27 15:18:45 + */ +public class SimpleUserRelationBean extends SimpleUserBean { + + private String siteUserId; + private int relation; + + public String getSiteUserId() { + return siteUserId; + } + + public void setSiteUserId(String siteUserId) { + this.siteUserId = siteUserId; + } + + public int getRelation() { + return relation; + } + + public void setRelation(int relation) { + this.relation = relation; + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/SiteConfigBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/SiteConfigBean.java new file mode 100755 index 0000000..d663fff --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/SiteConfigBean.java @@ -0,0 +1,50 @@ +package com.akaxin.site.storage.bean; + +public class SiteConfigBean { + private String siteIp; + private int sitePort; + private String siteName; + private String siteIcon; + private String siteInstructions; + + public String getSiteIp() { + return siteIp; + } + + public void setSiteIp(String siteIp) { + this.siteIp = siteIp; + } + + public int getSitePort() { + return sitePort; + } + + public void setSitePort(int sitePort) { + this.sitePort = sitePort; + } + + public String getSiteName() { + return siteName; + } + + public void setSiteName(String siteName) { + this.siteName = siteName; + } + + public String getSiteIcon() { + return siteIcon; + } + + public void setSiteIcon(String siteIcon) { + this.siteIcon = siteIcon; + } + + public String getSiteInstructions() { + return siteInstructions; + } + + public void setSiteInstructions(String siteInstructions) { + this.siteInstructions = siteInstructions; + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/U2MessageBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/U2MessageBean.java new file mode 100755 index 0000000..6b8e388 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/U2MessageBean.java @@ -0,0 +1,102 @@ +package com.akaxin.site.storage.bean; + +import org.apache.commons.lang3.StringUtils; + +import com.akaxin.common.utils.GsonUtils; + +public class U2MessageBean { + private int id; + private String siteUserId; + private String msgId; + private String sendUserId; + private String receiveUserId; + private int msgType; + private String content; + private String deviceId; + private String tsKey; + private long msgTime; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getSiteUserId() { + return siteUserId; + } + + public void setSiteUserId(String siteUserId) { + this.siteUserId = siteUserId; + } + + public String getMsgId() { + return msgId; + } + + public void setMsgId(String msgId) { + this.msgId = msgId; + } + + public String getSendUserId() { + return sendUserId; + } + + public void setSendUserId(String sendUserId) { + this.sendUserId = sendUserId; + } + + public String getReceiveUserId() { + return StringUtils.isNotEmpty(receiveUserId) ? receiveUserId : this.siteUserId; + } + + public void setReceiveUserId(String receiveUserId) { + this.receiveUserId = receiveUserId; + } + + public int getMsgType() { + return msgType; + } + + public void setMsgType(int msgType) { + this.msgType = msgType; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getTsKey() { + return tsKey; + } + + public void setTsKey(String tsKey) { + this.tsKey = tsKey; + } + + public long getMsgTime() { + return msgTime; + } + + public void setMsgTime(long msgTime) { + this.msgTime = msgTime; + } + + public String toString() { + return GsonUtils.toJson(this); + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/UicBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/UicBean.java new file mode 100755 index 0000000..04b14d7 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/UicBean.java @@ -0,0 +1,79 @@ +package com.akaxin.site.storage.bean; + +import com.akaxin.common.utils.GsonUtils; + +/** + * 用户注册/登陆站点,需要使用的邀请码 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-12 15:03:42 + */ +public class UicBean { + private int id; + private String uic; + private String siteUserId; + private String userName; + private int status; + private long createTime; + private long useTime; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getUic() { + return uic; + } + + public void setUic(String uic) { + this.uic = uic; + } + + public String getSiteUserId() { + return siteUserId; + } + + public void setSiteUserId(String siteUserId) { + this.siteUserId = siteUserId; + } + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public long getCreateTime() { + return createTime; + } + + public void setCreateTime(long createTime) { + this.createTime = createTime; + } + + public long getUseTime() { + return useTime; + } + + public void setUseTime(long useTime) { + this.useTime = useTime; + } + + public String toString() { + return GsonUtils.toJson(this); + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/UserDeviceBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/UserDeviceBean.java new file mode 100755 index 0000000..23e9f92 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/UserDeviceBean.java @@ -0,0 +1,98 @@ +package com.akaxin.site.storage.bean; + +import com.akaxin.common.utils.GsonUtils; + +/** + * 用户设备信息 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.10.21 + */ +public class UserDeviceBean { + private String siteUserId; + private String deviceId; + private String userDevicePubk; + private String deviceName; + private String deviceIp; + private String userToken; + private long loginTime; + private long activeTime; + private long addTime; + + public String getSiteUserId() { + return siteUserId; + } + + public void setSiteUserId(String siteUserId) { + this.siteUserId = siteUserId; + } + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getUserDevicePubk() { + return userDevicePubk; + } + + public void setUserDevicePubk(String userDevicePubk) { + this.userDevicePubk = userDevicePubk; + } + + public String getDeviceName() { + return deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public long getLoginTime() { + return loginTime; + } + + public void setLoginTime(long loginTime) { + this.loginTime = loginTime; + } + + public String getDeviceIp() { + return deviceIp; + } + + public void setDeviceIp(String deviceIp) { + this.deviceIp = deviceIp; + } + + public String getUserToken() { + return userToken; + } + + public void setUserToken(String userToken) { + this.userToken = userToken; + } + + public long getActiveTime() { + return activeTime; + } + + public void setActiveTime(long activeTime) { + this.activeTime = activeTime; + } + + public long getAddTime() { + return addTime; + } + + public void setAddTime(long addTime) { + this.addTime = addTime; + } + + public String toString() { + return GsonUtils.toJson(this); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/UserFriendBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/UserFriendBean.java new file mode 100755 index 0000000..441e818 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/UserFriendBean.java @@ -0,0 +1,19 @@ +package com.akaxin.site.storage.bean; + +import com.akaxin.common.utils.GsonUtils; + +public class UserFriendBean extends UserProfileBean { + private boolean mute;// 是否对该用户设置消息免打扰 + + public boolean isMute() { + return mute; + } + + public void setMute(boolean mute) { + this.mute = mute; + } + + public String toString() { + return GsonUtils.toJson(this); + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/UserGroupBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/UserGroupBean.java new file mode 100755 index 0000000..44f56ac --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/UserGroupBean.java @@ -0,0 +1,89 @@ +package com.akaxin.site.storage.bean; + +import com.akaxin.common.utils.GsonUtils; + +/** + * 用户对应群的bean + * + * @author anguoyue + * + */ +public class UserGroupBean { + private String id; + private String siteUserId; + private String siteGroupId; + private String userRole; + private String tsKey; + private String deviceId; + private boolean mute; + private long addTime; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getSiteUserId() { + return siteUserId; + } + + public void setSiteUserId(String siteUserId) { + this.siteUserId = siteUserId; + } + + public String getSiteGroupId() { + return siteGroupId; + } + + public void setSiteGroupId(String siteGroupId) { + this.siteGroupId = siteGroupId; + } + + public String getUserRole() { + return userRole; + } + + public void setUserRole(String userRole) { + this.userRole = userRole; + } + + public String getTsKey() { + return tsKey; + } + + public void setTsKey(String tsKey) { + this.tsKey = tsKey; + } + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public long getAddTime() { + return addTime; + } + + public void setAddTime(long addTime) { + this.addTime = addTime; + } + + public boolean isMute() { + return mute; + } + + public void setMute(boolean mute) { + this.mute = mute; + } + + public String toString() { + return GsonUtils.toJson(this); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/UserProfileBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/UserProfileBean.java new file mode 100755 index 0000000..52045ac --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/UserProfileBean.java @@ -0,0 +1,107 @@ +package com.akaxin.site.storage.bean; + +import java.util.zip.CRC32; + +import org.apache.commons.codec.binary.Hex; +import org.apache.commons.codec.digest.DigestUtils; +import org.apache.commons.lang3.StringUtils; + +import com.akaxin.common.utils.GsonUtils; + +public class UserProfileBean extends SimpleUserBean { + // private String siteUserId; + private String globalUserId;// 全局的用户ID + private String userIdPubk; + private String selfIntroduce; + private String applyInfo; + private String phoneId; +// private int userStatus; + private long registerTime; + private int defaultState; + + public int getDefaultState() { + return defaultState; + } + + public void setDefaultState(int defaultState) { + this.defaultState = defaultState; + } + + public String getGlobalUserId() { + if (StringUtils.isEmpty(this.globalUserId)) { + String body = this.userIdPubk; + String SHA1UserPubKey = new String(Hex.encodeHex(DigestUtils.sha1(body))); + + CRC32 c32 = new CRC32(); + c32.update(body.getBytes(), 0, body.getBytes().length); + String CRC32UserPubKey = String.valueOf(c32.getValue()); + + return SHA1UserPubKey + "-" + CRC32UserPubKey; + } + return this.globalUserId; + } + + public void setGlobalUserId(String globalUserId) { + this.globalUserId = globalUserId; + } + + public String getSiteUserId() { + return siteUserId; + } + + public void setSiteUserId(String siteUserId) { + this.siteUserId = siteUserId; + } + + public String getUserIdPubk() { + return userIdPubk; + } + + public void setUserIdPubk(String userIdPubk) { + this.userIdPubk = userIdPubk; + } + + public String getSelfIntroduce() { + return selfIntroduce; + } + + public void setSelfIntroduce(String selfIntroduce) { + this.selfIntroduce = selfIntroduce; + } + + public String getApplyInfo() { + return applyInfo; + } + + public void setApplyInfo(String applyInfo) { + this.applyInfo = applyInfo; + } + + public String getPhoneId() { + return phoneId; + } + + public void setPhoneId(String phoneId) { + this.phoneId = phoneId; + } + + public long getRegisterTime() { + return registerTime; + } + + public void setRegisterTime(long registerTime) { + this.registerTime = registerTime; + } + +// public int getUserStatus() { +// return userStatus; +// } +// +// public void setUserStatus(int userStatus) { +// this.userStatus = userStatus; +// } + + public String toString() { + return GsonUtils.toJson(this); + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/UserSessionBean.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/UserSessionBean.java new file mode 100755 index 0000000..1bf4c51 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/bean/UserSessionBean.java @@ -0,0 +1,56 @@ +package com.akaxin.site.storage.bean; + +import com.akaxin.common.utils.GsonUtils; + +public class UserSessionBean { + private String siteUserId; + private String sessionId; + private boolean online; + private String deviceId; + private long loginTime; + + public String getSiteUserId() { + return siteUserId; + } + + public void setSiteUserId(String siteUserId) { + this.siteUserId = siteUserId; + } + + public String getSessionId() { + return sessionId; + } + + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } + + public boolean isOnline() { + return online; + } + + public void setOnline(boolean online) { + this.online = online; + } + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public long getLoginTime() { + return loginTime; + } + + public void setLoginTime(long loginTime) { + this.loginTime = loginTime; + } + + public String toString() { + return GsonUtils.toJson(this); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/connection/DatabaseConnection.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/connection/DatabaseConnection.java new file mode 100755 index 0000000..efa13b1 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/connection/DatabaseConnection.java @@ -0,0 +1,105 @@ +package com.akaxin.site.storage.connection; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.site.storage.dao.config.DBType; +import com.akaxin.site.storage.dao.mysql.manager.MysqlManager; +import com.akaxin.site.storage.dao.sqlite.manager.SQLiteJDBCManager; + +/** + * 根据项目使用的数据库类型,选择不同的Connection + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-07 17:48:30 + */ +public class DatabaseConnection { + private static final Logger logger = LoggerFactory.getLogger(DatabaseConnection.class); + private static final DBType DATABASE_TYPE = DBType.getDBType(System.getProperty("database")); + + public static Connection getConnection(boolean isMaster) throws SQLException { + return isMaster ? getConnection() : getSlaveConnection(); + } + + public static Connection getConnection() throws SQLException { + switch (DATABASE_TYPE) { + case PERSONAL: + return SQLiteJDBCManager.getConnection(); + case TEAM: + Connection conn = MysqlManager.getConnection(); + conn.prepareStatement("SET NAMES utf8mb4;").executeUpdate(); + return conn; + } + return null; + } + + public static Connection getSlaveConnection() throws SQLException { + switch (DATABASE_TYPE) { + case PERSONAL: + return SQLiteJDBCManager.getConnection(); + case TEAM: + Connection conn = MysqlManager.getSalveConnection(); + conn.prepareStatement("SET NAMES utf8mb4;").executeUpdate(); + return conn; + } + return null; + } + + public static void returnConnection(Connection conn) { + switch (DATABASE_TYPE) { + case PERSONAL: + break; + case TEAM: + MysqlManager.returnConnection(conn); + return; + } + } + + public static void returnConnection(Connection conn, PreparedStatement ps) { + closePreparedStatement(ps); + switch (DATABASE_TYPE) { + case PERSONAL: + break; + case TEAM: + MysqlManager.returnConnection(conn); + return; + } + } + + public static void returnConnection(Connection conn, PreparedStatement pst, ResultSet rs) { + closePreparedStatement(pst); + closeResultSet(rs); + switch (DATABASE_TYPE) { + case PERSONAL: + break; + case TEAM: + MysqlManager.returnConnection(conn); + return; + } + } + + public static void closePreparedStatement(PreparedStatement ps) { + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + logger.error("close PreparedStatement error.", e); + } + } + + public static void closeResultSet(ResultSet rs) { + try { + if (rs != null) { + rs.close(); + } + } catch (SQLException e) { + logger.error("cloase ResultSet error.", e); + } + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteConfigDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteConfigDao.java new file mode 100755 index 0000000..17e4620 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteConfigDao.java @@ -0,0 +1,204 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.dao; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.logs.LogUtils; +import com.akaxin.proto.core.ConfigProto; +import com.akaxin.site.storage.connection.DatabaseConnection; +import com.akaxin.site.storage.dao.sql.SQLConst; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:14:12 + */ +public class SiteConfigDao { + private static final Logger logger = LoggerFactory.getLogger(SiteConfigDao.class); + private static final String SITE_CONFIG_INFO_TABLE = SQLConst.SITE_CONFIG_INFO; + + private SiteConfigDao() { + } + + public static SiteConfigDao getInstance() { + return SingletonHolder.instance; + } + + static class SingletonHolder { + private static SiteConfigDao instance = new SiteConfigDao(); + } + + public int saveConfig(int configKey, String configValue) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "INSERT INTO " + SITE_CONFIG_INFO_TABLE + "(config_key,config_value) VALUES(?,?);"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setInt(1, configKey); + ps.setString(2, configValue); + + result = ps.executeUpdate(); + } catch (SQLException e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, configKey, configValue); + return result; + } + + public Map queryConfig() throws SQLException { + long startTime = System.currentTimeMillis(); + Map configMap = new HashMap(); + String sql = "SELECT config_key,config_value FROM " + SITE_CONFIG_INFO_TABLE + ";"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + + rs = pst.executeQuery(); + while (rs.next()) { + int key = rs.getInt(1); + String value = rs.getString(2); + if (StringUtils.isNotEmpty(value)) { + configMap.put(key, value); + } + } + } catch (SQLException e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, configMap, sql); + return configMap; + } + + public String queryConfigValue(int key) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT config_value FROM " + SITE_CONFIG_INFO_TABLE + " WHERE config_key=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + String value = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setInt(1, key); + + rs = pst.executeQuery(); + if (rs.next()) { + value = rs.getString(1); + } + } catch (SQLException e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, value, sql); + return value; + } + + public int updateConfig(int key, String value) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + SITE_CONFIG_INFO_TABLE + " set config_value=? WHERE config_key=?;"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, value); + ps.setInt(2, key); + + result = ps.executeUpdate(); + if (result == 0) { + result = saveConfig(key, value); + } + } catch (SQLException e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, value, key); + return result; + } + + public int updateConfig(Map configMap, boolean isAdmin) throws SQLException { + long startTime = System.currentTimeMillis(); + int result = 0; + String sql = "UPDATE " + SITE_CONFIG_INFO_TABLE + " set config_value=? WHERE config_key=?;"; + + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + for (Map.Entry configEntry : configMap.entrySet()) { + int configKey = configEntry.getKey(); + + if (ConfigProto.ConfigKey.SITE_MANAGER_VALUE == configKey && !isAdmin) { + continue; + } + + ps.setString(1, configEntry.getValue()); + ps.setInt(2, configEntry.getKey()); + int updateResult = ps.executeUpdate(); + + ps.clearParameters(); + + if (updateResult == 0) { + updateResult = saveConfig(configEntry.getKey(), configEntry.getValue()); + } + + if (updateResult > 0) { + result++; + } + + LogUtils.dbDebugLog(logger, startTime, configMap, sql, configEntry.getValue(), configEntry.getKey()); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql); + return result; + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteFriendApplyDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteFriendApplyDao.java new file mode 100755 index 0000000..ae52420 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteFriendApplyDao.java @@ -0,0 +1,250 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.dao; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.logs.LogUtils; +import com.akaxin.site.storage.bean.ApplyFriendBean; +import com.akaxin.site.storage.bean.ApplyUserBean; +import com.akaxin.site.storage.connection.DatabaseConnection; +import com.akaxin.site.storage.dao.sql.SQLConst; + +/** + * 好友申请相关数据库操作 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-11-19 20:00:19 + */ +public class SiteFriendApplyDao { + private static final Logger logger = LoggerFactory.getLogger(SiteFriendApplyDao.class); + private static final String FRIEND_APPLY_TABLE = SQLConst.SITE_FRIEND_APPLY; + + private static SiteFriendApplyDao instance = new SiteFriendApplyDao(); + + public static SiteFriendApplyDao getInstance() { + return instance; + } + + public boolean saveApply(String siteUserId, String siteFriendId, String applyReason) throws SQLException { + long startTime = System.currentTimeMillis(); + int result = 0; + String sql = "INSERT INTO " + FRIEND_APPLY_TABLE + + "(site_user_id,site_friend_id,apply_reason,apply_time) VALUES(?,?,?,?);"; + + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, siteUserId); + ps.setString(2, siteFriendId); + ps.setString(3, applyReason); + ps.setLong(4, System.currentTimeMillis()); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteUserId, siteFriendId); + return result > 0; + } + + public boolean deleteApply(String siteUserId, String siteFriendId) throws SQLException { + long startTime = System.currentTimeMillis(); + int result = 0; + String sql = "DELETE FROM " + FRIEND_APPLY_TABLE + " WHERE site_user_id=? AND site_friend_id=?;"; + + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, siteUserId); + ps.setString(2, siteFriendId); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteUserId); + return result > 0; + } + + public int getApplyCount(String siteUserId, String siteFriendId) throws SQLException { + long startTime = System.currentTimeMillis(); + int num = 0; + String sql = "SELECT COUNT(site_user_id) FROM " + FRIEND_APPLY_TABLE + + " WHERE site_user_id=? AND site_friend_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setString(2, siteFriendId); + + rs = pst.executeQuery(); + if (rs.next()) { + num = rs.getInt(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, num, sql, siteUserId, siteFriendId); + return num; + } + + public int getApplyCount(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + int num = 0; + String sql = "SELECT COUNT(distinct site_friend_id) FROM " + FRIEND_APPLY_TABLE + " WHERE site_user_id=? "; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + + rs = pst.executeQuery(); + if (rs.next()) { + num = rs.getInt(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, num, sql, siteUserId); + return num; + } + + /** + * + * @param siteUserId + * 被请求者 + * @param siteFriendId + * 请求者 + * @return + * @throws SQLException + */ + public ApplyFriendBean getApplyInfo(String siteUserId, String siteFriendId, boolean isMaster) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT a.site_user_id,a.site_friend_id,a.apply_reason,a.apply_time from " + FRIEND_APPLY_TABLE + + " a INNER JOIN (select site_friend_id,max(apply_time) apply_time from " + FRIEND_APPLY_TABLE + + " WHERE site_user_id=? and site_friend_id=? GROUP BY site_friend_id) AS b ON a.site_friend_id=b.site_friend_id AND a.apply_time=b.apply_time WHERE a.site_user_id=?;"; + + ApplyFriendBean bean = null; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getConnection(isMaster); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setString(2, siteFriendId); + pst.setString(3, siteUserId); + + rs = pst.executeQuery(); + if (rs.next()) { + bean = new ApplyFriendBean(); + bean.setSiteUserId(rs.getString(1)); + bean.setSiteFriendId(rs.getString(2)); + bean.setApplyInfo(rs.getString(3)); + bean.setApplyTime(rs.getLong(4)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, bean, sql, siteUserId, siteFriendId); + return bean; + } + + /** + * 查询好友申请列表 + * + * @param siteUserId + * @return + * @throws SQLException + */ + public List queryApplyUsers(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + List applyUsers = new ArrayList(); + // String sql = "SELECT + // a.site_friend_id,b.user_name,b.user_photo,a.apply_reason,max(a.apply_time) + // FROM " + // + FRIEND_APPLY_TABLE + " AS a LEFT JOIN " + SQLConst.SITE_USER_PROFILE + // + " AS b ON a.site_friend_id=b.site_user_id WHERE a.site_user_id=? GROUP BY + // a.site_friend_id;"; + + String sql = "SELECT a.site_friend_id,b.user_name,b.user_photo,a.apply_reason,a.apply_time from (select c.site_friend_id,c.apply_reason,c.apply_time from " + + FRIEND_APPLY_TABLE + " c inner join (select site_friend_id,max(apply_time) apply_time from " + + FRIEND_APPLY_TABLE + + " where site_user_id=? group by site_friend_id) as d on c.site_friend_id=d.site_friend_id and c.apply_time=d.apply_time) AS a LEFT JOIN " + + SQLConst.SITE_USER_PROFILE + " AS b ON a.site_friend_id=b.site_user_id;"; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + + rs = pst.executeQuery(); + while (rs.next()) { + ApplyUserBean userBean = new ApplyUserBean(); + userBean.setUserId(rs.getString(1)); + userBean.setUserName(rs.getString(2)); + userBean.setUserPhoto(rs.getString(3)); + userBean.setApplyReason(rs.getString(4)); + userBean.setApplyTime(rs.getLong(5)); + applyUsers.add(userBean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, applyUsers.size(), sql, siteUserId); + return applyUsers; + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteGroupMessageDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteGroupMessageDao.java new file mode 100755 index 0000000..e24eea3 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteGroupMessageDao.java @@ -0,0 +1,462 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.dao; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.common.utils.TimeFormats; +import com.akaxin.site.storage.bean.GroupMessageBean; +import com.akaxin.site.storage.connection.DatabaseConnection; +import com.akaxin.site.storage.dao.sql.SQLConst; + +/** + * 群消息数据库相关操作 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-25 16:15:32 + */ +public class SiteGroupMessageDao { + private static final Logger logger = LoggerFactory.getLogger(SiteGroupMessageDao.class); + private final String GROUP_MESSAGE_TABLE = SQLConst.SITE_GROUP_MESSAGE; + private final String GROUP_POINTER_TABLE = SQLConst.SITE_GROUP_MESSAGE_POINTER; + private static SiteGroupMessageDao instance = new SiteGroupMessageDao(); + + public static SiteGroupMessageDao getInstance() { + return instance; + } + + public boolean saveGroupMessage(GroupMessageBean bean) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "INSERT INTO " + GROUP_MESSAGE_TABLE + + "(site_group_id,msg_id,send_user_id,send_device_id,msg_type,content,msg_time) VALUES(?,?,?,?,?,?,?);"; + + int result = 0; + Connection conn = null; + PreparedStatement pst = null; + try { + conn = DatabaseConnection.getConnection(); + + pst = conn.prepareStatement(sql); + pst.setString(1, bean.getSiteGroupId()); + pst.setString(2, bean.getMsgId()); + pst.setString(3, bean.getSendUserId()); + pst.setString(4, bean.getSendDeviceId()); + pst.setLong(5, bean.getMsgType()); + pst.setString(6, bean.getContent()); + pst.setLong(7, bean.getMsgTime()); + + result = pst.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, bean.getSiteGroupId(), bean.getMsgId(), + bean.getSendUserId(), bean.getSendDeviceId(), bean.getMsgType(), bean.getContent(), bean.getMsgTime()); + + return result == 1; + } + + /** + * 查询的结果,排除发送者的deviceId + * + * @param groupId + * @param userId + * @param deviceId + * @param start + * @return + * @throws SQLException + */ + public List queryGroupMessage(String groupId, String userId, String deviceId, long start, + int limit) throws SQLException { + long startTime = System.currentTimeMillis(); + List gmsgList = new ArrayList(); + String sql = "SELECT a.id,a.site_group_id,a.msg_id,a.send_user_id,a.send_device_id,a.msg_type,a.content,a.msg_time FROM " + + GROUP_MESSAGE_TABLE + " AS a LEFT JOIN " + SQLConst.SITE_GROUP_PROFILE + + " AS b ON a.site_group_id=b.site_group_id WHERE a.site_group_id=? AND a.id>? AND b.group_status=1 LIMIT ?;"; + + start = queryGroupPointer(groupId, userId, deviceId, start); + + if (start == 0) { + start = queryMaxGroupPointerWithUser(groupId, userId); + } + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, groupId); + pst.setLong(2, start); + pst.setInt(3, limit); + + rs = pst.executeQuery(); + while (rs.next()) { + GroupMessageBean gmsgBean = new GroupMessageBean(); + gmsgBean.setId(rs.getInt(1)); + gmsgBean.setSiteGroupId(rs.getString(2)); + gmsgBean.setMsgId(rs.getString(3)); + gmsgBean.setSendUserId(rs.getString(4)); + gmsgBean.setSendDeviceId(rs.getString(5)); + gmsgBean.setMsgType(rs.getInt(6)); + gmsgBean.setContent(rs.getString(7)); + gmsgBean.setMsgTime(rs.getLong(8)); + gmsgList.add(gmsgBean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, gmsgList.size(), sql, groupId, start, deviceId, limit); + return gmsgList; + } + + public List queryGroupMessageByMsgId(List msgIds) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT id,site_group_id,msg_id,send_user_id,msg_type,msg_time FROM " + GROUP_MESSAGE_TABLE + + " WHERE msg_id in ({});"; + List msgList = new ArrayList(); + StringBuilder msgIdBuider = new StringBuilder(); + for (int i = 0; i < msgIds.size(); i++) { + if (i == 0) { + msgIdBuider.append("'"); + msgIdBuider.append(msgIds.get(i)); + msgIdBuider.append("'"); + } else { + msgIdBuider.append(","); + msgIdBuider.append("'"); + msgIdBuider.append(msgIds.get(i)); + msgIdBuider.append("'"); + } + } + + sql = StringHelper.format(sql, msgIdBuider.toString()); + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + // statement.setString(1, msgIdBuider.toString()); + + rs = pst.executeQuery(); + while (rs.next()) { + GroupMessageBean bean = new GroupMessageBean(); + bean.setId(rs.getInt(1)); + bean.setSiteGroupId(rs.getString(2)); + bean.setMsgId(rs.getString(3)); + bean.setSendUserId(rs.getString(4)); + bean.setMsgType(rs.getInt(5)); + bean.setMsgTime(rs.getLong(6)); + msgList.add(bean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, msgList, sql, msgIdBuider.toString()); + return msgList; + } + + public boolean updateGroupMessagePointer(String groupId, String siteUserId, String deviceId, long finishPointer) + throws SQLException { + int result = updateGroupPointer(groupId, siteUserId, deviceId, finishPointer); + + if (result >= 1) { + return true; + } + return saveGroupPointer(groupId, siteUserId, deviceId, finishPointer); + } + + public boolean saveGroupPointer(String groupId, String userId, String deviceId, long finish) throws SQLException { + long startTime = System.currentTimeMillis(); + int result = 0; + String sql = "INSERT INTO " + GROUP_POINTER_TABLE + + "(site_group_id,site_user_id,device_id,pointer) VALUES(?,?,?,?);"; + + Connection conn = null; + PreparedStatement pst = null; + try { + conn = DatabaseConnection.getConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, groupId); + pst.setString(2, userId); + pst.setString(3, deviceId); + pst.setLong(4, finish); + result = pst.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, groupId, userId, deviceId, finish); + return result == 1; + } + + private int updateGroupPointer(String groupId, String userId, String deviceId, long finish) throws SQLException { + long startTime = System.currentTimeMillis(); + int result = 0; + String sql = "UPDATE " + GROUP_POINTER_TABLE + + " SET pointer=? WHERE site_group_id=? AND site_user_id=? AND device_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + try { + conn = DatabaseConnection.getConnection(); + pst = conn.prepareStatement(sql); + pst.setLong(1, finish); + pst.setString(2, groupId); + pst.setString(3, userId); + pst.setString(4, deviceId); + result = pst.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, finish, userId, groupId, deviceId); + return result; + } + + public long queryGroupPointer(String groupId, String siteUserId, String deviceId, long start) throws SQLException { + long startTime = System.currentTimeMillis(); + long pointer = 0; + String sql = "SELECT pointer FROM " + GROUP_POINTER_TABLE + + " WHERE site_group_id=? AND site_user_id=? AND device_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, groupId); + pst.setString(2, siteUserId); + pst.setString(3, deviceId); + + rs = pst.executeQuery(); + if (rs.next()) { + pointer = rs.getLong(1); + } + } catch (SQLException e) { + logger.error("query group message pointer error.", e); + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, "pointer:" + pointer + ",start:" + start, sql, siteUserId, groupId, + deviceId); + return pointer > start ? pointer : start; + } + + private long queryMaxGroupPointerWithUser(String groupId, String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + long pointer = 0; + String sql = "SELECT max(pointer) FROM " + GROUP_POINTER_TABLE + " WHERE site_group_id=? AND site_user_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, groupId); + pst.setString(2, siteUserId); + + rs = pst.executeQuery(); + if (rs.next()) { + pointer = rs.getLong(1); + } + } catch (SQLException e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, pointer, sql, siteUserId, groupId); + return pointer; + } + + public long queryMaxGroupPointer(String groupId) throws SQLException { + long startTime = System.currentTimeMillis(); + long pointer = 0; + String sql = "SELECT MAX(id) FROM " + GROUP_MESSAGE_TABLE + " WHERE site_group_id=?;"; + + Connection conn = null; + PreparedStatement ps = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, groupId); + + rs = ps.executeQuery(); + if (rs.next()) { + pointer = rs.getLong(1); + } + } catch (SQLException e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps, rs); + } + + LogUtils.dbDebugLog(logger, startTime, pointer, sql, groupId); + return pointer; + } + + public long queryMaxUserGroupPointer(String groupId, String siteUserId) { + long startTime = System.currentTimeMillis(); + long pointer = 0; + String sql = "SELECT MAX(pointer) FROM " + GROUP_POINTER_TABLE + " WHERE site_group_id=? AND site_user_id=?;"; + + Connection conn = null; + PreparedStatement ps = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, groupId); + ps.setString(2, siteUserId); + + rs = ps.executeQuery(); + if (rs.next()) { + pointer = rs.getLong(1); + } + } catch (SQLException e) { + logger.error("query max user group message pointer error.", e); + } finally { + DatabaseConnection.returnConnection(conn, ps, rs); + } + + LogUtils.dbDebugLog(logger, startTime, pointer, sql, siteUserId, groupId); + return pointer; + } + + public int queryNumMessagePerDay(long now, int day) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT COUNT(*) FROM " + GROUP_MESSAGE_TABLE + " WHERE msg_time BETWEEN ? and ? "; + long startTimeOfDay = TimeFormats.getStartTimeOfDay(now); + long endTimeOfDay = TimeFormats.getEndTimeOfDay(now); + if (day != 0) { + startTimeOfDay = startTimeOfDay - TimeUnit.DAYS.toMillis(day); + endTimeOfDay = endTimeOfDay - TimeUnit.DAYS.toMillis(day); + } + + int groupCount = 0; + Connection conn = null; + PreparedStatement ps = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + ps = conn.prepareStatement(sql); + ps.setLong(1, startTimeOfDay); + ps.setLong(2, endTimeOfDay); + rs = ps.executeQuery(); + + if (rs.next()) { + groupCount = rs.getInt(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps, rs); + } + + LogUtils.dbDebugLog((logger), startTime, groupCount, sql, startTimeOfDay, endTimeOfDay); + return groupCount; + } + + public boolean delUserMessage(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + boolean result = false; + String sql_msg = "DELETE FROM " + GROUP_MESSAGE_TABLE + " WHERE send_user_id = ? "; + String sql_pointer = "DELETE FROM " + GROUP_POINTER_TABLE + " WHERE site_user_id = ? "; + + Connection conn = null; + PreparedStatement preparedStatement = null; + try { + conn = DatabaseConnection.getConnection(); + preparedStatement = conn.prepareStatement(sql_msg); + preparedStatement.setString(1, siteUserId); + int res1 = preparedStatement.executeUpdate(); + + preparedStatement.clearParameters(); + preparedStatement.close(); + preparedStatement = conn.prepareStatement(sql_pointer); + preparedStatement.setString(1, siteUserId); + int res2 = preparedStatement.executeUpdate(); + if (res1 > 0 && res2 > 0) { + result = true; + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, preparedStatement); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql_msg, siteUserId); + LogUtils.dbDebugLog(logger, startTime, result, sql_pointer, siteUserId); + return false; + } + + public List queryMessageFile(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "select content from (select * from " + GROUP_MESSAGE_TABLE + + " where msg_type in (9,13)) t where send_user_id = ?"; + List groupFiles = new ArrayList(); + + Connection conn = null; + PreparedStatement preparedStatement = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + preparedStatement = conn.prepareStatement(sql); + preparedStatement.setString(1, siteUserId); + rs = preparedStatement.executeQuery(); + + while (rs.next()) { + groupFiles.add(rs.getString(1)); + } + LogUtils.dbDebugLog(logger, startTime, rs, sql); + } catch (SQLException e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, preparedStatement, rs); + } + return groupFiles; + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteGroupProfileDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteGroupProfileDao.java new file mode 100755 index 0000000..c6b6552 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteGroupProfileDao.java @@ -0,0 +1,462 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.dao; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.TimeFormats; +import com.akaxin.site.storage.bean.GroupProfileBean; +import com.akaxin.site.storage.bean.SimpleGroupBean; +import com.akaxin.site.storage.connection.DatabaseConnection; +import com.akaxin.site.storage.dao.sql.SQLConst; +import com.akaxin.site.storage.util.SqlUtils; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-08 15:53:25 + */ +public class SiteGroupProfileDao { + private static final Logger logger = LoggerFactory.getLogger(SiteGroupProfileDao.class); + private static final String GROUP_PROFILE_TABLE = SQLConst.SITE_GROUP_PROFILE; + + private static SiteGroupProfileDao instance = new SiteGroupProfileDao(); + + public static SiteGroupProfileDao getInstance() { + return instance; + } + + public List queryGroupList(int pageNum, int pageSize) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT site_group_id,group_name,group_photo FROM " + GROUP_PROFILE_TABLE + + " WHERE group_status>0 ORDER BY id DESC LIMIT ?,?;"; + List beanList = new ArrayList(); + + int startNum = (pageNum - 1) * pageSize; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + + pst = conn.prepareStatement(sql); + pst.setInt(1, startNum); + pst.setInt(2, pageSize); + + rs = pst.executeQuery(); + while (rs.next()) { + SimpleGroupBean bean = new SimpleGroupBean(); + bean.setGroupId(rs.getString(1)); + bean.setGroupName(rs.getString(2)); + bean.setGroupPhoto(rs.getString(3)); + beanList.add(bean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, beanList.size(), sql, startNum, pageSize); + return beanList; + } + + public GroupProfileBean saveGroupProfile(GroupProfileBean bean) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "INSERT INTO " + GROUP_PROFILE_TABLE + + "(site_group_id,group_name,group_photo,group_notice,group_status,create_user_id,close_invite_group_chat,create_time) VALUES(?,?,?,?,1,?,?,?);"; + + if (bean.getGroupId() == null) { + String siteGroupId = UUID.randomUUID().toString(); + bean.setGroupId(siteGroupId.replace("-", "")); + } + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + + ps = conn.prepareStatement(sql); + ps.setString(1, bean.getGroupId()); + ps.setString(2, bean.getGroupName()); + ps.setString(3, bean.getGroupPhoto()); + ps.setString(4, bean.getGroupNotice()); + ps.setString(5, bean.getCreateUserId()); + ps.setBoolean(6, true);// 默认允许群成员添加新的群聊成员? + ps.setLong(7, bean.getCreateTime()); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, bean.getGroupId()); + return result > 0 ? bean : null; + } + + public GroupProfileBean queryGroupProfile(String siteGroupId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT site_group_id,group_name,group_photo,group_notice,ts_status,create_user_id,group_status,close_invite_group_chat,create_time FROM " + + GROUP_PROFILE_TABLE + " WHERE site_group_id=?;"; + GroupProfileBean profileBean = null; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteGroupId); + + rs = pst.executeQuery(); + if (rs.next()) { + profileBean = new GroupProfileBean(); + profileBean.setGroupId(rs.getString(1)); + profileBean.setGroupName(rs.getString(2)); + profileBean.setGroupPhoto(rs.getString(3)); + profileBean.setGroupNotice(rs.getString(4)); + profileBean.setTsStatus(rs.getInt(5)); + profileBean.setCreateUserId(rs.getString(6)); + profileBean.setGroupStatus(rs.getInt(7)); + profileBean.setCloseInviteGroupChat(rs.getBoolean(8)); + profileBean.setCreateTime(rs.getLong(9)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, profileBean, sql, siteGroupId); + return profileBean; + } + + public GroupProfileBean querySimpleGroupProfile(String siteGroupId) throws SQLException { + long startTime = System.currentTimeMillis(); + GroupProfileBean profileBean = null; + String sql = "SELECT site_group_id,group_name,group_photo FROM " + GROUP_PROFILE_TABLE + + " WHERE site_group_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteGroupId); + + rs = pst.executeQuery(); + if (rs.next()) { + profileBean = new GroupProfileBean(); + profileBean.setGroupId(rs.getString(1)); + profileBean.setGroupName(rs.getString(2)); + profileBean.setGroupPhoto(rs.getString(3)); + } + } catch (SQLException e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, profileBean, sql, siteGroupId); + return profileBean; + } + + /** + *

+	 * status = 0:删除的群组
+	 * status = 1:正常的群
+	 * 
+ * + * @param siteGroupId + * @return + * @throws SQLException + */ + public int queryGroupStatus(String siteGroupId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT group_status FROM " + GROUP_PROFILE_TABLE + " WHERE site_group_id=?;"; + int result = 0; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + + pst = conn.prepareStatement(sql); + pst.setString(1, siteGroupId); + + rs = pst.executeQuery(); + if (rs.next()) { + result = rs.getInt(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteGroupId); + return result; + } + + public int updateGroupProfile(GroupProfileBean bean) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + GROUP_PROFILE_TABLE + " {} WHERE site_group_id=?;"; + int result = 0; + + Map sqlMap = new HashMap(); + sqlMap.put("group_name", bean.getGroupName()); + sqlMap.put("group_photo", bean.getGroupPhoto()); + sqlMap.put("group_notice", bean.getGroupNotice()); + + SqlUtils.SqlBean sqlBean = SqlUtils.buildUpdateSql(sql, sqlMap); + String realSql = sqlBean.getSql(); + + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + + ps = conn.prepareStatement(realSql); + for (Integer index : sqlBean.getParams().keySet()) { + ps.setString(index, sqlBean.getParams().get(index)); + } + ps.setString(sqlBean.getParams().size() + 1, bean.getGroupId()); + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, realSql, bean.getGroupName(), bean.getGroupPhoto(), + bean.getGroupNotice(), bean.getGroupId()); + return result; + } + + /** + * 更新是否可以邀请群聊的状态值 + * + * @param bean + * @return + * @throws SQLException + */ + public int updateGroupIGC(GroupProfileBean bean) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + GROUP_PROFILE_TABLE + " SET close_invite_group_chat=? WHERE site_group_id=?;"; + int result = 0; + + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setBoolean(1, bean.isCloseInviteGroupChat()); + ps.setString(2, bean.getGroupId()); + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, bean.isCloseInviteGroupChat(), bean.getGroupId()); + return result; + } + + public int updateGroupOwer(String siteUserId, String groupId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + GROUP_PROFILE_TABLE + " SET create_user_id=? WHERE site_group_id=?;"; + int result = 0; + + Connection conn = null; + PreparedStatement pst = null; + try { + conn = DatabaseConnection.getConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setString(2, groupId); + result = pst.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteUserId, groupId); + return result; + } + + public boolean deleteGroupProfile(String groupId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + GROUP_PROFILE_TABLE + " SET group_status=0 WHERE site_group_id=?;"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, groupId); + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql); + return result > 0; + } + + public String getGrouMaster(String groupId) throws SQLException { + long startTime = System.currentTimeMillis(); + String siteUserId = null; + String sql = "SELECT create_user_id FROM " + GROUP_PROFILE_TABLE + " WHERE site_group_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + + pst = conn.prepareStatement(sql); + pst.setString(1, groupId); + + rs = pst.executeQuery(); + if (rs.next()) { + siteUserId = rs.getString(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, siteUserId, sql, groupId); + return siteUserId; + } + + public int getTotalGroupNum() throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT COUNT(*) FROM " + GROUP_PROFILE_TABLE + " WHERE group_status = 1;"; + + int groupNum = 0; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + rs = pst.executeQuery(); + if (rs.next()) { + groupNum = rs.getInt(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, groupNum, sql); + return groupNum; + } + + public int getGroupNum(long now, int day) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT COUNT(*) FROM " + GROUP_PROFILE_TABLE + " WHERE create_time < ? and group_status = 1 "; + + long endTimeOfDay = TimeFormats.getEndTimeOfDay(now); + if (day != 0) { + endTimeOfDay = endTimeOfDay - TimeUnit.DAYS.toMillis(day); + } + + int groupNum = 0; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setLong(1, endTimeOfDay); + + rs = pst.executeQuery(); + if (rs.next()) { + groupNum = rs.getInt(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, groupNum, sql); + return groupNum; + + } + + public boolean rmGroupProfile(String groupId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql1 = "DELETE FROM " + GROUP_PROFILE_TABLE + " WHERE site_group_id=?;"; + String sql2 = "DELETE FROM " + SQLConst.SITE_USER_GROUP + " WHERE site_group_id=?;"; + + int result1; + int result2; + Connection conn = null; + PreparedStatement pst = null; + try { + conn = DatabaseConnection.getConnection(); + + pst = conn.prepareStatement(sql1); + pst.setString(1, groupId); + result1 = pst.executeUpdate(); + + pst.clearParameters(); + pst.close(); + + pst = conn.prepareStatement(sql2); + pst.setString(1, groupId); + result2 = pst.executeUpdate(); + + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst); + } + + LogUtils.dbDebugLog(logger, startTime, result1, sql1, groupId); + LogUtils.dbDebugLog(logger, startTime, result2, sql2, groupId); + return result1 > 0 && result2 > 0; + + } +} \ No newline at end of file diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SitePluginDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SitePluginDao.java new file mode 100755 index 0000000..6de6a3c --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SitePluginDao.java @@ -0,0 +1,424 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.dao; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.site.storage.bean.PluginBean; +import com.akaxin.site.storage.connection.DatabaseConnection; +import com.akaxin.site.storage.dao.sql.SQLConst; + +/** + * 站点扩展表相关数据操作 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-11 17:26:52 + */ +public class SitePluginDao { + private static final Logger logger = LoggerFactory.getLogger(SitePluginDao.class); + private final String PLUGIN_TABLE = SQLConst.SITE_PLUGIN_MANAGER; + + public static SitePluginDao getInstance() { + return SingletonHolder.instance; + } + + static class SingletonHolder { + private static SitePluginDao instance = new SitePluginDao(); + } + + public boolean addPlugin(PluginBean bean) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "INSERT INTO " + PLUGIN_TABLE// + + "(name," // + + "icon," // + + "url_page,"// + + "api_url,"// + + "auth_key,"// + + "allowed_ip,"// + + "position,"// + + "sort,"// + + "display_mode,"// + + "permission_status,"// + + "add_time) VALUES(?,?,?,?,?,?,?,?,?,?,?);"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, bean.getName()); + ps.setString(2, bean.getIcon()); + ps.setString(3, bean.getUrlPage()); + ps.setString(4, bean.getApiUrl()); + ps.setString(5, bean.getAuthKey()); + ps.setString(6, bean.getAllowedIp()); + ps.setInt(7, bean.getPosition()); + ps.setInt(8, bean.getSort()); + ps.setInt(9, bean.getDisplayMode()); + ps.setInt(10, bean.getPermissionStatus()); + ps.setLong(11, bean.getAddTime()); + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, bean.getName(), bean.getIcon(), bean.getUrlPage(), + bean.getApiUrl(), bean.getAuthKey(), bean.getAllowedIp(), bean.getPosition(), bean.getSort(), + bean.getDisplayMode(), bean.getPermissionStatus(), bean.getAddTime()); + return result > 0; + } + + public boolean updatePlugin(PluginBean bean) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + PLUGIN_TABLE + " SET "// + + "name=?,"// + + "icon=?,"// + + "url_page=?,"// + + "api_url=?,"// + + "allowed_ip=?,"// + + "position=?,"// + + "sort=?,"// + + "display_mode=?,"// + + "permission_status=? "// + + "WHERE id=?;"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, bean.getName()); + ps.setString(2, bean.getIcon()); + ps.setString(3, bean.getUrlPage()); + ps.setString(4, bean.getApiUrl()); + ps.setString(5, bean.getAllowedIp()); + ps.setInt(6, bean.getPosition()); + ps.setInt(7, bean.getSort()); + ps.setInt(8, bean.getDisplayMode()); + ps.setInt(9, bean.getPermissionStatus()); + ps.setInt(10, bean.getId()); + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, bean.getName(), bean.getIcon(), bean.getUrlPage(), + bean.getApiUrl(), bean.getAllowedIp(), bean.getPosition(), bean.getSort(), bean.getDisplayMode(), + bean.getPermissionStatus(), bean.getId()); + return result > 0; + } + + public boolean deletePlugin(int pluginId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "DELETE FROM " + PLUGIN_TABLE + " WHERE id=?;"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setInt(1, pluginId); + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, pluginId); + return result > 0; + } + + public PluginBean queryPluginProfile(int pluginId) throws SQLException { + long startTime = System.currentTimeMillis(); + PluginBean pluginBean = new PluginBean(); + String sql = "SELECT id," // + + "name,"// + + "icon,"// + + "url_page,"// + + "api_url,"// + + "auth_key,"// + + "allowed_ip,"// + + "position,"// + + "sort,"// + + "display_mode,"// + + "permission_status"// + + " FROM " + PLUGIN_TABLE + " WHERE id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setInt(1, pluginId); + + rs = pst.executeQuery(); + if (rs.next()) { + pluginBean.setId(rs.getInt(1)); + pluginBean.setName(rs.getString(2)); + pluginBean.setIcon(rs.getString(3)); + pluginBean.setUrlPage(rs.getString(4)); + pluginBean.setApiUrl(rs.getString(5)); + pluginBean.setAuthKey(rs.getString(6)); + pluginBean.setAllowedIp(rs.getString(7)); + pluginBean.setPosition(rs.getInt(8)); + pluginBean.setSort(rs.getInt(9)); + pluginBean.setDisplayMode(rs.getInt(10)); + pluginBean.setPermissionStatus(rs.getInt(11)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, pluginBean, sql, pluginId); + return pluginBean; + } + + /** + * 按照位置和权限,分页查询 + * + * @param pageNum + * @param pageSize + * @param position + * @param permissionStatus + * @return + * @throws SQLException + */ + public List queryPluginList(int pageNum, int pageSize, int position, int permissionStatus) + throws SQLException { + long startTime = System.currentTimeMillis(); + List pluginList = new ArrayList(); + String sql = "SELECT id," // + + "name,"// + + "icon,"// + + "url_page,"// + + "api_url,"// + + "auth_key,"// + + "sort,"// + + "position,"// + + "display_mode,"// + + "permission_status"// + + " FROM " + PLUGIN_TABLE + " WHERE "// + + "position=? AND " + "permission_status=? " + "ORDER BY sort LIMIT ?,?;"; + + int startNum = (pageNum - 1) * pageSize; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setInt(1, position); + pst.setInt(2, permissionStatus); + pst.setInt(3, startNum); + pst.setInt(4, pageSize); + + rs = pst.executeQuery(); + while (rs.next()) { + PluginBean bean = new PluginBean(); + bean.setId(rs.getInt(1)); + bean.setName(rs.getString(2)); + bean.setIcon(rs.getString(3)); + bean.setUrlPage(rs.getString(4)); + bean.setApiUrl(rs.getString(5)); + bean.setAuthKey(rs.getString(6)); + bean.setSort(rs.getInt(7)); + bean.setPosition(rs.getInt(8)); + bean.setDisplayMode(rs.getInt(9)); + bean.setPermissionStatus(rs.getInt(10)); + pluginList.add(bean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, pluginList.size(), sql, position, permissionStatus, startNum, pageSize); + return pluginList; + } + + /** + * 按照位置,分页查询 + * + * @param pageNum + * @param pageSize + * @param position + * @return + * @throws SQLException + */ + public List queryPluginList(int pageNum, int pageSize, int position) throws SQLException { + long startTime = System.currentTimeMillis(); + List pluginList = new ArrayList(); + String sql = "SELECT id," // + + "name,"// + + "icon,"// + + "url_page,"// + + "api_url,"// + + "auth_key,"// + + "sort,"// + + "position,"// + + "display_mode,"// NewPage or FloatingPage + + "permission_status"// + + " FROM " + PLUGIN_TABLE + " WHERE "// + + "position=? ORDER BY sort LIMIT ?,?;"; + + int startNum = (pageNum - 1) * pageSize; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + + pst = conn.prepareStatement(sql); + pst.setInt(1, position); + pst.setInt(2, startNum); + pst.setInt(3, pageSize); + + rs = pst.executeQuery(); + while (rs.next()) { + PluginBean bean = new PluginBean(); + bean.setId(rs.getInt(1)); + bean.setName(rs.getString(2)); + bean.setIcon(rs.getString(3)); + bean.setUrlPage(rs.getString(4)); + bean.setApiUrl(rs.getString(5)); + bean.setAuthKey(rs.getString(6)); + bean.setSort(rs.getInt(7)); + bean.setPosition(rs.getInt(8)); + bean.setDisplayMode(rs.getInt(9)); + bean.setPermissionStatus(rs.getInt(10)); + pluginList.add(bean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, pluginList.size(), sql, position, startNum, pageSize); + return pluginList; + } + + /** + * 分页查询所有的扩展,管理后台使用 + * + * @param pageNum + * @param pageSize + * @return + * @throws SQLException + */ + public List queryAllPluginList(int pageNum, int pageSize) throws SQLException { + long startTime = System.currentTimeMillis(); + List pluginList = new ArrayList(); + String sql = "SELECT id,"// + + "name,"// + + "icon,"// + + "url_page,"// + + "api_url,"// + + "sort,"// + + "position,"// + + "display_mode,"// + + "permission_status"// + + " FROM " + PLUGIN_TABLE + " ORDER BY sort LIMIT ?,?;"; + + int startNum = (pageNum - 1) * pageSize; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + + pst = conn.prepareStatement(sql); + pst.setInt(1, startNum); + pst.setInt(2, pageSize); + + rs = pst.executeQuery(); + while (rs.next()) { + PluginBean bean = new PluginBean(); + bean.setId(rs.getInt(1)); + bean.setName(rs.getString(2)); + bean.setIcon(rs.getString(3)); + bean.setUrlPage(rs.getString(4)); + bean.setApiUrl(rs.getString(5)); + bean.setSort(rs.getInt(6)); + bean.setPosition(rs.getInt(7)); + bean.setDisplayMode(rs.getInt(8)); + bean.setPermissionStatus(rs.getInt(9)); + pluginList.add(bean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, pluginList.size(), sql, startNum, pageSize); + return pluginList; + } + + public String resetAuthKey(int pluginId) throws SQLException { + long startTime = System.currentTimeMillis(); + String newAuthKey = StringHelper.generateRandomString(16); + String sql = "UPDATE " + PLUGIN_TABLE + " SET auth_key = ? WHERE id = ?"; + + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + + ps = conn.prepareStatement(sql); + ps.setString(1, newAuthKey); + ps.setInt(2, pluginId); + + int i = ps.executeUpdate(); + if (i == 0) { + newAuthKey = null; + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, newAuthKey, sql, newAuthKey, pluginId); + + return newAuthKey; + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteTokenDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteTokenDao.java new file mode 100755 index 0000000..a1abbb1 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteTokenDao.java @@ -0,0 +1,166 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.dao; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.logs.LogUtils; +import com.akaxin.site.storage.bean.ExpireToken; +import com.akaxin.site.storage.connection.DatabaseConnection; +import com.akaxin.site.storage.dao.sql.SQLConst; + +/** + * 用户邀请码 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-11 17:26:52 + */ +public class SiteTokenDao { + private static final Logger logger = LoggerFactory.getLogger(SiteTokenDao.class); + + private final String TOKEN_TABLE = SQLConst.SITE_EXPIRE_TOKEN; + + public static SiteTokenDao getInstance() { + return SingletonHolder.instance; + } + + static class SingletonHolder { + private static SiteTokenDao instance = new SiteTokenDao(); + } + + /** + * 新增UIC码 + * + * @param bean + * @return + * @throws SQLException + */ + public boolean addToken(ExpireToken bean) throws SQLException { + long startTime = System.currentTimeMillis(); + + String sql = "INSERT INTO " + TOKEN_TABLE + + "(token,bid,btype,status,content,create_time,expire_time) VALUES(?,?,?,?,?,?,?);"; + + int result; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + + ps = conn.prepareStatement(sql); + ps.setString(1, bean.getToken()); + ps.setString(2, bean.getBid()); + ps.setInt(3, bean.getBtype()); + ps.setInt(4, 1);// 0:失效 1:正常使用 + ps.setString(5, ""); + ps.setLong(6, bean.getCreateTime()); + ps.setLong(7, bean.getExpireTime()); + + result = ps.executeUpdate(); + } catch (SQLException e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, bean.getToken(), bean.getBid(), bean.getBtype(), + bean.getStatus(), "", bean.getCreateTime(), bean.getExpireTime()); + return result > 0; + } + + /** + * @param uic + * @return + * @throws SQLException + */ + public ExpireToken queryExpireToken(String token) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT token,bid,btype,status,create_time,expire_time FROM " + TOKEN_TABLE + + " WHERE token=? AND status>0;"; + + ExpireToken bean = null; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + + pst = conn.prepareStatement(sql); + pst.setString(1, token); + + rs = pst.executeQuery(); + if (rs.next()) { + bean = new ExpireToken(); + bean.setToken(rs.getString(1)); + bean.setBid(rs.getString(2)); + bean.setBtype(rs.getInt(3)); + bean.setStatus(rs.getInt(4)); + bean.setCreateTime(rs.getLong(5)); + bean.setExpireTime(rs.getLong(6)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, bean, sql, token); + return bean; + } + + public ExpireToken queryExpireTokenByBid(String bid, long time) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT token,bid,btype,status,create_time,expire_time FROM " + TOKEN_TABLE + + " WHERE bid=? AND status>0 AND create_time>time limit 1;"; + + ExpireToken bean = null; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + + pst = conn.prepareStatement(sql); + pst.setString(1, bid); + pst.setLong(2, time); + + rs = pst.executeQuery(); + if (rs.next()) { + bean = new ExpireToken(); + bean.setToken(rs.getString(1)); + bean.setBid(rs.getString(2)); + bean.setBtype(rs.getInt(3)); + bean.setStatus(rs.getInt(4)); + bean.setCreateTime(rs.getLong(5)); + bean.setExpireTime(rs.getLong(6)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, bean, sql, bid, time); + return bean; + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteU2MessageDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteU2MessageDao.java new file mode 100755 index 0000000..df5cd8c --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteU2MessageDao.java @@ -0,0 +1,455 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.dao; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.common.utils.TimeFormats; +import com.akaxin.site.storage.bean.U2MessageBean; +import com.akaxin.site.storage.connection.DatabaseConnection; +import com.akaxin.site.storage.dao.sql.SQLConst; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:14:23 + */ +public class SiteU2MessageDao { + private static final Logger logger = LoggerFactory.getLogger(SiteU2MessageDao.class); + private static final String USER2_MESSAGE_TABLE = SQLConst.SITE_USER_MESSAGE; + private static final String USER2_MESSAGE_POINATER_TABLE = SQLConst.SITE_MESSAGE_POINTER; + private static SiteU2MessageDao instance = new SiteU2MessageDao(); + + public static SiteU2MessageDao getInstance() { + return instance; + } + + public boolean saveU2Message(U2MessageBean bean) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "INSERT INTO " + USER2_MESSAGE_TABLE + + "(site_user_id,msg_id,send_user_id,receive_user_id,msg_type,content,device_id,ts_key,msg_time) VALUES(?,?,?,?,?,?,?,?,?);"; + + int result = 0; + Connection conn = null; + PreparedStatement pst = null; + try { + conn = DatabaseConnection.getConnection(); + + pst = conn.prepareStatement(sql); + pst.setString(1, bean.getSiteUserId()); + pst.setString(2, bean.getMsgId()); + pst.setString(3, bean.getSendUserId()); + pst.setString(4, bean.getReceiveUserId()); + pst.setLong(5, bean.getMsgType()); + pst.setString(6, bean.getContent()); + pst.setString(7, bean.getDeviceId()); + pst.setString(8, bean.getTsKey()); + pst.setLong(9, bean.getMsgTime()); + + result = pst.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, bean.getSiteUserId(), bean.getMsgId(), bean.getSendUserId(), + bean.getMsgType(), bean.getContent(), bean.getDeviceId(), bean.getTsKey(), bean.getMsgTime()); + return result == 1; + } + + public List getU2Message(String userId, String deviceId, long start, long limit) + throws SQLException { + long startTime = System.currentTimeMillis(); + List msgList = new ArrayList(); + String sql = "SELECT id,site_user_id,msg_id,send_user_id,receive_user_id,msg_type,content,device_id,ts_key,msg_time FROM " + + USER2_MESSAGE_TABLE + " WHERE site_user_id=? AND id>? LIMIT ?;"; + + long pointer = queryU2MessagePointer(userId, deviceId); + start = start > pointer ? start : pointer; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, userId); + pst.setLong(2, start); + pst.setLong(3, limit); + + rs = pst.executeQuery(); + while (rs.next()) { + U2MessageBean u2MsgBean = new U2MessageBean(); + u2MsgBean.setId(rs.getInt(1)); + u2MsgBean.setSiteUserId(rs.getString(2)); + u2MsgBean.setMsgId(rs.getString(3)); + u2MsgBean.setSendUserId(rs.getString(4)); + u2MsgBean.setReceiveUserId(rs.getString(5)); + u2MsgBean.setMsgType(rs.getInt(6)); + u2MsgBean.setContent(rs.getString(7)); + u2MsgBean.setDeviceId(rs.getString(8)); + u2MsgBean.setTsKey(rs.getString(9)); + u2MsgBean.setMsgTime(rs.getLong(10)); + + msgList.add(u2MsgBean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, msgList.size(), sql, userId, start, limit); + return msgList; + } + + public List queryU2MessageByMsgId(List msgIds) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT id,site_user_id,msg_id,send_user_id,receive_user_id,msg_type,msg_time FROM " + + USER2_MESSAGE_TABLE + " WHERE msg_id in ({});"; + + List msgList = new ArrayList(); + + StringBuilder msgIdBuider = new StringBuilder(); + for (int i = 0; i < msgIds.size(); i++) { + if (i == 0) { + msgIdBuider.append("'"); + msgIdBuider.append(msgIds.get(i)); + msgIdBuider.append("'"); + } else { + msgIdBuider.append(","); + msgIdBuider.append("'"); + msgIdBuider.append(msgIds.get(i)); + msgIdBuider.append("'"); + } + } + + sql = StringHelper.format(sql, msgIdBuider.toString()); + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + + rs = pst.executeQuery(); + while (rs.next()) { + U2MessageBean bean = new U2MessageBean(); + bean.setId(rs.getInt(1)); + bean.setSiteUserId(rs.getString(2)); + bean.setMsgId(rs.getString(3)); + bean.setSendUserId(rs.getString(4)); + bean.setReceiveUserId(rs.getString(5)); + bean.setMsgType(rs.getInt(6)); + bean.setMsgTime(rs.getLong(7)); + msgList.add(bean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, msgList, sql, msgIdBuider.toString()); + return msgList; + } + + public long queryU2MessagePointer(String siteUserId, String deviceId) throws SQLException { + long startTime = System.currentTimeMillis(); + long pointer = 0; + String sql = "SELECT pointer FROM " + USER2_MESSAGE_POINATER_TABLE + " WHERE site_user_id=? AND device_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setString(2, deviceId); + + rs = pst.executeQuery(); + if (rs.next()) { + pointer = rs.getLong(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, pointer, sql, siteUserId, deviceId); + return pointer == 0 ? queryMaxU2MessagePointer(siteUserId) - 10 : pointer; + } + + public long queryMaxU2MessagePointer(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + long pointer = 0; + String sql = "SELECT max(pointer) FROM " + USER2_MESSAGE_POINATER_TABLE + " WHERE site_user_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + + rs = pst.executeQuery(); + if (rs.next()) { + pointer = rs.getLong(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, pointer, sql, siteUserId); + return pointer; + } + + /** + * 查找最大的消息id,消息id在游标表中为游标 + * + * @param siteUserId + * @return + * @throws SQLException + */ + public long queryMaxU2MessageId(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + long maxPointer = 0; + String sql = "SELECT max(id) FROM " + USER2_MESSAGE_TABLE + " WHERE site_user_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + + rs = pst.executeQuery(); + if (rs.next()) { + maxPointer = rs.getLong(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, maxPointer, sql, siteUserId); + return maxPointer; + } + + public boolean updateU2MessagePointer(String userId, String deviceId, long finish) throws SQLException { + if (checkMsgPointer(userId, deviceId)) { + return updateU2Pointer(userId, deviceId, finish); + } else { + return addU2Pointer(userId, deviceId, finish); + } + + } + + public boolean addU2Pointer(String siteUserId, String deviceId, long finish) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "INSERT INTO " + USER2_MESSAGE_POINATER_TABLE + "(site_user_id,pointer,device_id) VALUES(?,?,?)"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, siteUserId); + ps.setLong(2, finish); + ps.setString(3, deviceId); + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteUserId, finish, deviceId); + return result == 1; + } + + public boolean updateU2Pointer(String siteUserId, String deviceId, long finish) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + USER2_MESSAGE_POINATER_TABLE + " SET pointer=? WHERE site_user_id=? AND device_id=?;"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setLong(1, finish); + ps.setString(2, siteUserId); + ps.setString(3, deviceId); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, finish, siteUserId, deviceId); + return result == 1; + } + + public boolean checkMsgPointer(String siteUserId, String deviceId) throws SQLException { + long startTime = System.currentTimeMillis(); + String querySql = "SELECT pointer from " + USER2_MESSAGE_POINATER_TABLE + + " WHERE site_user_id=? AND device_id=?"; + Long pointer = null; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(querySql); + pst.setString(1, siteUserId); + pst.setString(2, deviceId); + + rs = pst.executeQuery(); + if (rs.next()) { + pointer = rs.getLong(1); + } + } catch (SQLException e) { + logger.error("check msg pointer error. siteUserId={} deviceI={}", siteUserId, deviceId); + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, pointer, siteUserId, deviceId); + return pointer != null; + } + + public int queryNumMessagePerDay(long now, int day) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT COUNT(*) FROM " + USER2_MESSAGE_TABLE + " WHERE msg_time BETWEEN ? and ? "; + long startTimeOfDay = TimeFormats.getStartTimeOfDay(now); + long endTimeOfDay = TimeFormats.getEndTimeOfDay(now); + if (day != 0) { + startTimeOfDay = startTimeOfDay - TimeUnit.DAYS.toMillis(day); + endTimeOfDay = endTimeOfDay - TimeUnit.DAYS.toMillis(day); + } + + int u2Count = 0; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setLong(1, startTimeOfDay); + pst.setLong(2, endTimeOfDay); + + rs = pst.executeQuery(); + if (rs.next()) { + u2Count = rs.getInt(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, u2Count, sql); + return u2Count; + } + + public boolean delUserMessage(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql1 = "DELETE FROM " + USER2_MESSAGE_TABLE + " WHERE site_user_id =? or send_user_id =?"; + String sql2 = "DELETE FROM " + USER2_MESSAGE_POINATER_TABLE + " WHERE site_user_id =? "; + + int res1 = 0; + int res2 = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql1); + ps.setString(1, siteUserId); + ps.setString(2, siteUserId); + res1 = ps.executeUpdate(); + + ps.clearParameters(); + ps.close(); + + ps = conn.prepareStatement(sql2); + ps.setString(1, siteUserId); + res2 = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, res1, sql1, siteUserId); + LogUtils.dbDebugLog(logger, startTime, res2, sql2, siteUserId); + return false; + } + + public List queryMessageFile(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "select content from (select * from " + USER2_MESSAGE_TABLE + + " where msg_type in (7,8,11,12)) t where site_user_id=? or send_user_id=?;"; + + ArrayList u2Files = new ArrayList<>(); + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setString(2, siteUserId); + + rs = pst.executeQuery(); + while (rs.next()) { + u2Files.add(rs.getString(1)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, rs, sql, siteUserId, siteUserId); + return u2Files; + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUICDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUICDao.java new file mode 100755 index 0000000..996b4f5 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUICDao.java @@ -0,0 +1,296 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.dao; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.site.storage.bean.UicBean; +import com.akaxin.site.storage.connection.DatabaseConnection; +import com.akaxin.site.storage.dao.sql.SQLConst; +import com.akaxin.site.storage.dao.sqlite.manager.SQLiteJDBCManager; + +/** + * 用户邀请码 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-11 17:26:52 + */ +public class SiteUICDao { + private static final Logger logger = LoggerFactory.getLogger(SiteUICDao.class); + private final String UIC_TABLE = SQLConst.SITE_USER_UIC; + private final String USER_PROFILE_TABLE = SQLConst.SITE_USER_PROFILE; + + public static SiteUICDao getInstance() { + return SingletonHolder.instance; + } + + static class SingletonHolder { + private static SiteUICDao instance = new SiteUICDao(); + } + + /** + * 新增UIC码 + * + * @param bean + * @return + * @throws SQLException + */ + public boolean addUIC(UicBean bean) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "INSERT INTO " + UIC_TABLE + "(uic,status,create_time) VALUES(?,?,?);"; + + int result; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + + ps = conn.prepareStatement(sql); + ps.setString(1, bean.getUic()); + ps.setInt(2, bean.getStatus()); + ps.setLong(3, System.currentTimeMillis()); + + result = ps.executeUpdate(); + } catch (SQLException e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, bean.getUic(), bean.getStatus(), startTime); + return result > 0; + } + + /** + * 批量新增UIC + * + * @param bean + * @param num + * @return + * @throws SQLException + */ + public boolean batchAddUIC(UicBean bean, int num, int length) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "INSERT INTO " + UIC_TABLE + "(uic,status,create_time) VALUES(?,?,?);"; + int successCount = 0; + length = length < 6 ? 6 : length;// 最短6位 + + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + conn.setAutoCommit(false); + for (int i = 0; i < num; i++) { + try { + String uicValue = StringHelper.generateRandomNumber(length); + + ps = conn.prepareStatement(sql); + ps.setString(1, uicValue); + ps.setInt(2, bean.getStatus()); + ps.setLong(3, System.currentTimeMillis()); + ps.executeUpdate(); + + ps.clearParameters(); + successCount++; + } catch (Exception e) { + logger.error("execute uic sql error ", e); + } + } + conn.commit(); + conn.setAutoCommit(true); + } catch (Exception e) { + conn.rollback(); + logger.error(StringHelper.format("batch add uic error bean={} num={}", bean.toString(), num), e); + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, successCount, sql, "randomUic", bean.getStatus(), + System.currentTimeMillis()); + return successCount > 0; + } + + /** + * 查询UIC使用情况 + * + * @param uic + * @return + * @throws SQLException + */ + public UicBean queryUIC(String uic) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT uic,site_user_id,status,create_time,use_time FROM " + UIC_TABLE + " WHERE uic=?;"; + + UicBean bean = null; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + + pst = conn.prepareStatement(sql); + pst.setString(1, uic); + + rs = pst.executeQuery(); + if (rs.next()) { + bean = new UicBean(); + bean.setUic(rs.getString(1)); + bean.setSiteUserId(rs.getString(2)); + bean.setStatus(rs.getInt(3)); + bean.setCreateTime(rs.getLong(4)); + bean.setUseTime(rs.getLong(5)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, bean, sql, uic); + return bean; + } + + /** + * 更新用户使用的UIC + * + * @param bean + * @return + * @throws SQLException + */ + public boolean updateUIC(UicBean bean) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + UIC_TABLE + " SET site_user_id=?,status=?,use_time=? WHERE uic=?;"; + + long currentTime = System.currentTimeMillis(); + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + + ps = conn.prepareStatement(sql); + ps.setString(1, bean.getSiteUserId()); + ps.setInt(2, bean.getStatus()); + ps.setLong(3, currentTime); + ps.setString(4, bean.getUic()); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, bean.getSiteUserId(), bean.getStatus(), currentTime, + bean.getUic()); + return result > 0; + } + + public List queryUicList(int pageNum, int pageSize, int status) throws SQLException { + long startTime = System.currentTimeMillis(); + List uicList = new ArrayList(); + String sql = "SELECT a.id,a.uic,a.site_user_id,b.user_name,a.create_time,a.use_time FROM " + UIC_TABLE + + " AS a LEFT JOIN " + USER_PROFILE_TABLE + + " AS b ON a.site_user_id=b.site_user_id where a.status=? LIMIT ?,?;"; + + int startNum = (pageNum - 1) * pageSize; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setInt(1, status); + pst.setInt(2, startNum); + pst.setInt(3, pageSize); + + rs = pst.executeQuery(); + while (rs.next()) { + UicBean bean = new UicBean(); + bean.setId(rs.getInt(1)); + bean.setUic(rs.getString(2)); + bean.setSiteUserId(rs.getString(3)); + bean.setUserName(rs.getString(4)); + bean.setCreateTime(rs.getLong(5)); + bean.setUseTime(rs.getLong(6)); + uicList.add(bean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, uicList, sql); + return uicList; + } + + /** + * 查询所有UIC列表 + * + * @param pageNum + * @param pageSize + * @return + * @throws SQLException + */ + public List queryAllUicList(int pageNum, int pageSize) throws SQLException { + long startTime = System.currentTimeMillis(); + List uicList = new ArrayList(); + String sql = "SELECT a.id,a.uic,a.site_user_id,b.user_name,a.create_time,a.use_time FROM " + UIC_TABLE + + " AS a LEFT JOIN " + USER_PROFILE_TABLE + " AS b ON a.site_user_id=b.site_user_id LIMIT ?,?;"; + + int startNum = (pageNum - 1) * pageSize; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setInt(1, startNum); + pst.setInt(2, pageSize); + + rs = pst.executeQuery(); + while (rs.next()) { + UicBean bean = new UicBean(); + bean.setId(rs.getInt(1)); + bean.setUic(rs.getString(2)); + bean.setSiteUserId(rs.getString(3)); + bean.setUserName(rs.getString(4)); + bean.setCreateTime(rs.getLong(5)); + bean.setUseTime(rs.getLong(6)); + uicList.add(bean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, uicList, sql, startNum, pageSize); + return uicList; + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUserDeviceDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUserDeviceDao.java new file mode 100755 index 0000000..a96d791 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUserDeviceDao.java @@ -0,0 +1,471 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.dao; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.logs.LogUtils; +import com.akaxin.site.storage.bean.UserDeviceBean; +import com.akaxin.site.storage.connection.DatabaseConnection; +import com.akaxin.site.storage.dao.sql.SQLConst; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.11.11 14:33:56 + */ +public class SiteUserDeviceDao { + private static final Logger logger = LoggerFactory.getLogger(SiteUserDeviceDao.class); + private static final String USER_DEVICE_TABLE = SQLConst.SITE_USER_DEVICE; + private static final String USER_SESSION_TABLE = SQLConst.SITE_USER_SESSION; + private static SiteUserDeviceDao instance = new SiteUserDeviceDao(); + + public static SiteUserDeviceDao getInstance() { + return instance; + } + + /** + * 通过公钥查询用户DeviceId + */ + public String queryDeviceIdByDevicePuk(String siteUserId, String devicePuk) throws SQLException { + String deviceId = null; + long startTime = System.currentTimeMillis(); + String sql = "SELECT device_id FROM " + USER_DEVICE_TABLE + " WHERE user_device_pubk=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, devicePuk); + + rs = pst.executeQuery(); + if (rs.next()) { + deviceId = rs.getString(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, deviceId, sql, devicePuk); + return deviceId; + } + + public boolean save(UserDeviceBean bean) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "INSERT INTO " + USER_DEVICE_TABLE + + "(site_user_id,device_id,user_device_pubk,device_name,device_ip,user_token,active_time,add_time) VALUES(?,?,?,?,?,?,?,?);"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + + ps = conn.prepareStatement(sql); + ps.setString(1, bean.getSiteUserId()); + ps.setString(2, bean.getDeviceId()); + ps.setString(3, bean.getUserDevicePubk()); + ps.setString(4, bean.getDeviceName()); + ps.setString(5, bean.getDeviceIp()); + ps.setString(6, bean.getUserToken()); + ps.setLong(7, bean.getActiveTime()); + ps.setLong(8, bean.getAddTime()); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, bean.getSiteUserId(), bean.getDeviceId(), + bean.getUserDevicePubk(), bean.getDeviceName(), bean.getDeviceIp(), bean.getUserToken(), + bean.getActiveTime(), bean.getAddTime()); + return result == 1; + } + + public boolean update(UserDeviceBean bean) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + USER_DEVICE_TABLE + + " SET user_device_pubk=?,device_name=?,device_ip=?,user_token=?,active_time=? WHERE site_user_id=? AND device_id=?;"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + + ps = conn.prepareStatement(sql); + ps.setString(1, bean.getUserDevicePubk()); + ps.setString(2, bean.getDeviceName()); + ps.setString(3, bean.getDeviceIp()); + ps.setString(4, bean.getUserToken()); + ps.setLong(5, bean.getActiveTime()); + ps.setString(6, bean.getSiteUserId()); + ps.setString(7, bean.getDeviceId()); + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, bean.getUserDevicePubk(), bean.getDeviceName(), + bean.getDeviceIp(), bean.getUserToken(), bean.getActiveTime(), bean.getSiteUserId(), + bean.getDeviceId()); + return result == 1; + } + + public boolean updateActiveTime(String siteUserId, String deviceId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + USER_DEVICE_TABLE + " SET active_time=? WHERE site_user_id=? AND device_id=?;"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setLong(1, System.currentTimeMillis()); + ps.setString(2, siteUserId); + ps.setString(3, deviceId); + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteUserId, deviceId); + return result == 1; + } + + public UserDeviceBean queryDeviceDetails(String siteUserId, String deviceId) throws SQLException { + long startTime = System.currentTimeMillis(); + UserDeviceBean deviceBean = new UserDeviceBean(); + String sql = "SELECT a.site_user_id,a.device_id,a.login_time,b.device_name,b.device_ip,b.active_time,b.add_time from " + + USER_SESSION_TABLE + " AS a LEFT JOIN " + USER_DEVICE_TABLE + + " AS b ON a.site_user_id=b.site_user_id AND a.device_id=b.device_id WHERE a.site_user_id=? AND a.device_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setString(2, deviceId); + + rs = pst.executeQuery(); + if (rs.next()) { + deviceBean.setSiteUserId(rs.getString(1)); + deviceBean.setDeviceId(rs.getString(2)); + deviceBean.setLoginTime(rs.getLong(3)); + deviceBean.setDeviceName(rs.getString(4)); + deviceBean.setDeviceIp(rs.getString(5)); + deviceBean.setActiveTime(rs.getLong(6)); + deviceBean.setAddTime(rs.getLong(7)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, deviceBean.toString(), sql, siteUserId, deviceId); + return deviceBean; + } + + public String queryDeviceId(String site_user_id, String device_id) throws SQLException { + String deviceId = null; + long startTime = System.currentTimeMillis(); + String sql = "SELECT device_id FROM " + USER_DEVICE_TABLE + " WHERE site_user_id=? AND device_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, site_user_id); + pst.setString(2, device_id); + + rs = pst.executeQuery(); + if (rs.next()) { + deviceId = rs.getString(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, deviceId, sql, site_user_id, device_id); + return deviceId; + } + + /** + * 最新的用户设备,用户最近一次活跃时间算 + * + * @param siteUserId + * @return + * @throws SQLException + */ + public UserDeviceBean queryLatestDevice(String siteUserId) throws SQLException { + UserDeviceBean deviceBean = new UserDeviceBean(); + long startTime = System.currentTimeMillis(); + String sql = "SELECT site_user_id,device_id,user_device_pubk,device_name,active_time FROM " + USER_DEVICE_TABLE + + " WHERE site_user_id=? order by active_time desc LIMIT 1;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + + rs = pst.executeQuery(); + if (rs.next()) { + deviceBean.setSiteUserId(rs.getString(1)); + deviceBean.setDeviceId(rs.getString(2)); + deviceBean.setUserDevicePubk(rs.getString(3)); + deviceBean.setDeviceName(rs.getString(4)); + deviceBean.setActiveTime(rs.getLong(5)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, deviceBean.toString(), sql, siteUserId); + return deviceBean; + } + + public List queryDeviceList(String siteUserId) throws SQLException { + List devicesBean = new ArrayList(); + long startTime = System.currentTimeMillis(); + String sql = "SELECT site_user_id,device_id,user_device_pubk,device_name,active_time FROM " + USER_DEVICE_TABLE + + " WHERE site_user_id=? order by active_time desc;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + + rs = pst.executeQuery(); + while (rs.next()) { + UserDeviceBean deviceBean = new UserDeviceBean(); + deviceBean.setSiteUserId(rs.getString(1)); + deviceBean.setDeviceId(rs.getString(2)); + deviceBean.setUserDevicePubk(rs.getString(3)); + deviceBean.setDeviceName(rs.getString(4)); + deviceBean.setActiveTime(rs.getLong(5)); + devicesBean.add(deviceBean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, devicesBean.size(), sql, siteUserId); + return devicesBean; + } + + public List queryActiveDeviceList(String siteUserId) throws SQLException { + List devicesBean = new ArrayList(); + long startTime = System.currentTimeMillis(); + String sql = "SELECT a.site_user_id,a.device_id,a.login_time,b.user_device_pubk,b.device_name,b.active_time FROM " + + USER_SESSION_TABLE + " AS a LEFT JOIN " + USER_DEVICE_TABLE + + " AS b ON a.device_id=b.device_id AND a.site_user_id=b.site_user_id WHERE a.site_user_id=? ORDER BY b.active_time DESC;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + + rs = pst.executeQuery(); + while (rs.next()) { + UserDeviceBean deviceBean = new UserDeviceBean(); + deviceBean.setSiteUserId(rs.getString(1)); + deviceBean.setDeviceId(rs.getString(2)); + deviceBean.setLoginTime(rs.getLong(3)); + deviceBean.setUserDevicePubk(rs.getString(4)); + deviceBean.setDeviceName(rs.getString(5)); + deviceBean.setActiveTime(rs.getLong(6)); + devicesBean.add(deviceBean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, devicesBean.size(), sql, siteUserId); + return devicesBean; + } + + public List queryUserTokens(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + List userTokens = new ArrayList(); + String sql = "SELECT user_token,active_time FROM " + SQLConst.SITE_USER_DEVICE + + " WHERE site_user_id=? ORDER BY active_time DESC LIMIT 4;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + + rs = pst.executeQuery(); + while (rs.next()) { + String userToken = rs.getString(1); + if (StringUtils.isNotEmpty(userToken)) { + userTokens.add(userToken); + } + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, userTokens, sql, siteUserId); + return userTokens; + } + + /** + * 删除指定数量以外的其他设备 + * + * @param siteUserId + * @return + * @throws SQLException + */ + public int limitDeviceNum(String siteUserId, int limitNum) throws SQLException { + long limitTime = System.currentTimeMillis() - 7 * 24 * 60 * 60 * 1000l; + return Math.max(deleteDeviceAsLimit(siteUserId, limitNum, limitTime), + deleteSessionAsLimit(siteUserId, limitNum, limitTime)); + } + + private int deleteDeviceAsLimit(String siteUserId, int limitNum, long limitTime) throws SQLException { + long startTime = System.currentTimeMillis(); + // delete device + String sql = "DELETE FROM " + USER_DEVICE_TABLE + + " WHERE site_user_id=? AND device_id NOT IN (SELECT d.device_id FROM (SELECT device_id FROM " + + USER_DEVICE_TABLE + + " WHERE site_user_id=? AND active_time>? ORDER BY active_time DESC LIMIT ?) as d)"; + int num = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, siteUserId); + ps.setString(2, siteUserId); + ps.setLong(3, limitTime); + ps.setInt(4, limitNum); + + num = ps.executeUpdate(); + } catch (SQLException e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, num, sql, siteUserId); + return num; + } + + private int deleteSessionAsLimit(String siteUserId, int limitNum, long limitTime) throws SQLException { + long startTime = System.currentTimeMillis(); + // 删除site_user_session中设备 + String sql = "DELETE FROM " + USER_SESSION_TABLE + + " WHERE site_user_id=? AND device_id NOT IN (SELECT s.device_id FROM (SELECT device_id FROM " + + USER_DEVICE_TABLE + + " WHERE site_user_id=? AND active_time>? ORDER BY active_time DESC LIMIT ?) as s);"; + + int num = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, siteUserId); + ps.setString(2, siteUserId); + ps.setLong(3, limitTime); + ps.setInt(4, limitNum); + + num = ps.executeUpdate(); + } catch (SQLException e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, num, sql, siteUserId); + return num; + } + + public boolean delDevice(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "DELETE from " + SQLConst.SITE_USER_DEVICE + " WHERE site_user_id=? "; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, siteUserId); + result = ps.executeUpdate(); + if (result > 0) { + LogUtils.dbDebugLog(logger, startTime, result, sql, true); + return true; + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, false); + return false; + + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUserFriendDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUserFriendDao.java new file mode 100755 index 0000000..f8efc35 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUserFriendDao.java @@ -0,0 +1,482 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.dao; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.TimeFormats; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.UserFriendBean; +import com.akaxin.site.storage.connection.DatabaseConnection; +import com.akaxin.site.storage.dao.sql.SQLConst; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:14:45 + */ +public class SiteUserFriendDao { + private static final Logger logger = LoggerFactory.getLogger(SiteUserFriendDao.class); + private static final String USER_FRIEND_TABLE = SQLConst.SITE_USER_FRIEND; + private static final String USER_PROFILE_TABLE = SQLConst.SITE_USER_PROFILE; + private static SiteUserFriendDao instance = new SiteUserFriendDao(); + + public static SiteUserFriendDao getInstance() { + return instance; + } + + // siteUserId -> Friends + public int queryUserFriendNum(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT COUNT(*) FROM " + USER_FRIEND_TABLE + " WHERE site_user_id=?;"; + + int result = 0; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + + rs = pst.executeQuery(); + if (rs.next()) { + result = rs.getInt(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteUserId); + return result; + } + + // siteUserId -> Friends + public List queryUserFriends(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + List userFriendList = new ArrayList(); + String sql = "SELECT a.site_friend_id,a.alias_name,a.alias_name_in_latin,b.user_name,b.user_name_in_latin,b.user_photo FROM " + + USER_PROFILE_TABLE + " AS b LEFT JOIN " + USER_FRIEND_TABLE + " AS a " + + "ON a.site_friend_id=b.site_user_id WHERE a.site_user_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + + rs = pst.executeQuery(); + while (rs.next()) { + SimpleUserBean bean = new SimpleUserBean(); + bean.setUserId(rs.getString(1)); + bean.setAliasName(rs.getString(2)); + bean.setAliasNameInLatin(rs.getString(3)); + bean.setUserName(rs.getString(4)); + bean.setUserNameInLatin(rs.getString(5)); + bean.setUserPhoto(rs.getString(6)); + userFriendList.add(bean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, userFriendList.size(), sql, siteUserId); + return userFriendList; + } + + // 分页获取用户好友 + public List queryUserFriendsByPage(String siteUserId, int pageNum, int pageSize) + throws SQLException { + long startTime = System.currentTimeMillis(); + List userFriendList = new ArrayList(); + String sql = "SELECT a.site_friend_id,a.alias_name,a.alias_name_in_latin,b.user_name,b.user_name_in_latin,b.user_photo FROM " + + USER_FRIEND_TABLE + " AS a LEFT JOIN " + USER_PROFILE_TABLE + + " AS b WHERE a.site_friend_id=b.site_user_id AND a.site_user_id=? LIMIT ?,?;"; + + int startNum = (pageNum - 1) * pageSize; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setInt(2, startNum); + pst.setInt(3, pageSize); + + rs = pst.executeQuery(); + while (rs.next()) { + SimpleUserBean bean = new SimpleUserBean(); + bean.setUserId(rs.getString(1)); + bean.setAliasName(rs.getString(2)); + bean.setAliasNameInLatin(rs.getString(3)); + bean.setUserName(rs.getString(4)); + bean.setUserNameInLatin(rs.getString(5)); + bean.setUserPhoto(rs.getString(6)); + userFriendList.add(bean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, userFriendList.size(), sql, siteUserId); + return userFriendList; + } + + public boolean saveRelation(String siteUserId, String siteFriendId, int relation) throws SQLException { + long startTime = System.currentTimeMillis(); + int result = 0; + String sql = "INSERT INTO " + USER_FRIEND_TABLE + + "(site_user_id,site_friend_id,relation,add_time) VALUES(?,?,?,?);"; + + long currentTime = System.currentTimeMillis(); + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, siteUserId); + ps.setString(2, siteFriendId); + ps.setInt(3, relation); + ps.setLong(4, currentTime); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteUserId, siteFriendId, relation, currentTime); + return result > 0; + } + + public boolean updateRelation(String siteUserId, String siteFriendId, int relation) throws SQLException { + long startTime = System.currentTimeMillis(); + int result = 0; + String sql = "UPDATE " + USER_FRIEND_TABLE + + " SET relation=?, add_time=? WHERE site_user_id=? AND site_friend_id=?;"; + + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setInt(1, relation); + ps.setLong(2, startTime); + ps.setString(3, siteUserId); + ps.setString(4, siteFriendId); + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, relation, startTime, siteUserId, siteFriendId); + return result > 0; + } + + public int queryRelation(String siteUserId, String siteFriendId) throws SQLException { + long startTime = System.currentTimeMillis(); + int relation = 0; + String sql = "SELECT relation FROM " + USER_FRIEND_TABLE + " WHERE site_user_id=? AND site_friend_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setString(2, siteFriendId); + + rs = pst.executeQuery(); + if (rs.next()) { + relation = rs.getInt(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, relation, sql + siteUserId, siteFriendId); + return relation; + } + + public boolean queryIsFriendRelation(String siteUserId, String siteFriendId, boolean isMaster) throws SQLException { + long startTime = System.currentTimeMillis(); + boolean relation = false; + String sql = "SELECT a.relation,b.relation FROM " + USER_FRIEND_TABLE + " AS a INNER JOIN " + USER_FRIEND_TABLE + + " AS b ON a.site_user_id=b.site_friend_id AND b.site_user_id=a.site_friend_id where a.site_user_id=? AND a.site_friend_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getConnection(isMaster); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setString(2, siteFriendId); + + rs = pst.executeQuery(); + if (rs.next()) { + relation = (rs.getInt(1) >= 1 && rs.getInt(2) >= 1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, relation, sql, siteUserId, siteFriendId); + return relation; + } + + public boolean deleteRelation(String siteUserId, String siteFriendId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "DELETE FROM " + USER_FRIEND_TABLE + " WHERE site_user_id=? AND site_friend_id=?;"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, siteUserId); + ps.setString(2, siteFriendId); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteUserId, siteFriendId); + return result > 0; + } + + public UserFriendBean queryUserFriendSetting(String siteUserId, String siteFriendId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT mute FROM " + USER_FRIEND_TABLE + " WHERE site_user_id=? AND site_friend_id=?;"; + + UserFriendBean bean = null; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setString(2, siteFriendId); + + rs = pst.executeQuery(); + if (rs.next()) { + bean = new UserFriendBean(); + bean.setMute(rs.getBoolean(1)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, bean, sql, siteUserId, siteFriendId); + return bean; + } + + public boolean updateUserFriendSetting(String siteUserId, UserFriendBean bean) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + USER_FRIEND_TABLE + " SET mute=? WHERE site_user_id=? AND site_friend_id=?;"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setBoolean(1, bean.isMute()); + ps.setString(2, siteUserId); + ps.setString(3, bean.getSiteUserId()); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, bean.isMute(), siteUserId, bean.getSiteUserId()); + return result > 0; + } + + public boolean queryMute(String siteUserId, String siteFriendId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT mute FROM " + USER_FRIEND_TABLE + " WHERE site_user_id=? AND site_friend_id=?;"; + + boolean result = false; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setString(2, siteFriendId); + + rs = pst.executeQuery(); + if (rs.next()) { + result = rs.getBoolean(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteUserId, siteFriendId); + return result; + } + + public boolean updateMute(String siteUserId, String siteFriendId, boolean mute) throws SQLException { + long startTime = System.currentTimeMillis(); + int result = 0; + String sql = "UPDATE " + USER_FRIEND_TABLE + " SET mute=? WHERE site_user_id=? AND site_friend_id=?;"; + + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setBoolean(1, mute); + ps.setString(2, siteUserId); + ps.setString(3, siteFriendId); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, mute, siteUserId, siteFriendId); + return result > 0; + } + + public boolean updateFriendAlias(String siteUserId, String siteFriendId, String aliasName, String aliasNameInLatin) + throws SQLException { + long startTime = System.currentTimeMillis(); + int result = 0; + String sql = "UPDATE " + USER_FRIEND_TABLE + + " SET alias_name=?,alias_name_in_latin=? WHERE site_user_id=? AND site_friend_id=?;"; + + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, aliasName); + ps.setString(2, aliasNameInLatin); + ps.setString(3, siteUserId); + ps.setString(4, siteFriendId); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, aliasName, aliasNameInLatin, siteUserId, siteFriendId); + return result > 0; + } + + public int getFrienNum(long now, int day) throws SQLException { + long startTime = System.currentTimeMillis(); + long endTimeOfDay = TimeFormats.getEndTimeOfDay(now); + if (day != 0) { + endTimeOfDay = endTimeOfDay - TimeUnit.DAYS.toMillis(day); + } + String sql = "SELECT COUNT(*) FROM " + USER_FRIEND_TABLE + " a," + USER_FRIEND_TABLE + + " b WHERE a.add_time < ? and a.site_user_id = b.site_friend_id and b.site_user_id = a.site_friend_id "; + + int friendNum = 0; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setLong(1, endTimeOfDay); + + rs = pst.executeQuery(); + if (rs.next()) { + friendNum = rs.getInt(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, friendNum, sql); + return friendNum / 2; + } + + public boolean delUserFriend(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "DELETE FROM " + USER_FRIEND_TABLE + " WHERE site_user_id= ? or site_friend_id= ?;"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, siteUserId); + ps.setString(2, siteUserId); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteUserId); + return result > 0; + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUserGroupDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUserGroupDao.java new file mode 100755 index 0000000..dcf5337 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUserGroupDao.java @@ -0,0 +1,685 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.dao; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.StringHelper; +import com.akaxin.proto.core.GroupProto; +import com.akaxin.site.storage.bean.GroupMemberBean; +import com.akaxin.site.storage.bean.SimpleGroupBean; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.UserGroupBean; +import com.akaxin.site.storage.connection.DatabaseConnection; +import com.akaxin.site.storage.dao.sql.SQLConst; + +/** + * 操作用户表 && 用户-群组表 相关 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-12-14 17:54:51 + */ +public class SiteUserGroupDao { + private static final Logger logger = LoggerFactory.getLogger(SiteUserGroupDao.class); + private final String USER_GROUP_TABLE = SQLConst.SITE_USER_GROUP; + private static SiteUserGroupDao instance = new SiteUserGroupDao(); + + public static SiteUserGroupDao getInstance() { + return instance; + } + + public int queryGroupMembersCount(String siteGroupId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT count(site_user_id) FROM " + USER_GROUP_TABLE + " WHERE site_group_id=?;"; + + int result = 0; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteGroupId); + + rs = pst.executeQuery(); + if (rs.next()) { + result = rs.getInt(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteGroupId); + return result; + } + + /** + *

+	 * 	添加群组新成员,分为两步
+	 * 		1.select,防止已经为群成员
+	 * 		2.insert,如果select不到用户
+	 * 
+ * + * @param createUserId + * @param groupId + * @param memberIds + * @return + * @throws SQLException + */ + public boolean addGroupMember(String siteUserId, String groupId, int status) throws SQLException { + GroupMemberBean bean = getGroupMember(siteUserId, groupId); + if (bean == null || StringUtils.isBlank(bean.getUserId())) { + return insertGroupMember(siteUserId, groupId, status); + } + return false; + } + + public boolean insertGroupMember(String siteUserId, String groupId, int status) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "INSERT INTO " + USER_GROUP_TABLE + + "(site_user_id,site_group_id,user_role,add_time) VALUES(?,?,?,?);"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, siteUserId); + ps.setString(2, groupId); + ps.setInt(3, GroupProto.GroupMemberRole.OWNER_VALUE); + ps.setLong(4, System.currentTimeMillis()); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteUserId, groupId, + GroupProto.GroupMemberRole.OWNER_VALUE); + return result > 0; + } + + public List queryUserGroupList(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + List groupList = new ArrayList(); + String sql = "SELECT a.site_group_id,b.group_name,b.group_photo FROM " + USER_GROUP_TABLE + " AS a LEFT JOIN " + + SQLConst.SITE_GROUP_PROFILE + + " AS b ON a.site_group_id=b.site_group_id WHERE a.site_user_id=? AND b.group_status>0;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + + rs = pst.executeQuery(); + while (rs.next()) { + SimpleGroupBean bean = new SimpleGroupBean(); + bean.setGroupId(rs.getString(1)); + bean.setGroupName(rs.getString(2)); + bean.setGroupPhoto(rs.getString(3)); + groupList.add(bean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, groupList, sql, siteUserId); + return groupList; + } + + public List queryUserGroupList(String siteUserId, int pageNum, int pageSize) throws SQLException { + long startTime = System.currentTimeMillis(); + List groupList = new ArrayList(); + + String sql = "SELECT a.site_group_id,b.group_name,b.group_photo FROM " + USER_GROUP_TABLE + " AS a LEFT JOIN " + + SQLConst.SITE_GROUP_PROFILE + + " AS b WHERE a.site_group_id=b.site_group_id AND b.group_status>0 AND a.site_user_id=? LIMIT ?,?;"; + + int startNum = (pageNum - 1) * pageSize; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setInt(2, startNum); + pst.setInt(3, pageSize); + + rs = pst.executeQuery(); + while (rs.next()) { + SimpleGroupBean bean = new SimpleGroupBean(); + bean.setGroupId(rs.getString(1)); + bean.setGroupName(rs.getString(2)); + bean.setGroupPhoto(rs.getString(3)); + groupList.add(bean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, groupList, sql, siteUserId); + return groupList; + } + + public int queryUserGroupCount(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + int result = 0; + String sql = "SELECT COUNT(*) FROM " + USER_GROUP_TABLE + " AS a LEFT JOIN " + SQLConst.SITE_GROUP_PROFILE + + " AS b WHERE a.site_group_id=b.site_group_id AND b.group_status>0 AND a.site_user_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + + rs = pst.executeQuery(); + if (rs.next()) { + result = rs.getInt(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteUserId); + return result; + } + + public List queryUserGroupsId(String userId) throws SQLException { + long startTime = System.currentTimeMillis(); + List groupsIdList = new ArrayList(); + String sql = "SELECT site_group_id FROM site_user_group WHERE site_user_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, userId); + + rs = pst.executeQuery(); + while (rs.next()) { + String groupId = rs.getString(1); + groupsIdList.add(groupId); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, groupsIdList.toString(), sql, userId); + return groupsIdList; + } + + public List queryGroupMembersId(String groupId) throws SQLException { + long startTime = System.currentTimeMillis(); + List userIdList = new ArrayList(); + String sql = "SELECT DISTINCT site_user_id FROM " + USER_GROUP_TABLE + " WHERE site_group_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, groupId); + + rs = pst.executeQuery(); + while (rs.next()) { + String userId = rs.getString(1); + userIdList.add(userId); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, userIdList.toString(), sql, groupId); + return userIdList; + } + + public List queryGroupMemberList(String groupId, int pageNum, int pageSize) throws SQLException { + long startTime = System.currentTimeMillis(); + List membersList = new ArrayList(); + String sql = "SELECT DISTINCT a.site_user_id,b.user_name,b.user_photo,a.user_role FROM " + USER_GROUP_TABLE + + " AS a LEFT JOIN " + SQLConst.SITE_USER_PROFILE + + " AS b ON a.site_user_id=b.site_user_id WHERE a.site_group_id=? limit ?,?;"; + + int startNum = (pageNum - 1) * pageSize; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, groupId); + pst.setInt(2, startNum); + pst.setInt(3, pageSize); + + rs = pst.executeQuery(); + while (rs.next()) { + GroupMemberBean member = new GroupMemberBean(); + member.setUserId(rs.getString(1)); + member.setUserName(rs.getString(2)); + member.setUserPhoto(rs.getString(3)); + member.setUserRole(rs.getInt(4)); + membersList.add(member); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, membersList.size(), sql, groupId, startNum, pageSize); + return membersList; + } + + public int queryNonGroupMemberNum(String groupId) throws SQLException { + long startTime = System.currentTimeMillis(); + int num = 0; + String sql = "SELECT COUNT(site_user_id) FROM " + SQLConst.SITE_USER_PROFILE + + " WHERE site_user_id NOT IN (SELECT DISTINCT site_user_id FROM " + SQLConst.SITE_USER_GROUP + + " WHERE site_group_id=?);"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, groupId); + + rs = pst.executeQuery(); + if (rs.next()) { + rs.getInt(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, num, sql, groupId); + return num; + } + + public List queryNonGroupMemberList(String groupId, int pageNum, int pageSize) + throws SQLException { + long startTime = System.currentTimeMillis(); + List membersList = new ArrayList(); + int startNum = (pageNum - 1) * pageSize; + String sql = "SELECT site_user_id,user_name,user_photo,user_status FROM " + SQLConst.SITE_USER_PROFILE + + " WHERE site_user_id NOT IN (SELECT DISTINCT site_user_id FROM " + SQLConst.SITE_USER_GROUP + + " WHERE site_group_id=?) LIMIT ?,?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, groupId); + pst.setInt(2, startNum); + pst.setInt(3, pageSize); + + rs = pst.executeQuery(); + while (rs.next()) { + GroupMemberBean member = new GroupMemberBean(); + member.setUserId(rs.getString(1)); + member.setUserName(rs.getString(2)); + member.setUserPhoto(rs.getString(3)); + member.setUserStatus(rs.getInt(4)); + member.setUserRole(GroupProto.GroupMemberRole.NONMEMBER_VALUE); + membersList.add(member); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, membersList.toString(), sql, groupId, startNum, pageSize); + return membersList; + } + + public int queryUserFriendNonGroupMemberNum(String siteUserId, String groupId) throws SQLException { + long startTime = System.currentTimeMillis(); + int result = 0; + String sql = "SELECT a.site_friend_id,b.user_name,b.user_photo FROM " + SQLConst.SITE_USER_FRIEND + + " AS a LEFT JOIN " + SQLConst.SITE_USER_PROFILE + + " AS b WHERE a.site_friend_id=b.site_user_id AND a.site_user_id=? AND a.site_friend_id NOT IN (SELECT DISTINCT site_user_id FROM " + + SQLConst.SITE_USER_GROUP + " WHERE site_group_id=?);"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setString(2, groupId); + + rs = pst.executeQuery(); + if (rs.next()) { + result = rs.getInt(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteUserId, groupId); + return result; + } + + /** + * 查询用户好友中非群成员用户 + * + * @param groupId + * @param pageNum + * @param pageSize + * @return + * @throws SQLException + */ + public List queryUserFriendNonGroupMemberList(String siteUserId, String groupId, int pageNum, + int pageSize) throws SQLException { + long startTime = System.currentTimeMillis(); + List userList = new ArrayList(); + int startNum = (pageNum - 1) * pageSize; + String sql = "SELECT a.site_friend_id,b.user_name,b.user_photo FROM " + SQLConst.SITE_USER_FRIEND + + " AS a LEFT JOIN " + SQLConst.SITE_USER_PROFILE + + " AS b ON a.site_friend_id=b.site_user_id WHERE a.site_user_id=? AND a.site_friend_id NOT IN (SELECT DISTINCT site_user_id FROM " + + SQLConst.SITE_USER_GROUP + " WHERE site_group_id=?) LIMIT ?,?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setString(2, groupId); + pst.setInt(3, startNum); + pst.setInt(4, pageSize); + + rs = pst.executeQuery(); + while (rs.next()) { + SimpleUserBean userBean = new SimpleUserBean(); + userBean.setUserId(rs.getString(1)); + userBean.setUserName(rs.getString(2)); + userBean.setUserPhoto(rs.getString(3)); + userList.add(userBean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, userList, sql, siteUserId, groupId, startNum, pageSize); + return userList; + } + + public GroupMemberBean getGroupMember(String siteUserId, String groupId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT site_user_id,user_role FROM " + USER_GROUP_TABLE + + " WHERE site_user_id=? AND site_group_id=?;"; + + GroupMemberBean member = null; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setString(2, groupId); + + rs = pst.executeQuery(); + if (rs.next()) { + member = new GroupMemberBean(); + member.setUserId(rs.getString(1)); + member.setUserRole(rs.getInt(2)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, member, sql, siteUserId, groupId); + return member; + } + + public List checkGroupMember(String siteGroupId, List userIds) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT site_user_id FROM " + USER_GROUP_TABLE + + " WHERE site_group_id=? AND site_user_id IN ({});"; + + StringBuilder userIdBuider = new StringBuilder(); + for (int i = 0; i < userIds.size(); i++) { + if (i == 0) { + userIdBuider.append("'"); + userIdBuider.append(userIds.get(i)); + userIdBuider.append("'"); + } else { + userIdBuider.append(","); + userIdBuider.append("'"); + userIdBuider.append(userIds.get(i)); + userIdBuider.append("'"); + } + } + sql = StringHelper.format(sql, userIdBuider.toString()); + logger.debug("check group member sql: {}", sql); + + List userList = new ArrayList(); + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteGroupId); + + rs = pst.executeQuery(); + while (rs.next()) { + userList.add(rs.getString(1)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, userList, sql, siteGroupId); + return userList; + } + + public boolean deleteGroupMember(String groupId, List userIds) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "DELETE FROM " + USER_GROUP_TABLE + " WHERE site_user_id=? AND site_group_id=?;"; + int result = 0; + + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + + for (String siteUserId : userIds) { + try { + ps = conn.prepareStatement(sql); + ps.setString(1, siteUserId); + ps.setString(2, groupId); + result += ps.executeUpdate(); + + ps.clearParameters(); + ps.close(); + LogUtils.dbDebugLog(logger, startTime, result, sql, siteUserId, groupId); + } catch (SQLException e) { + logger.error("delete groupId={} memberUserId={} error", groupId, siteUserId); + } + } + } catch (SQLException e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, userIds.size(), sql); + return result >= userIds.size(); + } + + public UserGroupBean getUserGroupSetting(String siteUserId, String siteGroupId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT mute FROM " + USER_GROUP_TABLE + " WHERE site_user_id=? AND site_group_id=?;"; + + UserGroupBean bean = null; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setString(2, siteGroupId); + + rs = pst.executeQuery(); + if (rs.next()) { + bean = new UserGroupBean(); + bean.setMute(rs.getBoolean(1)); + bean.setSiteGroupId(siteGroupId); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, bean, sql, siteUserId, siteGroupId); + return bean; + } + + public boolean updateUserGroupSetting(String siteUserId, UserGroupBean bean) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + USER_GROUP_TABLE + " SET mute=? WHERE site_user_id=? AND site_group_id=?;"; + + Connection conn = null; + PreparedStatement ps = null; + int result = 0; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setBoolean(1, bean.isMute()); + ps.setString(2, siteUserId); + ps.setString(3, bean.getSiteGroupId()); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, bean, sql, siteUserId, bean); + return result > 0; + } + + public boolean queryMute(String siteUserId, String siteGroupId) throws SQLException { + long startTime = System.currentTimeMillis(); + boolean result = true; + String sql = "SELECT mute FROM " + USER_GROUP_TABLE + " WHERE site_user_id=? AND site_group_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setString(2, siteGroupId); + + rs = pst.executeQuery(); + if (rs.next()) { + result = rs.getBoolean(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteUserId, siteGroupId); + return result; + } + + public boolean updateMute(String siteUserId, String siteGroupId, boolean mute) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + USER_GROUP_TABLE + " SET mute=? WHERE site_user_id=? AND site_group_id=?;"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setBoolean(1, mute); + ps.setString(2, siteUserId); + ps.setString(3, siteGroupId); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, mute, siteUserId, siteGroupId); + return result > 0; + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUserProfileDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUserProfileDao.java new file mode 100755 index 0000000..cb69c63 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUserProfileDao.java @@ -0,0 +1,834 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.dao; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.logs.LogUtils; +import com.akaxin.common.utils.TimeFormats; +import com.akaxin.proto.core.UserProto; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.SimpleUserRelationBean; +import com.akaxin.site.storage.bean.UserFriendBean; +import com.akaxin.site.storage.bean.UserProfileBean; +import com.akaxin.site.storage.connection.DatabaseConnection; +import com.akaxin.site.storage.dao.sql.SQLConst; +import com.akaxin.site.storage.util.SqlUtils; + +/** + * 用户个人资料表(db_table:site_user_profile)相关操作 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-11-09 20:19:59 + */ +public class SiteUserProfileDao { + private static final Logger logger = LoggerFactory.getLogger(SiteUserProfileDao.class); + private final String USER_PROFILE_TABLE = SQLConst.SITE_USER_PROFILE; + private final String USER_FRIEND_TABLE = SQLConst.SITE_USER_FRIEND; + private static SiteUserProfileDao instance = new SiteUserProfileDao(); + + public static SiteUserProfileDao getInstance() { + return instance; + } + + // save Profile + public boolean saveProfile(UserProfileBean bean) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "INSERT INTO " + USER_PROFILE_TABLE // 用户profile表 + + "(site_user_id," // 站点ID + + "global_user_id," // 全局ID + + "user_id_pubk," // 用户公钥 + + "user_name,"// 用户昵称 nickname + + "user_name_in_latin,"// 昵称拼音 + + "user_photo,"// 用户头像 + + "phone_id,"// 手机号 + + "user_status,"// 用户状态 + + "self_introduce,"// 自我介绍 + + "apply_info,"// 申请信息 + + "register_time) VALUES(?,?,?,?,?,?,?,?,?,?,?);"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + + ps = conn.prepareStatement(sql); + ps.setString(1, bean.getSiteUserId()); + ps.setString(2, bean.getGlobalUserId()); + ps.setString(3, bean.getUserIdPubk()); + ps.setString(4, bean.getUserName()); + ps.setString(5, bean.getUserNameInLatin()); + ps.setString(6, bean.getUserPhoto()); + ps.setString(7, bean.getPhoneId()); + ps.setInt(8, bean.getUserStatus()); + ps.setString(9, bean.getSelfIntroduce()); + ps.setString(10, bean.getApplyInfo()); + ps.setLong(11, bean.getRegisterTime()); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, bean.getSiteUserId(), bean.getUserIdPubk(), + bean.getUserName(), bean.getUserPhoto(), bean.getPhoneId(), bean.getUserStatus(), + bean.getSelfIntroduce(), bean.getApplyInfo(), bean.getRegisterTime(), bean.getGlobalUserId()); + return result == 1; + } + + // globalUserId -> siteUserId + public String querySiteUserIdByGlobalUserId(String globalUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + String siteUserId = null; + String sql = "SELECT site_user_id FROM " + SQLConst.SITE_USER_PROFILE + " WHERE global_user_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, globalUserId); + + rs = pst.executeQuery(); + if (rs.next()) { + siteUserId = rs.getString(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, siteUserId, sql, globalUserId); + return siteUserId; + } + + // phoneId -> siteUserId + public String querySiteUserIdPhone(String phoneId) throws SQLException { + long startTime = System.currentTimeMillis(); + String siteUserId = null; + String sql = "SELECT site_user_id FROM " + SQLConst.SITE_USER_PROFILE + " WHERE phone_id=? order by id desc;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, phoneId); + + rs = pst.executeQuery(); + if (rs.next()) { + siteUserId = rs.getString(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, siteUserId, sql, phoneId); + return siteUserId; + } + + // lowerCaseLoginId -> siteUserId + public String querySiteUserIdByLowercaseLoginId(String lowercaseLoginId) throws SQLException { + long startTime = System.currentTimeMillis(); + String globalUserId = null; + String sql = "SELECT site_user_id FROM " + USER_PROFILE_TABLE + " WHERE login_id_lowercase=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, lowercaseLoginId); + + rs = pst.executeQuery(); + if (rs.next()) { + globalUserId = rs.getString(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, globalUserId, sql, lowercaseLoginId); + return globalUserId; + } + + // siteUserId -> gloabalUserId + public String queryGlobalUserIdBySiteUserId(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + String globalUserId = null; + String sql = "SELECT global_user_id FROM " + USER_PROFILE_TABLE + " WHERE site_user_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + + rs = pst.executeQuery(); + if (rs.next()) { + globalUserId = rs.getString(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, globalUserId, sql, siteUserId); + return globalUserId; + } + + // siteUserId -> siteLoginId + public String querySiteLoginIdBySiteUserId(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + String globalUserId = null; + String sql = "SELECT site_login_id FROM " + USER_PROFILE_TABLE + " WHERE site_user_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + + rs = pst.executeQuery(); + if (rs.next()) { + globalUserId = rs.getString(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, globalUserId, sql, siteUserId); + return globalUserId; + } + + // siteUserId -> Simple Profile + public SimpleUserBean querySimpleProfileById(String siteUserId, boolean isMaster) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT site_user_id,user_name,user_photo,user_status FROM " + USER_PROFILE_TABLE + + " WHERE site_user_id=?;"; + + SimpleUserBean userBean = null; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getConnection(isMaster); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + + rs = pst.executeQuery(); + if (rs.next()) { + userBean = new SimpleUserBean(); + userBean.setUserId(rs.getString(1)); + userBean.setUserName(rs.getString(2)); + userBean.setUserPhoto(rs.getString(3)); + userBean.setUserStatus(rs.getInt(4)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, userBean, sql, siteUserId); + return userBean; + } + + // globalUserId -> Simple Profile + public SimpleUserBean querySimpleProfileByGlobalUserId(String globalUserId, boolean isMaster) throws SQLException { + long startTime = System.currentTimeMillis(); + SimpleUserBean userBean = new SimpleUserBean(); + String sql = "SELECT site_user_id,user_name,user_photo,user_status FROM " + USER_PROFILE_TABLE + + " WHERE global_user_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getConnection(isMaster); + pst = conn.prepareStatement(sql); + pst.setString(1, globalUserId); + + rs = pst.executeQuery(); + if (rs.next()) { + userBean.setUserId(rs.getString(1)); + userBean.setUserName(rs.getString(2)); + userBean.setUserPhoto(rs.getString(3)); + userBean.setUserStatus(rs.getInt(4)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, userBean.toString(), sql, globalUserId); + return userBean; + } + + // siteUserId -> Full Profile + public UserProfileBean queryUserProfileById(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT site_user_id,site_login_id,user_id_pubk,user_name,user_photo,self_introduce,user_status,register_time,phone_id FROM " + + USER_PROFILE_TABLE + " WHERE site_user_id=?;"; + + UserProfileBean userBean = null; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + + rs = pst.executeQuery(); + if (rs.next()) { + userBean = new UserProfileBean(); + userBean.setSiteUserId(rs.getString(1)); + userBean.setSiteLoginId(rs.getString(2)); + userBean.setUserIdPubk(rs.getString(3)); + userBean.setUserName(rs.getString(4)); + userBean.setUserPhoto(rs.getString(5)); + userBean.setSelfIntroduce(rs.getString(6)); + userBean.setUserStatus(rs.getInt(7)); + userBean.setRegisterTime(rs.getLong(8)); + userBean.setPhoneId(rs.getString(9)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, userBean, sql, siteUserId); + return userBean; + } + + // globalUserId -> Full Profile + public UserProfileBean queryUserProfileByGlobalUserId(String globalUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT site_user_id,site_login_id,user_id_pubk,user_name,user_photo,phone_id,self_introduce,user_status,register_time FROM " + + USER_PROFILE_TABLE + " WHERE global_user_id=?;"; + + UserProfileBean userBean = null; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, globalUserId); + + rs = pst.executeQuery(); + if (rs.next()) { + userBean = new UserProfileBean(); + userBean.setSiteUserId(rs.getString(1)); + userBean.setSiteLoginId(rs.getString(2)); + userBean.setUserIdPubk(rs.getString(3)); + userBean.setUserName(rs.getString(4)); + userBean.setUserPhoto(rs.getString(5)); + userBean.setPhoneId(rs.getString(6)); + userBean.setSelfIntroduce(rs.getString(7)); + userBean.setUserStatus(rs.getInt(8)); + userBean.setRegisterTime(rs.getLong(9)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, userBean, sql, globalUserId); + return userBean; + } + + // fullPhoneId -> Full Profile + public UserProfileBean queryUserProfileByFullPhoneId(String fullPhoneId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT site_user_id,site_login_id,user_id_pubk,user_name,user_photo,phone_id,self_introduce,user_status,register_time FROM " + + USER_PROFILE_TABLE + " WHERE phone_id=?;"; + + UserProfileBean userBean = null; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, fullPhoneId); + + rs = pst.executeQuery(); + if (rs.next()) { + userBean = new UserProfileBean(); + userBean.setSiteUserId(rs.getString(1)); + userBean.setSiteLoginId(rs.getString(2)); + userBean.setUserIdPubk(rs.getString(3)); + userBean.setUserName(rs.getString(4)); + userBean.setUserPhoto(rs.getString(5)); + userBean.setPhoneId(rs.getString(6)); + userBean.setSelfIntroduce(rs.getString(7)); + userBean.setUserStatus(rs.getInt(8)); + userBean.setRegisterTime(rs.getLong(9)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, userBean, sql, fullPhoneId); + return userBean; + } + + // siteUserId,siteFriendId -> Friend Full Profile + public UserFriendBean queryFriendProfileById(String siteUserId, String siteFriendId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT a.site_user_id,a.site_login_id,a.user_id_pubk,a.user_name,a.user_name_in_latin,a.user_photo,a.self_introduce,a.user_status,a.register_time,b.mute,b.alias_name,b.alias_name_in_latin FROM " + + USER_PROFILE_TABLE + + " AS a LEFT JOIN (SELECT site_user_id,site_friend_id,mute,alias_name,alias_name_in_latin FROM " + + USER_FRIEND_TABLE + + " WHERE site_user_id=?) AS b ON a.site_user_id=b.site_friend_id WHERE a.site_user_id=?;"; + + UserFriendBean userBean = null; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setString(2, siteFriendId); + + rs = pst.executeQuery(); + if (rs.next()) { + userBean = new UserFriendBean(); + userBean.setSiteUserId(rs.getString(1)); + userBean.setSiteLoginId(rs.getString(2)); + userBean.setUserIdPubk(rs.getString(3)); + userBean.setUserName(rs.getString(4)); + userBean.setUserNameInLatin(rs.getString(5)); + userBean.setUserPhoto(rs.getString(6)); + userBean.setSelfIntroduce(rs.getString(7)); + userBean.setUserStatus(rs.getInt(8)); + userBean.setRegisterTime(rs.getLong(9)); + userBean.setMute(rs.getBoolean(10)); + userBean.setAliasName(rs.getString(11)); + userBean.setAliasNameInLatin(rs.getString(12)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, userBean, sql, siteUserId, siteFriendId); + return userBean; + } + + // Update Profile + public int updateUserProfile(UserProfileBean bean) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + USER_PROFILE_TABLE + " {} WHERE site_user_id=?;"; + + Map sqlMap = new HashMap(); + if (StringUtils.isNotEmpty(bean.getSiteLoginId())) { + sqlMap.put("site_login_id", bean.getSiteLoginId());// 站点账号 + sqlMap.put("login_id_lowercase", bean.getSiteLoginId().toLowerCase());// 用户昵称拼音 + } + sqlMap.put("user_name", bean.getUserName());// 用户昵称nickname + sqlMap.put("user_name_in_latin", bean.getUserNameInLatin());// 用户昵称拼音 + sqlMap.put("user_photo", bean.getUserPhoto());// 用户头像 + sqlMap.put("self_introduce", bean.getSelfIntroduce());// 自我介绍 + + SqlUtils.SqlBean sqlBean = SqlUtils.buildUpdateSql(sql, sqlMap); + String realSql = sqlBean.getSql(); + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(realSql); + for (Integer index : sqlBean.getParams().keySet()) { + ps.setString(index, sqlBean.getParams().get(index)); + } + ps.setString(sqlBean.getParams().size() + 1, bean.getSiteUserId()); + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, realSql, bean.getUserName(), bean.getUserPhoto(), + bean.getSelfIntroduce(), bean.getSiteUserId()); + return result; + } + + // Update User Pubk + public int updateUserIdPubk(String siteUserId, String globalUserId, String userIdPubk) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + USER_PROFILE_TABLE + " SET global_user_id=?,user_id_pubk=? WHERE site_user_id=?;"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, globalUserId); + ps.setString(2, userIdPubk); + ps.setString(3, siteUserId); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, globalUserId, userIdPubk, siteUserId); + return result; + } + + // Update User Status + public int updateUserStatus(String siteUserId, int status) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + USER_PROFILE_TABLE + " SET user_status=? WHERE site_user_id=?;"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setInt(1, status); + ps.setString(2, siteUserId); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, status, siteUserId); + return result; + } + + /** + * 分页获取用户列表,这个列表包含用户与查询的用户之间的关系,扩展中使用 + * + * @param siteUserId + * @param pageNum + * @param pageSize + * @return + * @throws SQLException + */ + public List queryUserRelationPageList(String siteUserId, int pageNum, int pageSize) + throws SQLException { + long startTime = System.currentTimeMillis(); + List userPageList = new ArrayList(); + String sql = "SELECT a.site_user_id,a.user_name,a.user_name_in_latin,a.user_photo,a.user_status,b.site_friend_id from " + + USER_PROFILE_TABLE + " AS a LEFT JOIN (SELECT site_user_id,site_friend_id FROM " + + SQLConst.SITE_USER_FRIEND + + " WHERE site_user_id=?) AS b ON a.site_user_id=b.site_friend_id ORDER BY a.id DESC LIMIT ?,?;"; + + int startNum = (pageNum - 1) * pageSize; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setInt(2, startNum); + pst.setInt(3, pageSize); + + rs = pst.executeQuery(); + while (rs.next()) { + SimpleUserRelationBean bean = new SimpleUserRelationBean(); + bean.setUserId(rs.getString(1)); + bean.setUserName(rs.getString(2)); + bean.setUserNameInLatin(rs.getString(3)); + bean.setUserPhoto(rs.getString(4)); + bean.setUserStatus(rs.getInt(5)); + if (StringUtils.isNotBlank(rs.getString(6))) { + bean.setRelation(UserProto.UserRelation.RELATION_FRIEND_VALUE); + } else { + bean.setRelation(UserProto.UserRelation.RELATION_NONE_VALUE); + } + userPageList.add(bean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, userPageList.size(), sql, startNum, pageSize); + return userPageList; + } + + public int queryTotalUserNum() throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT COUNT(*) FROM " + USER_PROFILE_TABLE + ";"; + + int userNum = 0; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + + rs = pst.executeQuery(); + if (rs.next()) { + userNum = rs.getInt(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, userNum, sql); + return userNum; + + } + + /** + * 分页获取站点上所有用户 + * + * @param pageNum + * 第几页,从1开始 + * @param pageSize + * 每页大小 + * @return + * @throws SQLException + */ + public List queryUserPageList(int pageNum, int pageSize) throws SQLException { + long startTime = System.currentTimeMillis(); + List userPageList = new ArrayList(); + String sql = "SELECT site_user_id,user_name,user_photo,user_status FROM " + USER_PROFILE_TABLE + + " ORDER BY id DESC LIMIT ?,?;"; + int startNum = (pageNum - 1) * pageSize; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setInt(1, startNum); + pst.setInt(2, pageSize); + + rs = pst.executeQuery(); + while (rs.next()) { + SimpleUserBean bean = new SimpleUserBean(); + bean.setUserId(rs.getString(1)); + bean.setUserName(rs.getString(2)); + bean.setUserPhoto(rs.getString(3)); + bean.setUserStatus(rs.getInt(4)); + userPageList.add(bean); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, userPageList.size(), sql, startNum, pageSize); + return userPageList; + } + + // siteUserId -> Mute + public boolean queryMute(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + boolean mute = false; + String sql = "SELECT mute FROM " + USER_PROFILE_TABLE + " WHERE site_user_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + + rs = pst.executeQuery(); + if (rs.next()) { + mute = rs.getBoolean(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, mute, sql, siteUserId); + return mute; + } + + // Update Mute + public boolean updateMute(String siteUserId, boolean mute) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + USER_PROFILE_TABLE + " SET mute=? WHERE site_user_id=?;"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setBoolean(1, mute); + ps.setString(2, siteUserId); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, mute, siteUserId); + return result > 0; + } + + public int queryRegisterNumPerDay(long now, int day) throws SQLException { + long startTime = System.currentTimeMillis(); + long startTimeOfDay = TimeFormats.getStartTimeOfDay(now); + long endTimeOfDay = TimeFormats.getEndTimeOfDay(now); + if (day != 0) { + startTimeOfDay = startTimeOfDay - TimeUnit.DAYS.toMillis(day); + endTimeOfDay = endTimeOfDay - TimeUnit.DAYS.toMillis(day); + } + String sql = "SELECT COUNT(*) FROM " + USER_PROFILE_TABLE + " WHERE register_time BETWEEN ? and ?;"; + + int count = 0; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setLong(1, startTimeOfDay); + pst.setLong(2, endTimeOfDay); + + rs = pst.executeQuery(); + if (rs.next()) { + count = rs.getInt(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + LogUtils.dbDebugLog(logger, startTime, count, sql); + return count; + } + + public int getUserNum(long now, int day) throws SQLException { + long startTime = System.currentTimeMillis(); + long endTimeOfDay = TimeFormats.getEndTimeOfDay(now); + if (day != 0) { + endTimeOfDay = endTimeOfDay - TimeUnit.DAYS.toMillis(day); + } + String sql = "SELECT COUNT(*) FROM " + USER_PROFILE_TABLE + " WHERE register_time < ?;"; + + int userNum = 0; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setLong(1, endTimeOfDay); + + rs = pst.executeQuery(); + if (rs.next()) { + userNum = rs.getInt(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, userNum, sql); + return userNum; + + } + + public boolean delUser(String siteUserId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "DELETE FROM " + USER_PROFILE_TABLE + " WHERE site_user_id=? "; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, siteUserId); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteUserId); + return result > 0; + } +} \ No newline at end of file diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUserSessionDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUserSessionDao.java new file mode 100755 index 0000000..e51d1c2 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUserSessionDao.java @@ -0,0 +1,244 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.dao; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.logs.LogUtils; +import com.akaxin.site.storage.bean.SimpleAuthBean; +import com.akaxin.site.storage.bean.UserSessionBean; +import com.akaxin.site.storage.connection.DatabaseConnection; +import com.akaxin.site.storage.dao.sql.SQLConst; + +/** + * session 只从主库中获取session,不做主从分离 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.10.11 14:43:38 + */ +public class SiteUserSessionDao { + private static final Logger logger = LoggerFactory.getLogger(SiteUserSessionDao.class); + private static final String USER_SESSION_TABLE = SQLConst.SITE_USER_SESSION; + private static SiteUserSessionDao instance = new SiteUserSessionDao(); + + public static SiteUserSessionDao getInstance() { + return instance; + } + + public boolean saveIfAbsent(UserSessionBean bean) throws SQLException { + return update(bean) ? true : save(bean); + } + + public boolean save(UserSessionBean bean) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "INSERT INTO " + USER_SESSION_TABLE + + "(site_user_id,session_id,is_online,device_id,login_time) VALUES(?,?,?,?,?);"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, bean.getSiteUserId()); + ps.setString(2, bean.getSessionId()); + ps.setBoolean(3, bean.isOnline()); + ps.setString(4, bean.getDeviceId()); + ps.setLong(5, bean.getLoginTime()); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, bean.getSiteUserId(), bean.getSessionId(), bean.isOnline(), + bean.getDeviceId(), bean.getLoginTime()); + return result > 0; + } + + public boolean update(UserSessionBean bean) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + USER_SESSION_TABLE + + " SET session_id=?,login_time=?,is_online=? WHERE site_user_id=? AND device_id=?;"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, bean.getSessionId()); + ps.setLong(2, bean.getLoginTime()); + ps.setBoolean(3, bean.isOnline()); + ps.setString(4, bean.getSiteUserId()); + ps.setString(5, bean.getDeviceId()); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps, rs); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, bean.getSessionId(), bean.getLoginTime(), bean.isOnline(), + bean.getSiteUserId(), bean.getDeviceId()); + return result > 0; + } + + public boolean setOnlineSession(String siteUserId, String deviceId, boolean online) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "UPDATE " + USER_SESSION_TABLE + " SET is_online=? WHERE site_user_id=? AND device_id=?;"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setBoolean(1, online); + ps.setString(2, siteUserId); + ps.setString(3, deviceId); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteUserId, deviceId); + return result > 0; + } + + public boolean checkSession(String siteUserId, String deviceId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sessionDeviceId = null; + String sql = "SELECT device_id FROM " + USER_SESSION_TABLE + " WHERE site_user_id=? AND device_id=?;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserId); + pst.setString(2, deviceId); + + rs = pst.executeQuery(); + if (rs.next()) { + sessionDeviceId = rs.getString(1); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, sessionDeviceId, sql, siteUserId, deviceId); + return sessionDeviceId != null; + } + + public SimpleAuthBean queryAuthSession(String sessionId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "SELECT site_user_id,device_id FROM " + USER_SESSION_TABLE + " WHERE session_id=?;"; + + SimpleAuthBean authBean = null; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, sessionId); + + rs = pst.executeQuery(); + if (rs.next()) { + authBean = new SimpleAuthBean(); + authBean.setSiteUserId(rs.getString(1)); + authBean.setDeviceId(rs.getString(2)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, authBean, sql, sessionId); + return authBean; + } + + public List queryDeviceIds(String siteUserid) throws SQLException { + long startTime = System.currentTimeMillis(); + List deviceIds = new ArrayList(); + String sql = "SELECT device_id FROM " + USER_SESSION_TABLE + " WHERE site_user_id=? AND is_online=1;"; + + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getConnection(); + pst = conn.prepareStatement(sql); + pst.setString(1, siteUserid); + + rs = pst.executeQuery(); + while (rs.next()) { + deviceIds.add(rs.getString(1)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, deviceIds.size(), sql, siteUserid); + return deviceIds; + } + + public boolean deleteSession(String siteUserId, String deviceId) throws SQLException { + long startTime = System.currentTimeMillis(); + String sql = "DELETE FROM " + USER_SESSION_TABLE + " WHERE site_user_id=? AND device_id=?;"; + + int result = 0; + Connection conn = null; + PreparedStatement ps = null; + try { + conn = DatabaseConnection.getConnection(); + ps = conn.prepareStatement(sql); + ps.setString(1, siteUserId); + ps.setString(2, deviceId); + + result = ps.executeUpdate(); + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, ps); + } + + LogUtils.dbDebugLog(logger, startTime, result, sql, siteUserId, deviceId); + return result > 0; + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUsersDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUsersDao.java new file mode 100755 index 0000000..7a05e32 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/SiteUsersDao.java @@ -0,0 +1,79 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.dao; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.logs.LogUtils; +import com.akaxin.site.storage.connection.DatabaseConnection; +import com.akaxin.site.storage.dao.sql.SQLConst; + +/** + * 获取站点所有用户 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-11-09 20:19:59 + */ +public class SiteUsersDao { + private static final Logger logger = LoggerFactory.getLogger(SiteUsersDao.class); + private final String USER_PROFILE_TABLE = SQLConst.SITE_USER_PROFILE; + + private static class SingletonHolder { + private static SiteUsersDao instance = new SiteUsersDao(); + } + + public static SiteUsersDao getInstance() { + return SingletonHolder.instance; + } + + public List querySiteUserId(int pageNum, int pageSize) throws SQLException { + long startTime = System.currentTimeMillis(); + List siteUserList = new ArrayList(); + String sql = "SELECT site_user_id FROM " + USER_PROFILE_TABLE + " LIMIT ?,?;"; + + int startNum = (pageNum - 1) * pageSize; + Connection conn = null; + PreparedStatement pst = null; + ResultSet rs = null; + try { + conn = DatabaseConnection.getSlaveConnection(); + pst = conn.prepareStatement(sql); + pst.setInt(1, startNum); + pst.setInt(2, pageSize); + + rs = pst.executeQuery(); + while (rs.next()) { + siteUserList.add(rs.getString(1)); + } + } catch (Exception e) { + throw e; + } finally { + DatabaseConnection.returnConnection(conn, pst, rs); + } + + LogUtils.dbDebugLog(logger, startTime, siteUserList.size(), sql, pageNum, pageSize); + return siteUserList; + } + +} \ No newline at end of file diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/config/DBConfig.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/config/DBConfig.java new file mode 100755 index 0000000..8f07d3d --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/config/DBConfig.java @@ -0,0 +1,140 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.dao.config; + +import java.util.HashMap; +import java.util.Map; + +import com.akaxin.common.utils.GsonUtils; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:13:35 + */ +public class DBConfig { + private DBType db; + private String dbDir; + private String adminServerName; + private String adminAddress; + private int adminPort; + private String adminIcon; + private String adminUic; + private String adminApi = "/akaxin/manage/index"; + private Map configMap; + // 扩展参数 + private Map params = new HashMap(); + + public DBType getDb() { + return db; + } + + public void setDb(DBType db) { + this.db = db; + } + + public String getDbDir() { + return dbDir; + } + + public void setDbDir(String dbDir) { + this.dbDir = dbDir; + } + + public String getAdminServerName() { + return adminServerName; + } + + public void setAdminServerName(String adminServerName) { + this.adminServerName = adminServerName; + } + + public String getAdminAddress() { + return adminAddress; + } + + public void setAdminAddress(String adminAddress) { + this.adminAddress = adminAddress; + } + + public int getAdminPort() { + return adminPort; + } + + public void setAdminPort(int adminPort) { + this.adminPort = adminPort; + } + + public String getAdminIcon() { + return adminIcon; + } + + public void setAdminIcon(String adminIcon) { + this.adminIcon = adminIcon; + } + + public String getSiteServer() { + return adminAddress + ":" + adminPort; + } + + public String getAdminUic() { + return adminUic; + } + + public void setAdminUic(String adminUic) { + this.adminUic = adminUic; + } + + public String getAdminApi() { + return adminApi; + } + + public void setAdminApi(String adminApi) { + this.adminApi = adminApi; + } + + public Map getConfigMap() { + return configMap; + } + + public void setConfigMap(Map configMap) { + this.configMap = configMap; + } + + public Map getParams() { + return params; + } + + public DBConfig setParams(Map map) { + this.params.putAll(map); + return this; + } + + @SuppressWarnings("unchecked") + public T getParam(String k, Class t) { + Object obj = params.get(k); + return obj == null ? null : (T) obj; + } + + public DBConfig setParam(String k, Object v) { + this.params.put(k, v); + return this; + } + + public String toString() { + return GsonUtils.toJson(this); + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/config/DBType.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/config/DBType.java new file mode 100755 index 0000000..7fc7546 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/config/DBType.java @@ -0,0 +1,28 @@ +package com.akaxin.site.storage.dao.config; + +public enum DBType { + PERSONAL(1, "personal"), // sqlite + TEAM(2, "team"); + + private int index; + private String name; + + DBType(int index, String name) { + this.index = index; + this.name = name; + } + + public String getName() { + return this.name; + } + + public static DBType getDBType(String name) { + for (DBType db : DBType.values()) { + if (db.getName().equalsIgnoreCase(name)) { + return db; + } + } + return PERSONAL; + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/config/JdbcConst.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/config/JdbcConst.java new file mode 100755 index 0000000..b409732 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/config/JdbcConst.java @@ -0,0 +1,46 @@ +package com.akaxin.site.storage.dao.config; + +/** + * 数据库配置中的KEY + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-09 12:51:54 + */ +public interface JdbcConst { + + String OPENZALY_EDITION = "openzaly.edition"; + + String SQLITE_URL = "openzaly.sqlite.url"; + + // ----------------------MASTER-------------------- + String MYSQL_HOST = "openzaly.mysql.host"; + String MYSQL_PORT = "openzaly.mysql.port"; + String MYSQL_DB = "openzaly.mysql.database"; + + String MYSQL_USER_NAME = "openzaly.mysql.username"; + String MYSQL_PASSWORD = "openzaly.mysql.password"; + String MYSQL_INITIAL_SIZE = "openzaly.mysql.initial-size"; + String MYSQL_MAX_SIZE = "openzaly.mysql.max-size"; + String MYSQL_MAX_IDLE = "openzaly.mysql.max-idle"; + + String MYSQL_USE_UNICODE = "openzaly.mysql.useUnicode"; + String MYSQL_CHARACTER_ENCODING = "openzaly.mysql.characterEncoding"; + String MYSQL_VERIFY_SERVER_CERTIFICATE = "openzaly.mysql.verifyServerCertificate"; + String MYSQL_USE_SSL = "openzaly.mysql.useSSL"; + + // ----------------------SLAVE-------------------- + String MYSQL_SLAVE_HOST = "openzaly.mysql.slave.host"; + String MYSQL_SLAVE_PORT = "openzaly.mysql.slave.port"; + String MYSQL_SLAVE_DB = "openzaly.mysql.slave.database"; + + String MYSQL_SLAVE_USER_NAME = "openzaly.mysql.slave.username"; + String MYSQL_SLAVE_PASSWORD = "openzaly.mysql.slave.password"; + String MYSQL_SLAVE_INITIAL_SIZE = "openzaly.mysql.slave.initial-size"; + String MYSQL_SLAVE_MAX_SIZE = "openzaly.mysql.slave.max-size"; + String MYSQL_SLAVE_MAX_IDLE = "openzaly.mysql.slave.max-idle"; + + String MYSQL_SLAVE_USE_UNICODE = "openzaly.mysql.slave.useUnicode"; + String MYSQL_SLAVE_CHARACTER_ENCODING = "openzaly.mysql.slave.characterEncoding"; + String MYSQL_SLAVE_VERIFY_SERVER_CERTIFICATE = "openzaly.mysql.slave.verifyServerCertificate"; + String MYSQL_SLAVE_USE_SSL = "openzaly.mysql.slave.useSSL"; +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/config/PrepareSiteConfigData.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/config/PrepareSiteConfigData.java new file mode 100755 index 0000000..204ffcc --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/config/PrepareSiteConfigData.java @@ -0,0 +1,161 @@ +package com.akaxin.site.storage.dao.config; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.util.Map; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.proto.core.ConfigProto; +import com.akaxin.proto.core.PluginProto; +import com.akaxin.proto.core.UicProto; +import com.akaxin.site.storage.bean.UicBean; +import com.akaxin.site.storage.connection.DatabaseConnection; +import com.akaxin.site.storage.dao.SiteConfigDao; +import com.akaxin.site.storage.dao.SiteUICDao; +import com.akaxin.site.storage.dao.sqlite.manager.PluginArgs; + +/** + * 初始化数据库以后,完成初始化站点配置工作 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-07 17:53:20 + */ +public class PrepareSiteConfigData { + private static final Logger logger = LoggerFactory.getLogger(PrepareSiteConfigData.class); + + public static void init(DBConfig config) throws SQLException { + initSiteConfig(config.getConfigMap()); + initSitePlugin(1, PluginArgs.SITE_ADMIN_NAME, config.getAdminApi(), config.getSiteServer(), + config.getAdminIcon()); + initSitePlugin(2, PluginArgs.FRIEND_SQUARE_NAME, PluginArgs.FRIEND_SQUARE_API, config.getSiteServer(), + config.getParam(PluginArgs.FRIEND_SQUARE, String.class)); + initAdminUic(config.getAdminUic()); + } + + private static void initSiteConfig(Map configMap) throws SQLException { + Map oldMap = SiteConfigDao.getInstance().queryConfig(); + if (oldMap != null) { + if (oldMap.get(ConfigProto.ConfigKey.SITE_ADMIN_VALUE) != null) { + configMap.remove(ConfigProto.ConfigKey.SITE_ADMIN_VALUE); + } + if (oldMap.get(ConfigProto.ConfigKey.SITE_ADDRESS_VALUE) != null) { + configMap.remove(ConfigProto.ConfigKey.SITE_ADDRESS_VALUE); + } + if (oldMap.get(ConfigProto.ConfigKey.PIC_PATH_VALUE) != null) { + configMap.remove(ConfigProto.ConfigKey.PIC_PATH_VALUE); + } + if (oldMap.get(ConfigProto.ConfigKey.GROUP_MEMBERS_COUNT_VALUE) != null) { + configMap.remove(ConfigProto.ConfigKey.GROUP_MEMBERS_COUNT_VALUE); + } + if (oldMap.get(ConfigProto.ConfigKey.REALNAME_STATUS_VALUE) != null) { + configMap.remove(ConfigProto.ConfigKey.REALNAME_STATUS_VALUE); + } + if (oldMap.get(ConfigProto.ConfigKey.INVITE_CODE_STATUS_VALUE) != null) { + configMap.remove(ConfigProto.ConfigKey.INVITE_CODE_STATUS_VALUE); + } + if (oldMap.get(ConfigProto.ConfigKey.PUSH_CLIENT_STATUS_VALUE) != null) { + configMap.remove(ConfigProto.ConfigKey.PUSH_CLIENT_STATUS_VALUE); + } + } + SiteConfigDao.getInstance().updateConfig(configMap, true); + } + + private static void initSitePlugin(int id, String siteName, String urlPage, String apiUrl, String siteIcon) { + boolean result = false; + String updateSql = "UPDATE site_plugin_manager SET "// + + "name=?,"// + + "url_page=?,"// + + "api_url=?,"// + + "auth_key=?"// + + " WHERE id=?;";// + Connection updateConn = null; + try { + updateConn = DatabaseConnection.getConnection(); + PreparedStatement pst = updateConn.prepareStatement(updateSql); + pst.setString(1, siteName); + pst.setString(2, urlPage); + pst.setString(3, apiUrl); + pst.setString(4, ""); + pst.setInt(5, id); + result = (pst.executeUpdate() > 0); + logger.info("update site plugin result={} SQL={} name={} url_page={} url_api={}", result, updateSql, + siteName, urlPage, apiUrl); + } catch (SQLException e) { + logger.error("update site plugin error", e); + } finally { + DatabaseConnection.returnConnection(updateConn); + } + + Connection insertConn = null; + try { + if (!result) { + String insertSql = "INSERT INTO site_plugin_manager("// + + "id,"// + + "name,"// + + "icon,"// + + "url_page,"// + + "api_url,"// + + "auth_key,"// + + "allowed_ip,"// + + "position,"// + + "sort,"// + + "display_mode,"// + + "permission_status,"// + + "add_time) VALUES(?,?,?,?,?,?,?,?,?,?,?,?);"; + insertConn = DatabaseConnection.getConnection(); + PreparedStatement pst = insertConn.prepareStatement(insertSql); + pst.setInt(1, id); + pst.setString(2, siteName); + pst.setString(3, siteIcon); + pst.setString(4, urlPage); + pst.setString(5, apiUrl); + if (id == 1) {// 默认为后台管理 + pst.setString(6, "");// authkey + pst.setString(7, "127.0.0.1");// allowed_ip + pst.setInt(8, PluginProto.PluginPosition.HOME_PAGE_VALUE);// position + pst.setInt(9, 0);// sort + pst.setInt(10, PluginProto.PluginDisplayMode.NEW_PAGE_VALUE); // display_mode + pst.setInt(11, PluginProto.PermissionStatus.DISABLED_VALUE); // permission_status + pst.setLong(12, System.currentTimeMillis()); // add_time + } else { + pst.setString(6, "");// authkey + pst.setString(7, "127.0.0.1");// allowed_ip + pst.setInt(8, PluginProto.PluginPosition.HOME_PAGE_VALUE);// position + pst.setInt(9, 1);// sort + pst.setInt(10, PluginProto.PluginDisplayMode.NEW_PAGE_VALUE); // display_mode + pst.setInt(11, PluginProto.PermissionStatus.AVAILABLE_VALUE); // permission_status + pst.setLong(12, System.currentTimeMillis()); // add_time + } + result = (pst.executeUpdate() > 0); + + logger.info("insert site plugin result={} SQL={} name={} url_page={} url_api={}", result, insertSql, + siteName, urlPage, apiUrl); + } + } catch (SQLException e) { + logger.error("insert site plugin error", e); + } finally { + DatabaseConnection.returnConnection(insertConn); + } + } + + private static void initAdminUic(String uic) { + boolean result = false; + try { + UicBean bean = new UicBean(); + bean.setUic(uic); + bean.setStatus(UicProto.UicStatus.UNUSED_VALUE); + bean.setCreateTime(System.currentTimeMillis()); + result = SiteUICDao.getInstance().addUIC(bean); + } catch (SQLException e) { + logger.warn("add new uic to db error,you can ignore it"); + } + if (result) { + logger.info("init addmin uic success"); + } else { + logger.warn("init admin uic fail"); + } + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/mysql/manager/AbstractPoolManager.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/mysql/manager/AbstractPoolManager.java new file mode 100755 index 0000000..3ea60bb --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/mysql/manager/AbstractPoolManager.java @@ -0,0 +1,171 @@ +package com.akaxin.site.storage.dao.mysql.manager; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; + +import org.apache.commons.lang3.StringUtils; + +import com.akaxin.site.storage.dao.config.JdbcConst; +import com.akaxin.site.storage.util.SqlLog; + +/** + * C3P0 连接池塘,公共类 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-11 18:16:33 + */ +public abstract class AbstractPoolManager { + + protected static final String MYSQL_JDBC_DRIVER = "com.mysql.cj.jdbc.Driver"; + + // 先从系统properties加载,在从指定pro中加载 + private static String trimSystemProToNull(Properties pro, String key) { + String sysStr = StringUtils.trimToNull(System.getProperty(key)); + return sysStr != null ? sysStr : StringUtils.trimToNull(pro.getProperty(key)); + } + + protected static String trimToNull(Properties pro, String key) { + return StringUtils.trimToNull(pro.getProperty(key)); + } + + protected static String trimToNull(Properties pro, String key, String def) { + String trimedStr = StringUtils.trimToNull(pro.getProperty(key)); + return trimedStr != null ? trimedStr : def; + } + + // 释放连接池资源 + public static void returnConnection(java.sql.Connection conn) { + // cpds.r + if (conn != null) { + try { + conn.close(); + } catch (SQLException e) { + SqlLog.error("return connection error", e); + } + } + } + + /** + * 初始化数据库使用 + * + * @param pro + * @return + * @throws Exception + */ + public static String getJdbcUrlWithoutDBName(Properties pro) throws Exception { + String host = trimToNull(pro, JdbcConst.MYSQL_HOST); + String port = trimToNull(pro, JdbcConst.MYSQL_PORT); + + // "jdbc:mysql://localhost:3306/mysql?"; + String url = "jdbc:mysql://" + host + ":" + port; + + if (StringUtils.isAnyEmpty(host, port)) { + throw new Exception("jdbc url=" + url + " is invalid"); + } + + String useUnicode = trimToNull(pro, JdbcConst.MYSQL_USE_UNICODE, "true"); + String characterEncoding = trimToNull(pro, JdbcConst.MYSQL_CHARACTER_ENCODING, "utf-8"); + String verifyServerCertificate = trimToNull(pro, JdbcConst.MYSQL_VERIFY_SERVER_CERTIFICATE, "false"); + String useSSL = trimToNull(pro, JdbcConst.MYSQL_USE_SSL, "true"); + + StringBuilder sb = buildJdbcUrlWithParameters(url, useUnicode, characterEncoding, verifyServerCertificate, + useSSL); + + return sb.toString(); + } + + /** + * 初始化连接池主库 + * + * @param pro + * @return + * @throws Exception + */ + public static String getJdbcUrl(Properties pro) throws Exception { + String host = trimToNull(pro, JdbcConst.MYSQL_HOST); + String port = trimToNull(pro, JdbcConst.MYSQL_PORT); + String dbName = trimToNull(pro, JdbcConst.MYSQL_DB); + + // "jdbc:mysql://localhost:3306/mysql?"; + String url = "jdbc:mysql://" + host + ":" + port + "/" + dbName; + + if (StringUtils.isAnyEmpty(host, port, dbName)) { + throw new Exception("jdbc url=" + url + " is invalid"); + } + + String useUnicode = trimToNull(pro, JdbcConst.MYSQL_USE_UNICODE, "true"); + String characterEncoding = trimToNull(pro, JdbcConst.MYSQL_CHARACTER_ENCODING, "utf-8"); + String verifyServerCertificate = trimToNull(pro, JdbcConst.MYSQL_VERIFY_SERVER_CERTIFICATE, "false"); + String useSSL = trimToNull(pro, JdbcConst.MYSQL_USE_SSL, "true"); + + StringBuilder sb = buildJdbcUrlWithParameters(url, useUnicode, characterEncoding, verifyServerCertificate, + useSSL); + + return sb.toString(); + } + + /** + * 初始化从库连接池 + * + * @param pro + * @return + * @throws Exception + */ + public static List getSlaveJdbcUrl(Properties pro) throws Exception { + String slaveHosts = trimToNull(pro, JdbcConst.MYSQL_SLAVE_HOST);// 192.168.3.4,192.168.3.5,192.168.3.6 + + if (StringUtils.isEmpty(slaveHosts)) { + return null; + } + + List urlList = new ArrayList(); + String[] hosts = slaveHosts.split(","); + + for (String host : hosts) { + host = StringUtils.trimToNull(host); + String port = trimToNull(pro, JdbcConst.MYSQL_PORT); + String dbName = trimToNull(pro, JdbcConst.MYSQL_DB); + + // "jdbc:mysql://localhost:3306/mysql?"; + String url = "jdbc:mysql://" + host + ":" + port + "/" + dbName; + + if (StringUtils.isAnyEmpty(host, port, dbName)) { + throw new Exception("mysql slave jdbc url=" + url + " is invalid"); + } + + String useUnicode = pro.getProperty(JdbcConst.MYSQL_SLAVE_USE_UNICODE, "true"); + String characterEncoding = pro.getProperty(JdbcConst.MYSQL_SLAVE_CHARACTER_ENCODING, "utf-8"); + String verifyServerCertificate = pro.getProperty(JdbcConst.MYSQL_SLAVE_VERIFY_SERVER_CERTIFICATE, "false"); + String useSSL = pro.getProperty(JdbcConst.MYSQL_SLAVE_USE_SSL, "true"); + + StringBuilder sb = buildJdbcUrlWithParameters(url, useUnicode, characterEncoding, verifyServerCertificate, + useSSL); + + urlList.add(sb.toString()); + } + return urlList; + } + + private static StringBuilder buildJdbcUrlWithParameters(String url, String useUnicode, String characterEncoding, + String verifyServerCertificate, String useSSL) { + StringBuilder sb = new StringBuilder(url); + + sb.append("?useUnicode="); + sb.append(useUnicode); + + sb.append("&characterEncoding="); + sb.append(characterEncoding); + + sb.append("&verifyServerCertificate="); + sb.append(verifyServerCertificate); + + sb.append("&useSSL="); + sb.append(useSSL); + + sb.append("&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC"); + + return sb; + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/mysql/manager/C3P0PoolManager.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/mysql/manager/C3P0PoolManager.java new file mode 100755 index 0000000..68fac5e --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/mysql/manager/C3P0PoolManager.java @@ -0,0 +1,46 @@ +package com.akaxin.site.storage.dao.mysql.manager; + +import java.sql.SQLException; +import java.util.Properties; + +import com.akaxin.site.storage.dao.config.JdbcConst; +import com.akaxin.site.storage.util.SqlLog; +import com.mchange.v2.c3p0.ComboPooledDataSource; + +/** + * C3P0 主库配置管理 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-11 18:21:38 + */ +public class C3P0PoolManager extends AbstractPoolManager { + private static ComboPooledDataSource cpds; + + public static void initPool(Properties pro) throws Exception { + String jdbcUrl = getJdbcUrl(pro); + String userName = trimToNull(pro, JdbcConst.MYSQL_USER_NAME); + String password = trimToNull(pro, JdbcConst.MYSQL_PASSWORD); + + cpds = new ComboPooledDataSource(); + cpds.setDriverClass(MYSQL_JDBC_DRIVER); // loads the jdbc driver + cpds.setJdbcUrl(jdbcUrl); + cpds.setUser(userName); + cpds.setPassword(password); + int inititalSize = Integer.valueOf(trimToNull(pro, JdbcConst.MYSQL_INITIAL_SIZE, "10")); + int maxSize = Integer.valueOf(trimToNull(pro, JdbcConst.MYSQL_MAX_SIZE, "100")); + cpds.setInitialPoolSize(inititalSize);// 初始创建默认10个连接 + cpds.setMaxPoolSize(maxSize);// 最大默认100个 + int inc = (maxSize - inititalSize) / 5; + cpds.setAcquireIncrement(Integer.max(1, inc));// 每次创建10个 + + int maxIdle = Integer.valueOf(trimToNull(pro, JdbcConst.MYSQL_MAX_IDLE, "60")); + cpds.setMaxIdleTime(maxIdle);// 最大空闲时间 + + SqlLog.info("openzaly init mysql master connection pool cpds={}", cpds); + } + + public static java.sql.Connection getConnection() throws SQLException { + return cpds.getConnection(); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/mysql/manager/C3P0PoolSlaveManager.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/mysql/manager/C3P0PoolSlaveManager.java new file mode 100755 index 0000000..b6082de --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/mysql/manager/C3P0PoolSlaveManager.java @@ -0,0 +1,70 @@ +package com.akaxin.site.storage.dao.mysql.manager; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; + +import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang3.StringUtils; + +import com.akaxin.site.storage.dao.config.JdbcConst; +import com.akaxin.site.storage.util.SqlLog; +import com.mchange.v2.c3p0.ComboPooledDataSource; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-11 17:56:55 + */ +public class C3P0PoolSlaveManager extends AbstractPoolManager { + + private static List cpdsList; + + public static void initPool(Properties pro) throws Exception { + List jdbcUrlList = getSlaveJdbcUrl(pro); + + String userName = trimToNull(pro, JdbcConst.MYSQL_SLAVE_USER_NAME); + String password = trimToNull(pro, JdbcConst.MYSQL_SLAVE_PASSWORD); + + if (jdbcUrlList == null || jdbcUrlList.size() == 0 || StringUtils.isAnyEmpty(userName, password)) { + SqlLog.warn( + "load database slave for mysql fail, system will user mysql master connection pool.urls={} user={} passwd={}", + jdbcUrlList, userName, password); + return; + } + + cpdsList = new ArrayList(); + + for (String jdbcUrl : jdbcUrlList) { + ComboPooledDataSource cpds = new ComboPooledDataSource(); + cpds.setDriverClass(MYSQL_JDBC_DRIVER); // loads the jdbc driver + cpds.setJdbcUrl(jdbcUrl); + cpds.setUser(userName); + cpds.setPassword(password); + int inititalSize = Integer.valueOf(trimToNull(pro, JdbcConst.MYSQL_SLAVE_INITIAL_SIZE, "10")); + int maxSize = Integer.valueOf(trimToNull(pro, JdbcConst.MYSQL_SLAVE_MAX_SIZE, "100")); + cpds.setInitialPoolSize(inititalSize);// 初始创建默认10个连接 + cpds.setMaxPoolSize(maxSize);// 最大默认100个 + int inc = (maxSize - inititalSize) / 5; + cpds.setAcquireIncrement(Integer.max(1, inc));// 每次创建个数 + + int maxIdle = Integer.valueOf(trimToNull(pro, JdbcConst.MYSQL_SLAVE_MAX_IDLE, "60")); + cpds.setMaxIdleTime(maxIdle);// 最大空闲时间 + + cpdsList.add(cpds); + + SqlLog.info("openzaly init mysql slave connection pool cpds={}", cpds.toString()); + } + } + + // 如果没有配置从库,直接使用主库连接池 + public static java.sql.Connection getConnection() throws SQLException { + if (cpdsList == null || cpdsList.size() == 0) { + return C3P0PoolManager.getConnection(); + } + int index = RandomUtils.nextInt(0, cpdsList.size());// [0,len) + return cpdsList.get(index).getConnection(); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/mysql/manager/InitDatabaseConnection.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/mysql/manager/InitDatabaseConnection.java new file mode 100755 index 0000000..95c7cdf --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/mysql/manager/InitDatabaseConnection.java @@ -0,0 +1,113 @@ +package com.akaxin.site.storage.dao.mysql.manager; + +import java.io.File; +import java.io.FileNotFoundException; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; +import java.util.Properties; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.core.io.FileSystemResource; +import org.springframework.core.io.support.EncodedResource; +import org.springframework.jdbc.datasource.init.ScriptUtils; + +import com.akaxin.site.storage.dao.config.JdbcConst; +import com.akaxin.site.storage.util.FileUtils; +import com.akaxin.site.storage.util.SqlLog; + +/** + * 启动mysql的情形下,需要获取一个连接建数据库,建表操作,只有在初始化数据库情况下才使用 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-07 16:18:11 + */ +public class InitDatabaseConnection extends AbstractPoolManager { + + private static final String OPENZALY_MYSQL_SQL = "openzaly-mysql.sql"; + private static Connection conn; + + public static void init(Properties prop) throws Exception { + try { + initAndGetConnection(prop); + } finally { + closeInitConnection(); + } + } + + public static Connection initAndGetConnection(Properties prop) throws Exception { + Connection conn = initConnection(prop); + String dbName = trimToNull(prop, JdbcConst.MYSQL_DB); + createAndUseDatabase(conn, dbName); + initDatabaseTable(conn); + return conn; + } + + private static Connection initConnection(Properties pro) throws Exception { + // "com.mysql.cj.jdbc.Driver" + String jdbcUrl = getJdbcUrlWithoutDBName(pro); + String userName = trimToNull(pro, JdbcConst.MYSQL_USER_NAME); + String password = trimToNull(pro, JdbcConst.MYSQL_PASSWORD); + Class.forName(MYSQL_JDBC_DRIVER); + conn = DriverManager.getConnection(jdbcUrl, userName, password); + conn.prepareStatement("SET NAMES utf8mb4;").executeUpdate(); + return conn; + } + + // 获取单独一个连接,迁移数据库使用 + public static Connection getConnection(Properties pro) throws Exception { + // "com.mysql.cj.jdbc.Driver" + String jdbcUrl = getJdbcUrl(pro); + String userName = trimToNull(pro, JdbcConst.MYSQL_USER_NAME); + String password = trimToNull(pro, JdbcConst.MYSQL_PASSWORD); + Class.forName(MYSQL_JDBC_DRIVER); + conn = DriverManager.getConnection(jdbcUrl, userName, password); + conn.prepareStatement("SET NAMES utf8mb4;").executeUpdate(); + return conn; + } + + public static void closeInitConnection() { + try { + if (conn != null) + conn.close(); + } catch (Exception e) { + SqlLog.error("close mysql init connection error", e); + } + } + + private static void createAndUseDatabase(Connection conn, String dbName) throws SQLException { + if (StringUtils.isEmpty(dbName)) { + throw new SQLException("openzaly team need designated database name,but now it's " + dbName); + } + String createSql = "CREATE DATABASE IF NOT EXISTS " + dbName + " CHARACTER SET utf8mb4;"; + String useSql = "use " + dbName; + conn.prepareStatement(createSql).executeUpdate(); + conn.prepareStatement(useSql).executeUpdate(); + } + + private static void initDatabaseTable(Connection conn) throws SQLException { + try { + // 生成临时sql文件加载数据库sql执行脚本, + File sqlFile = new File(OPENZALY_MYSQL_SQL); + if (!sqlFile.exists()) { + FileUtils.writeResourceToFile("/" + OPENZALY_MYSQL_SQL, sqlFile); + } + + // 初始化数据库表 + File file = new File(OPENZALY_MYSQL_SQL); + if (!file.exists()) { + throw new FileNotFoundException("init mysql with sql script file is not exists"); + } + + FileSystemResource rc = new FileSystemResource(file); + EncodedResource encodeRes = new EncodedResource(rc, "GBK"); + ScriptUtils.executeSqlScript(conn, encodeRes); + SqlLog.info("openzaly init mysql database with sql-script finish"); + + file.delete(); + } catch (Exception e) { + throw new SQLException(e); + } + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/mysql/manager/MysqlManager.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/mysql/manager/MysqlManager.java new file mode 100755 index 0000000..058dbaa --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/mysql/manager/MysqlManager.java @@ -0,0 +1,54 @@ +package com.akaxin.site.storage.dao.mysql.manager; + +import java.sql.Connection; +import java.sql.SQLException; +import java.util.Properties; + +import com.akaxin.site.storage.exception.InitDatabaseException; +import com.akaxin.site.storage.exception.NeedInitMysqlException; + +/** + * Mysql 连接器管理 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-11 19:05:56 + */ +public class MysqlManager { + + // 初始化数据库异常,会导致程序终端启动 + public static void initMysqlDB(Properties pro) throws InitDatabaseException, NeedInitMysqlException { + try { + // init db && table + InitDatabaseConnection.init(pro); + + // init c3p0 pool + C3P0PoolManager.initPool(pro); + C3P0PoolSlaveManager.initPool(pro); + } catch (Exception e) { + throw new InitDatabaseException("init mysql database error", e); + } finally { + InitDatabaseConnection.closeInitConnection(); + } + + } + + // 获取主库连接 + public static Connection getConnection() throws SQLException { + return C3P0PoolManager.getConnection(); + } + + // 获取从库连接 + public static Connection getSalveConnection() throws SQLException { + return C3P0PoolSlaveManager.getConnection(); + } + + // 释放资源 + public static void returnConnection(Connection conn) { + C3P0PoolManager.returnConnection(conn); + } + + public static String trimToNull(Properties pro, String key) { + return C3P0PoolManager.trimToNull(pro, key); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/sql/SQLConst.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/sql/SQLConst.java new file mode 100755 index 0000000..0e0f25a --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/sql/SQLConst.java @@ -0,0 +1,33 @@ +package com.akaxin.site.storage.dao.sql; + +/** + * SQLite中的表以及建表的SQL语句 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-12-13 17:35:52 + */ +public interface SQLConst { + + int SITE_DB_VERSION_9 = 9;// 0.9.5 + + int SITE_DB_VERSION_10 = 10;// 0.10.6 + + int SITE_DB_VERSION_11 = 11;// 1.0.7 + + String SITE_CONFIG_INFO = "site_config_info"; + String SITE_USER_PROFILE = "site_user_profile"; + String SITE_USER_SESSION = "site_user_session"; + String SITE_USER_FRIEND = "site_user_friend"; + String SITE_FRIEND_APPLY = "site_friend_apply"; + String SITE_USER_MESSAGE = "site_user_message"; + String SITE_MESSAGE_POINTER = "site_message_pointer"; + String SITE_USER_GROUP = "site_user_group"; + String SITE_GROUP_PROFILE = "site_group_profile"; + String SITE_GROUP_MESSAGE = "site_group_message"; + String SITE_GROUP_MESSAGE_POINTER = "site_group_message_pointer"; + String SITE_USER_DEVICE = "site_user_device"; + String SITE_PLUGIN_MANAGER = "site_plugin_manager"; + String SITE_USER_UIC = "site_user_uic";// 用户邀请码存放信息表名称 + + String SITE_EXPIRE_TOKEN = "site_expire_token"; +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/sqlite/manager/PluginArgs.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/sqlite/manager/PluginArgs.java new file mode 100755 index 0000000..8df022a --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/sqlite/manager/PluginArgs.java @@ -0,0 +1,9 @@ +package com.akaxin.site.storage.dao.sqlite.manager; + +public interface PluginArgs { + public String SITE_ADMIN_NAME = "管理后台"; + + public String FRIEND_SQUARE = "friendSquare"; + public String FRIEND_SQUARE_NAME = "用户广场"; + public String FRIEND_SQUARE_API = "/akaxin/userSquare/index"; +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/sqlite/manager/SQLiteJDBCManager.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/sqlite/manager/SQLiteJDBCManager.java new file mode 100755 index 0000000..da007a8 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/sqlite/manager/SQLiteJDBCManager.java @@ -0,0 +1,215 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.dao.sqlite.manager; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.site.storage.dao.config.DBConfig; +import com.akaxin.site.storage.dao.sql.SQLConst; +import com.akaxin.site.storage.exception.UpgradeDatabaseException; + +/** + *

+ * SQLite数据源连接管理
+ * 		1.数据源加载
+ * 		2.检测数据库中的表
+ * 		3.自动化升级
+ * 
+ * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017.10.22 11:59:38 + * + */ +public class SQLiteJDBCManager { + private static final Logger logger = LoggerFactory.getLogger(SQLiteJDBCManager.class); + + private static int SITE_DB_VERSION = SQLConst.SITE_DB_VERSION_10; + private static String sqliteDriverName = "org.sqlite.JDBC"; + private static Connection sqlitConnection = null; + private static final String DB_FILE_PATH = "openzalyDB.sqlite3"; + + private SQLiteJDBCManager() { + + } + + public static void initSqliteDB(DBConfig config) throws SQLException, UpgradeDatabaseException { + // try to upgrade + SQLiteUpgrade.doUpgrade(config); + + // reload sqlite driver + loadDatabaseDriver(config.getDbDir()); + + if (getDbVersion() < SITE_DB_VERSION) { + throw new UpgradeDatabaseException("openzaly-server need to upgrade before run it"); + } + + } + + // 指定目录,加载默认数据库dbDir目录下存放默认数据库 + public static void loadDatabaseDriver(String dbDir) { + try { + if (sqlitConnection != null) { + sqlitConnection.close(); + } + + Class.forName(sqliteDriverName); + String dbUrl = "jdbc:sqlite:"; + if (StringUtils.isNotEmpty(dbDir)) { + if (dbDir.endsWith("/")) { + dbUrl += dbDir + DB_FILE_PATH; + } else { + dbUrl += dbDir + "/" + DB_FILE_PATH; + } + } else { + dbUrl += "./" + DB_FILE_PATH; + } + // logger.info("load data base connectionUrl={}", dbUrl); + sqlitConnection = DriverManager.getConnection(dbUrl); + } catch (ClassNotFoundException e) { + logger.error("class not found.", e); + } catch (SQLException e) { + logger.error("load sqlite driver error.", e); + } + } + + // 指定目录,加载默认数据库dbDir目录下存放默认数据库 + public static void loadDriver(String dbFile) throws Exception { + if (sqlitConnection != null) { + sqlitConnection.close(); + } + + Class.forName(sqliteDriverName); + String dbUrl = "jdbc:sqlite:" + dbFile; + sqlitConnection = DriverManager.getConnection(dbUrl); + } + + // public static void checkDatabaseBeforeRun() throws SQLException, + // UpgradeDatabaseException { + // int dbVersion = getDbVersion(); + // logger.info("SQLite current user-version : {}", dbVersion); + // + // // 不是最新版本,启动需要创建表 + // if (dbVersion < SITE_DB_VERSION) { + // int num = checkDatabaseTable(); + // if (num == SQLConst.SITE_TABLES_MAP.size()) { + // // database index + // checkDatabaseIndex(); + // // 版本设置为 SITE_DB_VERSION + // setDbVersion(SITE_DB_VERSION); + // logger.info("create all database tables finish, currentuser-version:{}", + // getDbVersion()); + // } + // } + // } + + public static int getDbVersion() throws SQLException { + PreparedStatement pst = sqlitConnection.prepareStatement("PRAGMA user_version"); + ResultSet rs = pst.executeQuery(); + if (rs.next()) { + return rs.getInt(1); + } + return 0; + } + + public static void setDbVersion(int version) throws SQLException { + String sql = "PRAGMA user_version=" + version; + PreparedStatement pst = sqlitConnection.prepareStatement(sql); + pst.executeUpdate(); + } + + // public static int checkDatabaseTable() { + // int num = 0; + // for (String tableName : SQLConst.SITE_TABLES_MAP.keySet()) { + // int result = createTable(tableName, SQLConst.SITE_TABLES_MAP.get(tableName)); + // num += result; + // logger.info("create table:{} {}", tableName, result == 1 ? "OK" : "false"); + // } + // return num; + // } + + // private static void checkDatabaseIndex() { + // for (String indexSql : SQLIndex.DB_INDEXS_SQL) { + // boolean result = createIndex(indexSql); + // logger.info("create index result:{} sql:{}", result, indexSql); + // } + // } + + private static boolean existTable(String tableName) { + if (StringUtils.isBlank(tableName)) { + return false; + } + String checkTableSql = "SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name=? AND tbl_name=?;"; + try { + PreparedStatement pst = sqlitConnection.prepareStatement(checkTableSql); + pst.setString(1, tableName); + pst.setString(2, tableName); + ResultSet rs = pst.executeQuery(); + + if (rs.next()) { + return rs.getInt(1) >= 1; + } + } catch (SQLException e) { + logger.error("check table exist error.", e); + + } + return false; + } + + private static int createTable(String tableName, String createTableSQL) { + try { + if (existTable(tableName)) { + return 0; + } + PreparedStatement pst = sqlitConnection.prepareStatement(createTableSQL); + pst.executeUpdate(); + // 再次检测是否创建成功 + if (existTable(tableName)) { + return 1; + } + } catch (Exception e) { + logger.error("create table " + tableName + " sql=" + createTableSQL + " error.,", e); + } + return 0; + } + + private static boolean createIndex(String indexSQL) { + boolean result = false; + try { + PreparedStatement pst = sqlitConnection.prepareStatement(indexSQL); + pst.executeUpdate(); + result = true; + } catch (Exception e) { + logger.error("create index sql=" + indexSQL + " error.,", e); + } + return result; + } + + public static Connection getConnection() { + return sqlitConnection; + } + + public static String getDbFileName() { + return DB_FILE_PATH; + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/sqlite/manager/SQLiteUnique.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/sqlite/manager/SQLiteUnique.java new file mode 100755 index 0000000..d3793e1 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/sqlite/manager/SQLiteUnique.java @@ -0,0 +1,69 @@ +package com.akaxin.site.storage.dao.sqlite.manager; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.SQLException; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.site.storage.connection.DatabaseConnection; +import com.akaxin.site.storage.dao.sql.SQLConst; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-07-05 10:55:27 + */ +public class SQLiteUnique { + private static final Logger logger = LoggerFactory.getLogger(SQLiteUnique.class); + + private static String SITE_USER_PROFILE = SQLConst.SITE_USER_PROFILE; + private static String SITE_U2_MESSAGE = SQLConst.SITE_USER_MESSAGE; + private static String SITE_GROUP_MESSAGE = SQLConst.SITE_GROUP_MESSAGE; + + private SQLiteUnique() { + } + + /** + * 清理老版本中不是unique的字段,新版本需要设置为unique的问题 + * + * @throws SQLException + */ + public static void clearUnique(Connection conn) throws SQLException { + cleanUserPhoneId(conn); + cleanU2MsgId(conn); + cleanGroupMsgId(conn); + } + + private static void cleanUserPhoneId(Connection conn) throws SQLException { + String sql = "delete from site_user_profile where id in (select id from site_user_profile where phone_id in (select phone_id from site_user_profile group by phone_id having count(phone_id)>1)) AND id not in (select max(id) from site_user_profile group by phone_id having count(phone_id)>1);"; + int result = clearWork(conn, sql); + logger.info("clean unique phone_id from site_user_profile result={}", result); + } + + private static void cleanU2MsgId(Connection conn) throws SQLException { + String sql = "delete from site_user_message where id in (select id from site_user_message where msg_id in (select msg_id from site_user_message group by msg_id having count(msg_id)>1)) and id not in (select min(id) from site_user_message group by msg_id having count(msg_id)>1);"; + int result = clearWork(conn, sql); + logger.info("clean unique msg_id from site_user_message result={}", result); + } + + private static void cleanGroupMsgId(Connection conn) throws SQLException { + String sql = "delete from site_group_message where id in (select id from site_group_message where msg_id in (select msg_id from site_group_message group by msg_id having count(msg_id)>1)) and id not in (select min(id) from site_group_message group by msg_id having count(msg_id)>1);"; + int result = clearWork(conn, sql); + logger.info("clean unique msg_id from site_group_message result={}", result); + } + + private static int clearWork(Connection conn, String sql) throws SQLException { + PreparedStatement pst = null; + int result = 0; + try { + pst = conn.prepareStatement(sql); + result = pst.executeUpdate(); + } finally { + DatabaseConnection.closePreparedStatement(pst); + } + return result; + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/sqlite/manager/SQLiteUpgrade.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/sqlite/manager/SQLiteUpgrade.java new file mode 100755 index 0000000..d509b6f --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/dao/sqlite/manager/SQLiteUpgrade.java @@ -0,0 +1,325 @@ +package com.akaxin.site.storage.dao.sqlite.manager; + +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.core.io.FileSystemResource; +import org.springframework.core.io.support.EncodedResource; +import org.springframework.jdbc.datasource.init.ScriptUtils; + +import com.akaxin.site.storage.dao.config.DBConfig; +import com.akaxin.site.storage.dao.sql.SQLConst; +import com.akaxin.site.storage.exception.UpgradeDatabaseException; +import com.akaxin.site.storage.util.FileUtils; +import com.akaxin.site.storage.util.SqlLog; + +/** + * sqlite 数据库升级 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-28 11:47:07 + */ +public class SQLiteUpgrade { + private static final Logger logger = LoggerFactory.getLogger(SQLiteUpgrade.class); + + private static final String DB_FILE_PATH = "openzalyDB.sqlite3"; + private static final String OPENZALY_SQLITE_SQL = "openzaly-sqlite.sql"; + + private SQLiteUpgrade() { + } + + public static int doUpgrade(DBConfig config) throws SQLException, UpgradeDatabaseException { + return upgradeSqliteDB(config, false); + } + + public static int doUpgrade(DBConfig config, boolean clear) throws SQLException, UpgradeDatabaseException { + return upgradeSqliteDB(config, clear); + } + + // upgrade db,return current db user-version + private static int upgradeSqliteDB(DBConfig config, boolean clear) throws SQLException, UpgradeDatabaseException { + // 数据库文件 + File file = new File(config.getDbDir(), DB_FILE_PATH); + + if (!file.exists()) { + SqlLog.info("openzaly start with first init sqlite database"); + SQLiteJDBCManager.loadDatabaseDriver(config.getDbDir()); + doInitWork(SQLiteJDBCManager.getConnection()); + SQLiteJDBCManager.setDbVersion(SQLConst.SITE_DB_VERSION_11); + } else { + SQLiteJDBCManager.loadDatabaseDriver(config.getDbDir()); + if (clear) { + SQLiteUnique.clearUnique(SQLiteJDBCManager.getConnection()); + } + doUpgradeWork(config); + } + + return SQLiteJDBCManager.getDbVersion(); + } + + /** + * 通过sql脚本初始化数据库表 + * + * @param conn + * @throws SQLException + */ + private static void doInitWork(Connection conn) throws SQLException { + try { + // 生成临时sql文件加载数据库sql执行脚本, + File sqlFile = new File(OPENZALY_SQLITE_SQL); + if (!sqlFile.exists()) { + FileUtils.writeResourceToFile("/" + OPENZALY_SQLITE_SQL, sqlFile); + } + + // 初始化数据库表 + File file = new File(OPENZALY_SQLITE_SQL); + if (!file.exists()) { + throw new FileNotFoundException("init mysql with sql script file is not exists"); + } + + FileSystemResource rc = new FileSystemResource(file); + EncodedResource encodeRes = new EncodedResource(rc, "GBK"); + ScriptUtils.executeSqlScript(conn, encodeRes); + SqlLog.info("openzaly init sqlite with sql-script finish"); + + file.delete(); + } catch (Exception e) { + throw new SQLException(e); + } + } + + private static void doUpgradeWork(DBConfig config) throws UpgradeDatabaseException, SQLException { + int times = 5; + while (true) { + // 做一个简单的频率控制,防止升级出现死循环 + if (times-- <= 0) { + break; + } + + int dbVersion = SQLiteJDBCManager.getDbVersion(); + if (dbVersion < 9) { + // 1.首先备份 + String fileName = backupDatabaseFile(config.getDbDir(), dbVersion); + if (StringUtils.isEmpty(fileName)) { + throw new UpgradeDatabaseException("backup database file before upgrade error"); + } + // 2.升级 + if (upgrade0_9(dbVersion)) { + SQLiteJDBCManager.setDbVersion(SQLConst.SITE_DB_VERSION_9); + } else { + logger.error("upgrade user-version {} -> {} error.", dbVersion, SQLConst.SITE_DB_VERSION_9); + // db rename to original db file + restoreDatabase(fileName); + } + continue; + } else if (dbVersion == 9) { + // 0.9.5 upgrade from 9 to 10 + // 1.首先备份 + String fileName = backupDatabaseFile(config.getDbDir(), dbVersion); + if (StringUtils.isEmpty(fileName)) { + throw new UpgradeDatabaseException("backup database file before upgrade error"); + } + if (StringUtils.isEmpty(fileName)) { + throw new UpgradeDatabaseException("backup database file before upgrade error"); + } + // 2.升级 + if (upgrade9_10(dbVersion)) { + SQLiteJDBCManager.setDbVersion(SQLConst.SITE_DB_VERSION_10); + } else { + logger.error("upgrade user-version {} -> {} error.", dbVersion, SQLConst.SITE_DB_VERSION_10); + // db rename to original db file + restoreDatabase(fileName); + } + + } else if (dbVersion == 10) { + doInitWork(SQLiteJDBCManager.getConnection()); + SQLiteJDBCManager.setDbVersion(SQLConst.SITE_DB_VERSION_11); + } + + break; + } + } + + private static String backupDatabaseFile(String dbDir, int oldVersion) { + String filePath = "./"; + try { + String dbFileName = SQLiteJDBCManager.getDbFileName(); + if (StringUtils.isNotEmpty(dbDir)) { + filePath = dbDir; + } + File file = new File(filePath, dbFileName);// original db file + String bkFileName = dbFileName + ".backup." + oldVersion + "." + System.currentTimeMillis(); + File backupFile = new File(filePath, bkFileName); + if (!backupFile.exists()) { + new FileOutputStream(backupFile).close(); + } + FileOutputStream fos = new FileOutputStream(backupFile); + BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file)); + try { + byte[] buffer = new byte[1024]; + int bytesLen = 0; + while ((bytesLen = bis.read(buffer)) != -1) { + fos.write(buffer, 0, bytesLen); + } + } finally { + if (bis != null) { + bis.close(); + } + if (fos != null) { + fos.close(); + } + } + + return backupFile.getAbsolutePath(); + } catch (FileNotFoundException e) { + logger.error("backup db file error,fileUrl=" + filePath, e); + } catch (IOException e) { + logger.error("backup db file IOException.fileUrl=" + filePath, e); + } + + return null; + } + + private static boolean upgrade0_9(int oldVersion) { + String sql1 = "alter table " + SQLConst.SITE_USER_PROFILE + " RENAME TO " + + getTempTable(oldVersion, SQLConst.SITE_USER_PROFILE); + String sql2 = "alter table " + SQLConst.SITE_USER_FRIEND + " RENAME TO " + + getTempTable(oldVersion, SQLConst.SITE_USER_FRIEND); + String sql3 = "alter table " + SQLConst.SITE_USER_DEVICE + " RENAME TO " + + getTempTable(oldVersion, SQLConst.SITE_USER_DEVICE); + + boolean result = false; + List upgradeSqls = Arrays.asList(sql1, sql2, sql3); + try { + Connection conn = SQLiteJDBCManager.getConnection(); + conn.setAutoCommit(false); + try { + // 1.rename + for (String sql : upgradeSqls) { + PreparedStatement pst = conn.prepareStatement(sql); + int res = pst.executeUpdate(); + logger.info("rename database table result={} sql:{}", res, sql); + if (pst != null) { + pst.close(); + } + } + // 2.check all tables + doInitWork(conn); + + // 3. migrate + String migSql1 = "INSERT INTO " + SQLConst.SITE_USER_PROFILE + + "(id,site_user_id,global_user_id,user_id_pubk,user_name,user_photo,phone_id,user_status,mute,register_time) select id,site_user_id,global_user_id,user_id_pubk,user_name,user_photo,phone_id,user_status,mute,register_time from " + + getTempTable(oldVersion, SQLConst.SITE_USER_PROFILE); + + String migSql2 = "INSERT INTO " + SQLConst.SITE_USER_FRIEND + + "(id,site_user_id,site_friend_id,relation,mute,add_time) select id,site_user_id,site_friend_id,relation,mute,add_time from " + + getTempTable(oldVersion, SQLConst.SITE_USER_FRIEND); + + String migSql3 = "INSERT INTO " + SQLConst.SITE_USER_DEVICE + + "(id,site_user_id,device_id,user_device_pubk,user_token,device_name,active_time,add_time) SELECT id,site_user_id,device_id,user_device_pubk,user_token,device_name,active_time,add_time FROM " + + getTempTable(oldVersion, SQLConst.SITE_USER_DEVICE); + Map sqlMap = new HashMap() { + /** + * + */ + private static final long serialVersionUID = 1438260552099272302L; + + { + put(1, migSql1); + put(2, migSql2); + put(3, migSql3); + } + }; + for (int sqlIndex : sqlMap.keySet()) { + String sql_mig = sqlMap.get(sqlIndex); + PreparedStatement pst = conn.prepareStatement(sql_mig); + int res = pst.executeUpdate(); + logger.info("migrate database table result={} sql:{}", res, sql_mig); + if (pst != null) { + pst.close(); + } + } + result = true;// 兼容失败情况,这里不能使用成功个数 + } catch (Exception e) { + logger.error("upgrade to execute sql error", e); + } + conn.commit(); + conn.setAutoCommit(true); + } catch (SQLException e) { + logger.error("rename database table to upgrade error.", e); + } + + return result; + } + + private static boolean upgrade9_10(int oldVersion) { + String sql = "ALTER TABLE " + SQLConst.SITE_USER_MESSAGE + " RENAME TO " + + getTempTable(oldVersion, SQLConst.SITE_USER_MESSAGE); + + boolean result = false; + try { + Connection conn = SQLiteJDBCManager.getConnection(); + // 1.rename + PreparedStatement pst = conn.prepareStatement(sql); + int res = pst.executeUpdate(); + logger.info("rename database table result={} sql:{}", res, sql); + + if (pst != null) { + pst.close(); + } + + // 2.check all tables + doInitWork(conn); + + // 3. migrate + String sql_mig = "INSERT INTO " + SQLConst.SITE_USER_MESSAGE + + "(id,site_user_id,msg_id,send_user_id,receive_user_id,msg_type,content,device_id,ts_key,msg_time) " + + "SELECT id,site_user_id,msg_id,send_user_id,site_user_id,msg_type,content,device_id,ts_key,msg_time FROM " + + getTempTable(oldVersion, SQLConst.SITE_USER_MESSAGE); + + PreparedStatement pst2 = conn.prepareStatement(sql_mig); + int res2 = pst2.executeUpdate(); + logger.info("migrate database table result={} sql:{}", res2, sql_mig); + if (pst2 != null) { + pst2.close(); + } + result = true;// 兼容失败情况,这里不能使用成功个数 + } catch (SQLException e) { + logger.error("execute database table to upgrade error.", e); + } + + return result; + } + + private static String getTempTable(int oldVersion, String tableName) { + return "temp_" + oldVersion + "_" + tableName; + } + + private static void restoreDatabase(String filePath) throws UpgradeDatabaseException { + File backupFile = new File(filePath); + if (!backupFile.exists()) { + throw new UpgradeDatabaseException("backup file cannot find"); + } + String dbPath = backupFile.getParent(); + File dbFile = new File(dbPath, SQLiteJDBCManager.getDbFileName()); + if (dbFile.exists()) { + dbFile.delete(); + } + backupFile.renameTo(dbFile); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/exception/InitDatabaseException.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/exception/InitDatabaseException.java new file mode 100755 index 0000000..802837b --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/exception/InitDatabaseException.java @@ -0,0 +1,18 @@ +package com.akaxin.site.storage.exception; + +public class InitDatabaseException extends Throwable { + + /** + * + */ + private static final long serialVersionUID = -893476933526596823L; + + public InitDatabaseException(String message) { + super(message); + } + + public InitDatabaseException(String message, Throwable t) { + super(message, t); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/exception/MigrateDatabaseException.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/exception/MigrateDatabaseException.java new file mode 100755 index 0000000..5842c02 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/exception/MigrateDatabaseException.java @@ -0,0 +1,28 @@ +package com.akaxin.site.storage.exception; + +import com.akaxin.common.utils.StringHelper; + +public class MigrateDatabaseException extends Throwable { + + /** + * + */ + private static final long serialVersionUID = -893476933526596823L; + + public MigrateDatabaseException(String message) { + super(message); + } + + public MigrateDatabaseException(String message, Throwable t) { + super(message, t); + } + + public MigrateDatabaseException(Throwable t) { + super(t); + } + + public MigrateDatabaseException(String messagePattern, Object... objects) { + this(StringHelper.format(messagePattern, objects)); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/exception/NeedInitMysqlException.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/exception/NeedInitMysqlException.java new file mode 100755 index 0000000..08278c4 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/exception/NeedInitMysqlException.java @@ -0,0 +1,18 @@ +package com.akaxin.site.storage.exception; + +public class NeedInitMysqlException extends Throwable { + + /** + * + */ + private static final long serialVersionUID = -893476933526596823L; + + public NeedInitMysqlException(String message) { + super(message); + } + + public NeedInitMysqlException(String message, Throwable t) { + super(message, t); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/exception/UpgradeDatabaseException.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/exception/UpgradeDatabaseException.java new file mode 100755 index 0000000..d25d185 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/exception/UpgradeDatabaseException.java @@ -0,0 +1,30 @@ +package com.akaxin.site.storage.exception; + +import com.akaxin.common.utils.StringHelper; + +/** + * 迁移数据库错误会抛出此异常 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-14 19:06:40 + */ +public class UpgradeDatabaseException extends Throwable { + + /** + * + */ + private static final long serialVersionUID = -893476933526596823L; + + public UpgradeDatabaseException(String message) { + super(message); + } + + public UpgradeDatabaseException(String message, Throwable t) { + super(message, t); + } + + public UpgradeDatabaseException(String messagePattern, Object... objects) { + this(StringHelper.format(messagePattern, objects)); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/service/DeviceDaoService.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/DeviceDaoService.java new file mode 100755 index 0000000..bfef962 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/DeviceDaoService.java @@ -0,0 +1,89 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.service; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.api.IUserDeviceDao; +import com.akaxin.site.storage.bean.UserDeviceBean; +import com.akaxin.site.storage.dao.SiteUserDeviceDao; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2017-12-14 18:03:37 + */ +public class DeviceDaoService implements IUserDeviceDao { + + @Override + public boolean saveUserDevice(UserDeviceBean bean) throws SQLException { + return SiteUserDeviceDao.getInstance().save(bean); + } + + @Override + public boolean updateUserDevice(UserDeviceBean bean) throws SQLException { + return SiteUserDeviceDao.getInstance().update(bean); + } + + @Override + public boolean updateActiveTime(String siteUserId, String deviceId) throws SQLException { + return SiteUserDeviceDao.getInstance().updateActiveTime(siteUserId, deviceId); + } + + @Override + public UserDeviceBean getDeviceDetails(String siteUserId, String deviceId) throws SQLException { + return SiteUserDeviceDao.getInstance().queryDeviceDetails(siteUserId, deviceId); + } + + @Override + public List getUserDeviceList(String siteUserId) throws SQLException { + return SiteUserDeviceDao.getInstance().queryDeviceList(siteUserId); + } + + @Override + public List getActiveDeviceList(String siteUserId) throws SQLException { + return SiteUserDeviceDao.getInstance().queryActiveDeviceList(siteUserId); + } + + /** + * 获取最近的设备 + */ + @Override + public UserDeviceBean getLatestDevice(String siteUserId) throws SQLException { + return SiteUserDeviceDao.getInstance().queryLatestDevice(siteUserId); + } + + @Override + public String getDeviceId(String userId, String devicePuk) throws SQLException { + return SiteUserDeviceDao.getInstance().queryDeviceIdByDevicePuk(userId, devicePuk); + } + + @Override + public List getUserTokens(String siteUserId) throws SQLException { + return SiteUserDeviceDao.getInstance().queryUserTokens(siteUserId); + } + + @Override + public int limitDeviceNum(String siteUserId, int limit) throws SQLException { + return SiteUserDeviceDao.getInstance().limitDeviceNum(siteUserId, limit); + } + + @Override + public boolean delDevice(String siteUserId) throws SQLException { + return SiteUserDeviceDao.getInstance().delDevice(siteUserId); + } + +} \ No newline at end of file diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/service/FriendApplyDaoService.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/FriendApplyDaoService.java new file mode 100755 index 0000000..e4753c5 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/FriendApplyDaoService.java @@ -0,0 +1,63 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.service; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.api.IFriendApplyDao; +import com.akaxin.site.storage.bean.ApplyFriendBean; +import com.akaxin.site.storage.bean.ApplyUserBean; +import com.akaxin.site.storage.dao.SiteFriendApplyDao; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:12:28 + */ +public class FriendApplyDaoService implements IFriendApplyDao { + + @Override + public boolean saveApply(String siteUserId, String siteFriendId, String applyReason) throws SQLException { + return SiteFriendApplyDao.getInstance().saveApply(siteUserId, siteFriendId, applyReason); + } + + @Override + public boolean deleteApply(String siteUserId, String siteFriendId) throws SQLException { + return SiteFriendApplyDao.getInstance().deleteApply(siteUserId, siteFriendId); + } + + @Override + public int getApplyCount(String siteUserId, String siteFriendId) throws SQLException { + return SiteFriendApplyDao.getInstance().getApplyCount(siteUserId, siteFriendId); + } + + @Override + public int getApplyCount(String siteUserId) throws SQLException { + return SiteFriendApplyDao.getInstance().getApplyCount(siteUserId); + } + + @Override + public ApplyFriendBean getApplyInfo(String siteUserId, String siteFriendId, boolean isMaster) throws SQLException { + return SiteFriendApplyDao.getInstance().getApplyInfo(siteUserId, siteFriendId, isMaster); + } + + @Override + public List getApplyUsers(String siteUserId) throws SQLException { + return SiteFriendApplyDao.getInstance().queryApplyUsers(siteUserId); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/service/GroupDaoService.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/GroupDaoService.java new file mode 100755 index 0000000..a797635 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/GroupDaoService.java @@ -0,0 +1,173 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.service; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.api.IGroupDao; +import com.akaxin.site.storage.bean.GroupMemberBean; +import com.akaxin.site.storage.bean.GroupProfileBean; +import com.akaxin.site.storage.bean.SimpleGroupBean; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.dao.SiteGroupProfileDao; +import com.akaxin.site.storage.dao.SiteUserGroupDao; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:11:41 + */ +public class GroupDaoService implements IGroupDao { + + @Override + public List getGroupList(int pageNum, int pageSize) throws SQLException { + return SiteGroupProfileDao.getInstance().queryGroupList(pageNum, pageSize); + } + + @Override + public List getUserGroupList(String userId) throws SQLException { + return SiteUserGroupDao.getInstance().queryUserGroupList(userId); + } + + @Override + public List getUserGroupList(String siteUserId, int pageNum, int pageSize) throws SQLException { + return SiteUserGroupDao.getInstance().queryUserGroupList(siteUserId, pageNum, pageSize); + } + + @Override + public int getUserGroupCount(String siteUserId) throws SQLException { + return SiteUserGroupDao.getInstance().queryUserGroupCount(siteUserId); + } + + @Override + public String getGroupOwner(String groupId) throws SQLException { + return SiteGroupProfileDao.getInstance().getGrouMaster(groupId); + } + + @Override + public GroupMemberBean getGroupMember(String siteUserId, String groupId) throws SQLException { + return SiteUserGroupDao.getInstance().getGroupMember(siteUserId, groupId); + } + + @Override + public List getGroupMembersId(String groupId) throws SQLException { + return SiteUserGroupDao.getInstance().queryGroupMembersId(groupId); + } + + @Override + public List getGroupMemberList(String groupId, int pageNum, int pageSize) throws SQLException { + return SiteUserGroupDao.getInstance().queryGroupMemberList(groupId, pageNum, pageSize); + } + + @Override + public int getNonGroupMemberNum(String groupId) throws SQLException { + return SiteUserGroupDao.getInstance().queryNonGroupMemberNum(groupId); + } + + @Override + public List getNonGroupMemberList(String groupId, int pageNum, int pageSize) throws SQLException { + return SiteUserGroupDao.getInstance().queryNonGroupMemberList(groupId, pageNum, pageSize); + } + + @Override + public int getUserFriendNonGroupMemberNum(String siteUserId, String groupId) throws SQLException { + return SiteUserGroupDao.getInstance().queryUserFriendNonGroupMemberNum(siteUserId, groupId); + } + + @Override + public List getUserFriendNonGroupMemberList(String siteUserId, String groupId, int pageNum, + int pageSize) throws SQLException { + return SiteUserGroupDao.getInstance().queryUserFriendNonGroupMemberList(siteUserId, groupId, pageNum, + pageSize); + } + + @Override + public GroupProfileBean addGroupProfile(GroupProfileBean bean) throws SQLException { + return SiteGroupProfileDao.getInstance().saveGroupProfile(bean); + } + + @Override + public boolean addGroupMember(String siteUserId, String groupId, int status) throws SQLException { + return SiteUserGroupDao.getInstance().addGroupMember(siteUserId, groupId, status); + } + + @Override + public boolean deleteGroupProfile(String groupId) throws SQLException { + return SiteGroupProfileDao.getInstance().deleteGroupProfile(groupId); + } + + @Override + public int updateGroupProfile(GroupProfileBean bean) throws SQLException { + return SiteGroupProfileDao.getInstance().updateGroupProfile(bean); + } + + @Override + public int updateGroupIGC(GroupProfileBean bean) throws SQLException { + return SiteGroupProfileDao.getInstance().updateGroupIGC(bean); + } + + @Override + public int getTotalGroupNum() throws SQLException { + return SiteGroupProfileDao.getInstance().getTotalGroupNum(); + } + + @Override + public int getGroupNum(long now, int day) throws SQLException { + return SiteGroupProfileDao.getInstance().getGroupNum(now, day); + } + + @Override + public boolean rmGroupProfile(String groupId) throws SQLException { + return SiteGroupProfileDao.getInstance().rmGroupProfile(groupId); + } + + @Override + public int updateGroupOwner(String siteUserId, String groupId) throws SQLException { + return SiteGroupProfileDao.getInstance().updateGroupOwer(siteUserId, groupId); + } + + @Override + public GroupProfileBean queryGroupProfile(String groupId) throws SQLException { + return SiteGroupProfileDao.getInstance().queryGroupProfile(groupId); + } + + @Override + public GroupProfileBean querySimpleGroupProfile(String groupId) throws SQLException { + return SiteGroupProfileDao.getInstance().querySimpleGroupProfile(groupId); + } + + @Override + public int getGroupStatus(String groupId) throws SQLException { + return SiteGroupProfileDao.getInstance().queryGroupStatus(groupId); + } + + @Override + public int getGroupMembersCount(String groupId) throws SQLException { + return SiteUserGroupDao.getInstance().queryGroupMembersCount(groupId); + } + + @Override + public List getUserGroupsId(String userId) throws SQLException { + return SiteUserGroupDao.getInstance().queryUserGroupsId(userId); + } + + @Override + public boolean deleteGroupMember(String groupId, List userIds) throws SQLException { + return SiteUserGroupDao.getInstance().deleteGroupMember(groupId, userIds); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/service/MessageDaoService.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/MessageDaoService.java new file mode 100755 index 0000000..67ee43f --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/MessageDaoService.java @@ -0,0 +1,127 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.service; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import com.akaxin.site.storage.api.IMessageDao; +import com.akaxin.site.storage.bean.GroupMessageBean; +import com.akaxin.site.storage.bean.U2MessageBean; +import com.akaxin.site.storage.dao.SiteGroupMessageDao; +import com.akaxin.site.storage.dao.SiteU2MessageDao; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:11:33 + */ +public class MessageDaoService implements IMessageDao { + + @Override + public boolean saveU2Message(U2MessageBean u2Bean) throws SQLException { + return SiteU2MessageDao.getInstance().saveU2Message(u2Bean); + } + + @Override + public boolean updateU2Pointer(String id, String deviceId, long finish) throws SQLException { + return SiteU2MessageDao.getInstance().updateU2MessagePointer(id, deviceId, finish); + } + + @Override + public List queryU2Message(String id, String deviceId, long start, long limit) throws SQLException { + return SiteU2MessageDao.getInstance().getU2Message(id, deviceId, start, limit); + } + + @Override + public long queryU2Pointer(String userId, String deviceId) throws SQLException { + return SiteU2MessageDao.getInstance().queryU2MessagePointer(userId, deviceId); + } + + @Override + public long queryMaxU2Pointer(String userId) throws SQLException { + return SiteU2MessageDao.getInstance().queryMaxU2MessagePointer(userId); + } + + @Override + public long queryMaxU2MessageId(String userId) throws SQLException { + return SiteU2MessageDao.getInstance().queryMaxU2MessageId(userId); + } + + @Override + public List queryU2MessageByMsgId(List msgIds) throws SQLException { + return SiteU2MessageDao.getInstance().queryU2MessageByMsgId(msgIds); + } + + @Override + public boolean saveGroupMessage(GroupMessageBean gmsgBean) throws SQLException { + return SiteGroupMessageDao.getInstance().saveGroupMessage(gmsgBean); + } + + @Override + public boolean updateGroupPointer(String gid, String userId, String deviceId, long finish) throws SQLException { + return SiteGroupMessageDao.getInstance().updateGroupMessagePointer(gid, userId, deviceId, finish); + } + + @Override + public List queryGroupMessage(String groupId, String userId, String deviceId, long start, + int limit) throws SQLException { + return SiteGroupMessageDao.getInstance().queryGroupMessage(groupId, userId, deviceId, start, limit); + } + + @Override + public long queryGroupMessagePointer(String groupId, String siteUserId, String deviceId) throws SQLException { + return SiteGroupMessageDao.getInstance().queryGroupPointer(groupId, siteUserId, deviceId, 0); + } + + @Override + public long queryMaxGroupPointer(String groupId) throws SQLException { + return SiteGroupMessageDao.getInstance().queryMaxGroupPointer(groupId); + } + + @Override + public long queryMaxUserGroupPointer(String groupId, String siteUserId) throws SQLException { + return SiteGroupMessageDao.getInstance().queryMaxUserGroupPointer(groupId, siteUserId); + } + + @Override + public List queryGroupMesageByMsgId(List msgIds) throws SQLException { + return SiteGroupMessageDao.getInstance().queryGroupMessageByMsgId(msgIds); + } + + @Override + public int queryU2MessagePerDay(long now, int day) throws SQLException { + int u2Count = SiteU2MessageDao.getInstance().queryNumMessagePerDay(now, day); + return u2Count; + } + + @Override + public boolean delUserMessage(String siteUserId) throws SQLException { + boolean U2 = SiteU2MessageDao.getInstance().delUserMessage(siteUserId); + boolean group = SiteGroupMessageDao.getInstance().delUserMessage(siteUserId); + return U2 == group == true ? true : false; + } + + @Override + public List queryMessageFile(String siteUserId) throws SQLException { + List u2FileList = SiteU2MessageDao.getInstance().queryMessageFile(siteUserId); + List groupFileList = SiteGroupMessageDao.getInstance().queryMessageFile(siteUserId); + ArrayList msgList = new ArrayList<>(); + msgList.addAll(u2FileList); + msgList.addAll(groupFileList); + return msgList; + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/service/PluginServiceDao.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/PluginServiceDao.java new file mode 100755 index 0000000..341fef6 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/PluginServiceDao.java @@ -0,0 +1,73 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.service; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.api.IPluginDao; +import com.akaxin.site.storage.bean.PluginBean; +import com.akaxin.site.storage.dao.SitePluginDao; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:11:28 + */ +public class PluginServiceDao implements IPluginDao { + + @Override + public boolean addPlugin(PluginBean bean) throws SQLException { + return SitePluginDao.getInstance().addPlugin(bean); + } + + @Override + public boolean updatePlugin(PluginBean bean) throws SQLException { + return SitePluginDao.getInstance().updatePlugin(bean); + } + + @Override + public boolean deletePlugin(int pluginId) throws SQLException { + return SitePluginDao.getInstance().deletePlugin(pluginId); + } + + @Override + public PluginBean getPluginProfile(int pluginId) throws SQLException { + return SitePluginDao.getInstance().queryPluginProfile(pluginId); + } + + @Override + public List getPluginPageList(int pageNum, int pageSize, int position, int permissionStatus) + throws SQLException { + return SitePluginDao.getInstance().queryPluginList(pageNum, pageSize, position, permissionStatus); + } + + @Override + public List getPluginPageList(int pageNum, int pageSize, int position) throws SQLException { + return SitePluginDao.getInstance().queryPluginList(pageNum, pageSize, position); + } + + @Override + public List getAllPluginList(int pageNum, int pageSize) throws SQLException { + return SitePluginDao.getInstance().queryAllPluginList(pageNum, pageSize); + } + + @Override + public String reSetAuthKey(int pluginId) throws SQLException { + return SitePluginDao.getInstance().resetAuthKey(pluginId); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/service/SiteConfigDaoService.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/SiteConfigDaoService.java new file mode 100755 index 0000000..c6561cc --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/SiteConfigDaoService.java @@ -0,0 +1,51 @@ +/** + * Copyright 2018-2028 Akaxin Group + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.service; + +import java.sql.SQLException; +import java.util.List; +import java.util.Map; + +import com.akaxin.site.storage.api.ISiteConfigDao; +import com.akaxin.site.storage.dao.SiteConfigDao; + +/** + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:11:22 + */ +public class SiteConfigDaoService implements ISiteConfigDao { + + @Override + public Map getSiteConfig() throws SQLException { + return SiteConfigDao.getInstance().queryConfig(); + } + + @Override + public String getSiteConfigValue(int key) throws SQLException { + return SiteConfigDao.getInstance().queryConfigValue(key); + } + + @Override + public int updateSiteConfig(Map configMap, boolean isAdmin) throws SQLException { + return SiteConfigDao.getInstance().updateConfig(configMap, isAdmin); + } + + @Override + public int updateSiteConfig(int key, String value) throws SQLException { + return SiteConfigDao.getInstance().updateConfig(key, value); + } + +} \ No newline at end of file diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/service/SiteUsersDaoService.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/SiteUsersDaoService.java new file mode 100755 index 0000000..cb54d8a --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/SiteUsersDaoService.java @@ -0,0 +1,36 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.service; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.api.ISiteUsersDao; +import com.akaxin.site.storage.dao.SiteUsersDao; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:11:03 + */ +public class SiteUsersDaoService implements ISiteUsersDao { + + @Override + public List getSiteUserByPage(int pageNum, int pageSize) throws SQLException { + return SiteUsersDao.getInstance().querySiteUserId(pageNum, pageSize); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/service/TokenDaoService.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/TokenDaoService.java new file mode 100755 index 0000000..2788a1e --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/TokenDaoService.java @@ -0,0 +1,46 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.service; + +import java.sql.SQLException; + +import com.akaxin.site.storage.api.ITokenDao; +import com.akaxin.site.storage.bean.ExpireToken; +import com.akaxin.site.storage.dao.SiteTokenDao; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-28 16:42:43 + */ +public class TokenDaoService implements ITokenDao { + + @Override + public boolean addToken(ExpireToken bean) throws SQLException { + return SiteTokenDao.getInstance().addToken(bean); + } + + @Override + public ExpireToken getExpireToken(String token) throws SQLException { + return SiteTokenDao.getInstance().queryExpireToken(token); + } + + @Override + public ExpireToken getExpireTokenByBid(String bid, long time) throws SQLException { + return SiteTokenDao.getInstance().queryExpireTokenByBid(bid, time); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/service/UicDaoService.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/UicDaoService.java new file mode 100755 index 0000000..4a4f545 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/UicDaoService.java @@ -0,0 +1,62 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.service; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.api.IUicDao; +import com.akaxin.site.storage.bean.UicBean; +import com.akaxin.site.storage.dao.SiteUICDao; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:11:17 + */ +public class UicDaoService implements IUicDao { + + @Override + public boolean addUic(UicBean bean) throws SQLException { + return SiteUICDao.getInstance().addUIC(bean); + } + + @Override + public boolean batchAddUic(UicBean bean, int num, int length) throws SQLException { + return SiteUICDao.getInstance().batchAddUIC(bean, num, length); + } + + @Override + public boolean updateUic(UicBean bean) throws SQLException { + return SiteUICDao.getInstance().updateUIC(bean); + } + + @Override + public UicBean getUicInfo(String uic) throws SQLException { + return SiteUICDao.getInstance().queryUIC(uic); + } + + @Override + public List getUicPageList(int pageNum, int pageSize, int status) throws SQLException { + return SiteUICDao.getInstance().queryUicList(pageNum, pageSize, status); + } + + @Override + public List getAllUicPageList(int pageNum, int pageSize) throws SQLException { + return SiteUICDao.getInstance().queryAllUicList(pageNum, pageSize); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/service/UserFriendDaoService.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/UserFriendDaoService.java new file mode 100755 index 0000000..82bd77a --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/UserFriendDaoService.java @@ -0,0 +1,109 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.service; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.api.IUserFriendDao; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.UserFriendBean; +import com.akaxin.site.storage.dao.SiteUserFriendDao; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:11:10 + */ +public class UserFriendDaoService implements IUserFriendDao { + + @Override + public int getUserFriendNum(String siteUserId) throws SQLException { + return SiteUserFriendDao.getInstance().queryUserFriendNum(siteUserId); + } + + @Override + public List getUserFriends(String siteUserId) throws SQLException { + return SiteUserFriendDao.getInstance().queryUserFriends(siteUserId); + } + + @Override + public List getUserFriendsByPage(String siteUserId, int pageNum, int pageSize) throws SQLException { + return SiteUserFriendDao.getInstance().queryUserFriendsByPage(siteUserId, pageNum, pageSize); + } + + @Override + public boolean saveRelation(String siteUserId, String siteFriendId, int relation) throws SQLException { + return SiteUserFriendDao.getInstance().saveRelation(siteUserId, siteFriendId, relation); + } + + @Override + public int queryRelation(String siteUserId, String siteFriendId) throws SQLException { + return SiteUserFriendDao.getInstance().queryRelation(siteUserId, siteFriendId); + } + + @Override + public boolean queryIsFriendRelation(String siteUserId, String siteFriendId, boolean isMaster) throws SQLException { + return SiteUserFriendDao.getInstance().queryIsFriendRelation(siteUserId, siteFriendId, isMaster); + } + + @Override + public boolean updateRelation(String siteUserId, String siteFriendId, int relation) throws SQLException { + return SiteUserFriendDao.getInstance().updateRelation(siteUserId, siteFriendId, relation); + } + + @Override + public boolean deleteRelation(String siteUserId, String siteFriendId) throws SQLException { + return SiteUserFriendDao.getInstance().deleteRelation(siteUserId, siteFriendId); + } + + @Override + public UserFriendBean getFriendSetting(String siteUserId, String siteFriendId) throws SQLException { + return SiteUserFriendDao.getInstance().queryUserFriendSetting(siteUserId, siteFriendId); + } + + @Override + public boolean updateFriendSetting(String siteUserId, UserFriendBean bean) throws SQLException { + return SiteUserFriendDao.getInstance().updateUserFriendSetting(siteUserId, bean); + } + + @Override + public boolean isMute(String siteUserId, String siteFriendId) throws SQLException { + return SiteUserFriendDao.getInstance().queryMute(siteUserId, siteFriendId); + } + + @Override + public boolean updateMute(String siteUserId, String siteFriendId, boolean mute) throws SQLException { + return SiteUserFriendDao.getInstance().updateMute(siteUserId, siteFriendId, mute); + } + + @Override + public boolean remarkFriend(String siteUserId, String siteFriendId, String aliasName, String aliasNameInLatin) + throws SQLException { + return SiteUserFriendDao.getInstance().updateFriendAlias(siteUserId, siteFriendId, aliasName, aliasNameInLatin); + } + + @Override + public int friendNum(long now, int day) throws SQLException { + return SiteUserFriendDao.getInstance().getFrienNum(now, day); + } + + @Override + public boolean delUserFriend(String siteUserId) throws SQLException { + return SiteUserFriendDao.getInstance().delUserFriend(siteUserId); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/service/UserGroupDaoService.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/UserGroupDaoService.java new file mode 100755 index 0000000..bda8828 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/UserGroupDaoService.java @@ -0,0 +1,64 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.service; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.api.IUserGroupDao; +import com.akaxin.site.storage.bean.UserGroupBean; +import com.akaxin.site.storage.dao.SiteGroupMessageDao; +import com.akaxin.site.storage.dao.SiteUserGroupDao; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-03-03 15:04:47 + */ +public class UserGroupDaoService implements IUserGroupDao { + + @Override + public List checkGroupMember(String siteGroupId, List userIds) throws SQLException { + return SiteUserGroupDao.getInstance().checkGroupMember(siteGroupId, userIds); + } + + @Override + public UserGroupBean getUserGroupSetting(String siteUserId, String siteGroupId) throws SQLException { + return SiteUserGroupDao.getInstance().getUserGroupSetting(siteUserId, siteGroupId); + } + + @Override + public boolean updateUserGroupSetting(String siteUserId, UserGroupBean bean) throws SQLException { + return SiteUserGroupDao.getInstance().updateUserGroupSetting(siteUserId, bean); + } + + @Override + public boolean isMute(String siteUserId, String siteGroupId) throws SQLException { + return SiteUserGroupDao.getInstance().queryMute(siteUserId, siteGroupId); + } + + @Override + public boolean updateMute(String siteUserId, String siteGroupId, boolean mute) throws SQLException { + return SiteUserGroupDao.getInstance().updateMute(siteUserId, siteGroupId, mute); + } + + @Override + public int queryGroupMessagePerDay(long now, int day) throws SQLException { + int groupCount = SiteGroupMessageDao.getInstance().queryNumMessagePerDay(now, day); + return groupCount; + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/service/UserProfileDaoService.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/UserProfileDaoService.java new file mode 100755 index 0000000..89e010e --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/UserProfileDaoService.java @@ -0,0 +1,151 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.service; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.api.IUserProfileDao; +import com.akaxin.site.storage.bean.SimpleUserBean; +import com.akaxin.site.storage.bean.SimpleUserRelationBean; +import com.akaxin.site.storage.bean.UserFriendBean; +import com.akaxin.site.storage.bean.UserProfileBean; +import com.akaxin.site.storage.dao.SiteUserProfileDao; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:11:03 + */ +public class UserProfileDaoService implements IUserProfileDao { + + @Override + public boolean saveProfile(UserProfileBean bean) throws SQLException { + return SiteUserProfileDao.getInstance().saveProfile(bean); + } + + @Override + public String getSiteUserIdByGlobalUserId(String globalUserId) throws SQLException { + return SiteUserProfileDao.getInstance().querySiteUserIdByGlobalUserId(globalUserId); + } + + @Override + public String getSiteUserIdByPhone(String phoneId) throws SQLException { + return SiteUserProfileDao.getInstance().querySiteUserIdPhone(phoneId); + } + + @Override + public String getSiteUserIdByLowercaseLoginId(String lowercaseLoginId) throws SQLException { + return SiteUserProfileDao.getInstance().querySiteUserIdByLowercaseLoginId(lowercaseLoginId); + } + + @Override + public String getGlobalUserIdBySiteUserId(String siteUserId) throws SQLException { + return SiteUserProfileDao.getInstance().queryGlobalUserIdBySiteUserId(siteUserId); + } + + @Override + public String getSiteLoginIdBySiteUserId(String siteUserId) throws SQLException { + return SiteUserProfileDao.getInstance().querySiteLoginIdBySiteUserId(siteUserId); + } + + @Override + public SimpleUserBean getSimpleProfileById(String siteUserId, boolean isMaster) throws SQLException { + return SiteUserProfileDao.getInstance().querySimpleProfileById(siteUserId, isMaster); + } + + @Override + public SimpleUserBean getSimpleProfileByGlobalUserId(String globalUserId, boolean isMaster) throws SQLException { + return SiteUserProfileDao.getInstance().querySimpleProfileByGlobalUserId(globalUserId, isMaster); + } + + @Override + public UserFriendBean getFriendProfileById(String siteUserId, String siteFriendId) throws SQLException { + return SiteUserProfileDao.getInstance().queryFriendProfileById(siteUserId, siteFriendId); + } + + @Override + public UserProfileBean getUserProfileById(String userId) throws SQLException { + return SiteUserProfileDao.getInstance().queryUserProfileById(userId); + } + + @Override + public UserProfileBean getUserProfileByGlobalUserId(String globalUserId) throws SQLException { + return SiteUserProfileDao.getInstance().queryUserProfileByGlobalUserId(globalUserId); + } + + @Override + public UserProfileBean getUserProfileByFullPhoneId(String fullPhoneId) throws SQLException { + return SiteUserProfileDao.getInstance().queryUserProfileByFullPhoneId(fullPhoneId); + } + + @Override + public int updateProfile(UserProfileBean userBean) throws SQLException { + return SiteUserProfileDao.getInstance().updateUserProfile(userBean); + } + + @Override + public int updateUserIdPubk(String siteUserId, String globalUserId, String userIdPubk) throws SQLException { + return SiteUserProfileDao.getInstance().updateUserIdPubk(siteUserId, globalUserId, userIdPubk); + } + + @Override + public int updateUserStatus(String siteUserId, int status) throws SQLException { + return SiteUserProfileDao.getInstance().updateUserStatus(siteUserId, status); + } + + @Override + public List getUserRelationPageList(String siteUserId, int pageNum, int pageSize) + throws SQLException { + return SiteUserProfileDao.getInstance().queryUserRelationPageList(siteUserId, pageNum, pageSize); + } + + @Override + public int getTotalUserNum() throws SQLException { + return SiteUserProfileDao.getInstance().queryTotalUserNum(); + } + + @Override + public List getUserPageList(int pageNum, int pageSize) throws SQLException { + return SiteUserProfileDao.getInstance().queryUserPageList(pageNum, pageSize); + } + + @Override + public boolean isMute(String siteUserId) throws SQLException { + return SiteUserProfileDao.getInstance().queryMute(siteUserId); + } + + @Override + public boolean updateMute(String siteUserId, boolean mute) throws SQLException { + return SiteUserProfileDao.getInstance().updateMute(siteUserId, mute); + } + + @Override + public int queryRegisterNumPerDay(long now, int day) throws SQLException { + return SiteUserProfileDao.getInstance().queryRegisterNumPerDay(now, day); + } + + @Override + public int getUserNum(long now, int day) throws SQLException { + return SiteUserProfileDao.getInstance().getUserNum(now, day); + } + + @Override + public boolean delUser(String siteUserId) throws SQLException { + return SiteUserProfileDao.getInstance().delUser(siteUserId); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/service/UserSessionDaoService.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/UserSessionDaoService.java new file mode 100755 index 0000000..2a1cfcc --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/service/UserSessionDaoService.java @@ -0,0 +1,63 @@ +/** + * Copyright 2018-2028 Akaxin Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.akaxin.site.storage.service; + +import java.sql.SQLException; +import java.util.List; + +import com.akaxin.site.storage.api.IUserSessionDao; +import com.akaxin.site.storage.bean.SimpleAuthBean; +import com.akaxin.site.storage.bean.UserSessionBean; +import com.akaxin.site.storage.dao.SiteUserSessionDao; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-01-31 12:08:41 + */ +public class UserSessionDaoService implements IUserSessionDao { + + @Override + public boolean saveUserSession(UserSessionBean bean) throws SQLException { + return SiteUserSessionDao.getInstance().saveIfAbsent(bean); + } + + @Override + public SimpleAuthBean getUserSession(String sessionId) throws SQLException { + return SiteUserSessionDao.getInstance().queryAuthSession(sessionId); + } + + @Override + public List getSessionDeivceIds(String userId) throws SQLException { + return SiteUserSessionDao.getInstance().queryDeviceIds(userId); + } + + @Override + public boolean onlineSession(String siteUserId, String deviceId) throws SQLException { + return SiteUserSessionDao.getInstance().setOnlineSession(siteUserId, deviceId, true); + } + + @Override + public boolean offlineSession(String siteUserId, String deviceId) throws SQLException { + return SiteUserSessionDao.getInstance().setOnlineSession(siteUserId, deviceId, false); + } + + @Override + public boolean deleteUserSession(String siteUserId, String deviceId) throws SQLException { + return SiteUserSessionDao.getInstance().deleteSession(siteUserId, deviceId); + } + +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/util/FileUtils.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/util/FileUtils.java new file mode 100755 index 0000000..fc6df8c --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/util/FileUtils.java @@ -0,0 +1,39 @@ +package com.akaxin.site.storage.util; + +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; + +import com.akaxin.site.storage.dao.mysql.manager.MysqlManager; + +public class FileUtils { + + public static void writeResourceToFile(String resourceName, File file) throws FileNotFoundException, IOException { + if (!file.exists()) { + new FileOutputStream(file).close(); + } + InputStream is = MysqlManager.class.getResourceAsStream(resourceName); + BufferedInputStream bis = new BufferedInputStream(is); + FileOutputStream fos = new FileOutputStream(file); + try { + byte[] buffer = new byte[1024]; + int bytesLen = 0; + while ((bytesLen = bis.read(buffer)) != -1) { + fos.write(buffer, 0, bytesLen); + } + } finally { + if (bis != null) { + bis.close(); + } + if (is != null) { + is.close(); + } + if (fos != null) { + fos.close(); + } + } + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/util/MigrateUtils.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/util/MigrateUtils.java new file mode 100755 index 0000000..9f015b8 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/util/MigrateUtils.java @@ -0,0 +1,464 @@ +package com.akaxin.site.storage.util; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Properties; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.akaxin.common.utils.PrintUtils; +import com.akaxin.site.storage.connection.DatabaseConnection; +import com.akaxin.site.storage.dao.config.JdbcConst; +import com.akaxin.site.storage.dao.mysql.manager.InitDatabaseConnection; +import com.akaxin.site.storage.dao.mysql.manager.MysqlManager; +import com.akaxin.site.storage.dao.sqlite.manager.SQLiteJDBCManager; +import com.akaxin.site.storage.dao.sqlite.manager.SQLiteUnique; +import com.akaxin.site.storage.exception.MigrateDatabaseException; +import com.akaxin.site.storage.exception.NeedInitMysqlException; + +/** + * 数据库迁移工具,将sqlite中数据迁移到mysql中 + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-06-14 19:01:42 + */ +public class MigrateUtils { + private static final Logger logger = LoggerFactory.getLogger(MigrateUtils.class); + + private static Connection sqliteConnection; + private static Connection mysqlConnection; + + public static void sqlite2Mysql(Properties prop) throws MigrateDatabaseException, NeedInitMysqlException { + + if (prop == null || prop.size() == 0) { + throw new MigrateDatabaseException("properties config is null"); + } + + String sqliteUrl = prop.getProperty(JdbcConst.SQLITE_URL); + + if (StringUtils.isEmpty(sqliteUrl)) { + throw new MigrateDatabaseException("sqlite url is null"); + } + + try { + // Step1.加载sqlite + try { + SQLiteJDBCManager.loadDriver(sqliteUrl); + sqliteConnection = SQLiteJDBCManager.getConnection(); + } catch (Exception e) { + throw new MigrateDatabaseException("load sqlite url={} error", sqliteUrl); + } + + // Setp2. check mysql database and tables and return conn + try { + mysqlConnection = InitDatabaseConnection.initAndGetConnection(prop); + // mysqlConnection.prepareStatement("SET NAMES utf8mb4;").executeUpdate(); + } catch (Exception e) { + throw new MigrateDatabaseException("init and get mysql database connection error,msg={}", + e.getMessage()); + } + + try { + SQLiteUnique.clearUnique(sqliteConnection); + } catch (SQLException e) { + logger.error("clear unique field error,but we try to do migrate work", e); + } + + if (sqliteConnection != null && mysqlConnection != null) { + doSiteConfigInfoTable(); + doSiteUserProfileTable(); + doSiteUserSessionTable(); + doSiteUserFriendTable(); + doSiteFriendAapplyTable(); + doSiteUserMessageTable(); + doSiteMessagePointerTable(); + doSiteUserGroupTable(); + doSiteGroupProfileTable(); + doSiteGroupMessageTable(); + doSiteGroupMessagePointerTable(); + doSiteUserDeviceTable(); + doSitePluginManagerTable(); + doSiteUserUicTable(); + } else { + throw new MigrateDatabaseException("sqlite or mysql connection is null"); + } + + } finally { + // close sqliteConnection + MysqlManager.returnConnection(sqliteConnection); + // close mysqlConnection + MysqlManager.returnConnection(mysqlConnection); + } + + } + + // table.1 : site_config_info + private static boolean doSiteConfigInfoTable() throws MigrateDatabaseException { + // 迁移表1. + String table = "site_config_info"; + String sql = "id,config_key,config_value"; + String fromSql = "SELECT " + sql + " from site_config_info;"; + String toSql = "INSERT INTO site_config_info(" + sql + ") VALUES(?,?,?);"; + + return doMigrateWork(table, fromSql, toSql, "siteConfigInfoRS"); + } + + private static void siteConfigInfoRS(PreparedStatement ps, ResultSet rs) throws SQLException { + ps.setInt(1, rs.getInt(1)); + ps.setInt(2, rs.getInt(2)); + ps.setString(3, rs.getString(3)); + ps.executeUpdate(); + } + + // table.2 site_user_profile + private static boolean doSiteUserProfileTable() throws MigrateDatabaseException { + String table = "site_user_profile"; + String sql = "id,site_user_id,global_user_id,site_login_id,login_id_lowercase,user_password,user_id_pubk,user_name,user_name_in_latin,user_photo,phone_id,self_introduce,apply_info,user_status,mute,register_time"; + String fromSql = "SELECT " + sql + " FROM site_user_profile;"; + String toSql = "INSERT INTO site_user_profile(" + sql + ") VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);"; + + return doMigrateWork(table, fromSql, toSql, "siteUserProfileRS"); + } + + private static void siteUserProfileRS(PreparedStatement ps, ResultSet rs) throws SQLException { + ps.setInt(1, rs.getInt(1)); + ps.setString(2, rs.getString(2)); + ps.setString(3, rs.getString(3)); + ps.setString(4, rs.getString(4)); + ps.setString(5, rs.getString(5)); + ps.setString(6, rs.getString(6)); + ps.setString(7, rs.getString(7)); + ps.setString(8, rs.getString(8)); + ps.setString(9, rs.getString(9)); + ps.setString(10, rs.getString(10)); + ps.setString(11, rs.getString(11)); + ps.setString(12, rs.getString(12)); + ps.setString(13, rs.getString(13)); + ps.setInt(14, rs.getInt(14)); + ps.setBoolean(15, rs.getBoolean(15)); + ps.setLong(16, rs.getLong(16)); + ps.executeUpdate(); + } + + // table 3:site_user_session + private static boolean doSiteUserSessionTable() throws MigrateDatabaseException { + String table = "site_user_session"; + String sql = "id,session_id,site_user_id,is_online,device_id,login_time"; + String fromSql = "SELECT " + sql + " FROM site_user_session;"; + String toSql = "INSERT INTO site_user_session(" + sql + ") VALUES(?,?,?,?,?,?);"; + + return doMigrateWork(table, fromSql, toSql, "siteUserSessionRS"); + } + + private static void siteUserSessionRS(PreparedStatement ps, ResultSet rs) throws SQLException { + try { + ps.setInt(1, rs.getInt(1)); + ps.setString(2, rs.getString(2)); + ps.setString(3, rs.getString(3)); + ps.setBoolean(4, rs.getBoolean(4)); + ps.setString(5, rs.getString(5)); + ps.setLong(6, rs.getLong(6)); + ps.executeUpdate(); + } catch (Exception e) { + logger.error("ignore migrate site_user_session error", e); + } + } + + // table 4:site_user_friend + private static boolean doSiteUserFriendTable() throws MigrateDatabaseException { + String table = "site_user_friend"; + String sql = "id,site_user_id,site_friend_id,alias_name,alias_name_in_latin,relation,mute,add_time"; + String fromSql = "SELECT " + sql + " FROM site_user_friend;"; + String toSql = "INSERT INTO site_user_friend(" + sql + ") VALUES(?,?,?,?,?,?,?,?);"; + + return doMigrateWork(table, fromSql, toSql, "siteUserFriendRS"); + } + + private static void siteUserFriendRS(PreparedStatement ps, ResultSet rs) throws SQLException { + ps.setInt(1, rs.getInt(1)); + ps.setString(2, rs.getString(2)); + ps.setString(3, rs.getString(3)); + ps.setString(4, rs.getString(4)); + ps.setString(5, rs.getString(5)); + ps.setInt(6, rs.getInt(6)); + ps.setBoolean(7, rs.getBoolean(7)); + ps.setLong(8, rs.getLong(8)); + ps.executeUpdate(); + } + + // table 5:site_friend_apply + private static boolean doSiteFriendAapplyTable() throws MigrateDatabaseException { + String table = "site_friend_apply"; + String sql = "id,site_user_id,site_friend_id,apply_reason,apply_time"; + String fromSql = "SELECT " + sql + " FROM site_friend_apply;"; + String toSql = "INSERT INTO site_friend_apply(" + sql + ") VALUES(?,?,?,?,?);"; + + return doMigrateWork(table, fromSql, toSql, "siteFriendApplyRS"); + } + + private static void siteFriendApplyRS(PreparedStatement ps, ResultSet rs) throws SQLException { + ps.setInt(1, rs.getInt(1)); + ps.setString(2, rs.getString(2)); + ps.setString(3, rs.getString(3)); + ps.setString(4, rs.getString(4)); + ps.setLong(5, rs.getLong(5)); + ps.executeUpdate(); + } + + // table 6:site_user_message + private static boolean doSiteUserMessageTable() throws MigrateDatabaseException { + String table = "site_user_message"; + String sql = "id,site_user_id,msg_id,send_user_id,receive_user_id,msg_type,content,device_id,ts_key,msg_time"; + String fromSql = "select " + sql + " from site_user_message;"; + String toSql = "INSERT INTO site_user_message(" + sql + ") VALUES(?,?,?,?,?,?,?,?,?,?);"; + + return doMigrateWork(table, fromSql, toSql, "siteUserMessageRS"); + } + + private static void siteUserMessageRS(PreparedStatement ps, ResultSet rs) throws SQLException { + try { + ps.setInt(1, rs.getInt(1)); + ps.setString(2, rs.getString(2)); + ps.setString(3, rs.getString(3)); + ps.setString(4, rs.getString(4)); + ps.setString(5, rs.getString(5)); + ps.setInt(6, rs.getInt(6)); + ps.setString(7, rs.getString(7)); + ps.setString(8, rs.getString(8)); + ps.setString(9, rs.getString(9)); + ps.setLong(10, rs.getLong(10)); + ps.executeUpdate(); + } catch (SQLException e) { + logger.error("migrate table site_user_message error", e); + } + } + + // table 7:site_message_pointer + private static boolean doSiteMessagePointerTable() throws MigrateDatabaseException { + String table = "site_message_pointer"; + String sql = "id,site_user_id,device_id,pointer"; + String fromSql = "SELECT " + sql + " FROM site_message_pointer;"; + String toSql = "INSERT INTO site_message_pointer(" + sql + ") values(?,?,?,?);"; + + return doMigrateWork(table, fromSql, toSql, "siteMessagePointerRS"); + } + + private static void siteMessagePointerRS(PreparedStatement ps, ResultSet rs) throws SQLException { + ps.setInt(1, rs.getInt(1)); + ps.setString(2, rs.getString(2)); + ps.setString(3, rs.getString(3)); + ps.setInt(4, rs.getInt(4)); + ps.executeUpdate(); + } + + // table 8:site_user_group + private static boolean doSiteUserGroupTable() throws MigrateDatabaseException { + String table = "site_user_group"; + String sql = "id,site_user_id,site_group_id,user_role,mute,add_time"; + String fromSql = "SELECT " + sql + " FROM site_user_group;"; + String toSql = "INSERT INTO site_user_group(" + sql + ") VALUES(?,?,?,?,?,?);"; + + return doMigrateWork(table, fromSql, toSql, "siteUserGroupRS"); + } + + private static void siteUserGroupRS(PreparedStatement ps, ResultSet rs) throws SQLException { + ps.setInt(1, rs.getInt(1)); + ps.setString(2, rs.getString(2)); + ps.setString(3, rs.getString(3)); + ps.setInt(4, rs.getInt(4)); + ps.setBoolean(5, rs.getBoolean(5)); + ps.setLong(6, rs.getLong(6)); + ps.executeUpdate(); + } + + // table 9:site_group_profile + private static boolean doSiteGroupProfileTable() throws MigrateDatabaseException { + String table = "site_group_profile"; + String sql = "id,site_group_id,create_user_id,group_name,group_photo,group_notice,ts_status,group_status,close_invite_group_chat,create_time"; + String fromSql = "SELECT " + sql + " FROM site_group_profile;"; + String toSql = "INSERT INTO site_group_profile(" + sql + ") VALUES(?,?,?,?,?,?,?,?,?,?);"; + + return doMigrateWork(table, fromSql, toSql, "siteGroupProfileRS"); + } + + private static void siteGroupProfileRS(PreparedStatement ps, ResultSet rs) throws SQLException { + ps.setInt(1, rs.getInt(1)); + ps.setString(2, rs.getString(2)); + ps.setString(3, rs.getString(3)); + ps.setString(4, rs.getString(4)); + ps.setString(5, rs.getString(5)); + ps.setString(6, rs.getString(6)); + ps.setInt(7, rs.getInt(7)); + ps.setInt(8, rs.getInt(8)); + ps.setBoolean(9, rs.getBoolean(9)); + ps.setLong(10, rs.getLong(10)); + ps.executeUpdate(); + } + + // table 10:site_group_message + private static boolean doSiteGroupMessageTable() throws MigrateDatabaseException { + String table = "site_group_message"; + String sql = "id,site_group_id,msg_id,send_user_id,send_device_id,msg_type,content,msg_time"; + String fromSql = "SELECT " + sql + " FROM site_group_message;"; + String toSql = "INSERT INTO site_group_message(" + sql + ") VALUES(?,?,?,?,?,?,?,?);"; + + return doMigrateWork(table, fromSql, toSql, "siteSiteGroupMessageRS"); + } + + private static void siteSiteGroupMessageRS(PreparedStatement ps, ResultSet rs) throws SQLException { + try { + ps.setInt(1, rs.getInt(1)); + ps.setString(2, rs.getString(2)); + ps.setString(3, rs.getString(3)); + ps.setString(4, rs.getString(4)); + ps.setString(5, rs.getString(5)); + ps.setInt(6, rs.getInt(6)); + ps.setString(7, rs.getString(7)); + ps.setLong(8, rs.getLong(8)); + ps.executeUpdate(); + } catch (Exception e) { + logger.error("migrate table site_group_message error.", e); + } + } + + // table 11:site_group_message_pointer + private static boolean doSiteGroupMessagePointerTable() throws MigrateDatabaseException { + String table = "site_group_message_pointer"; + String sql = "id,site_group_id,site_user_id,device_id,pointer"; + String fromSql = "SELECT " + sql + " FROM site_group_message_pointer;"; + String toSql = "INSERT INTO site_group_message_pointer(" + sql + ") VALUES(?,?,?,?,?);"; + + return doMigrateWork(table, fromSql, toSql, "siteGroupMessagePointerRS"); + } + + private static void siteGroupMessagePointerRS(PreparedStatement ps, ResultSet rs) throws SQLException { + ps.setInt(1, rs.getInt(1)); + ps.setString(2, rs.getString(2)); + ps.setString(3, rs.getString(3)); + ps.setString(4, rs.getString(4)); + ps.setInt(5, rs.getInt(5)); + ps.executeUpdate(); + } + + // table 12:site_user_device + private static boolean doSiteUserDeviceTable() throws MigrateDatabaseException { + String table = "site_user_device"; + String sql = "id,site_user_id,device_id,user_device_pubk,device_uuid,user_token,device_name,device_ip,active_time,add_time"; + String fromSql = "SELECT " + sql + " FROM site_user_device;"; + String toSql = "INSERT INTO site_user_device(" + sql + ") VALUES(?,?,?,?,?,?,?,?,?,?);"; + + return doMigrateWork(table, fromSql, toSql, "siteUserDeviceRS"); + } + + private static void siteUserDeviceRS(PreparedStatement ps, ResultSet rs) throws SQLException { + ps.setInt(1, rs.getInt(1)); + ps.setString(2, rs.getString(2)); + ps.setString(3, rs.getString(3)); + ps.setString(4, rs.getString(4)); + ps.setString(5, rs.getString(5)); + ps.setString(6, rs.getString(6)); + ps.setString(7, rs.getString(7)); + ps.setString(8, rs.getString(8)); + ps.setLong(9, rs.getLong(9)); + ps.setLong(10, rs.getLong(10)); + ps.executeUpdate(); + } + + // table 13:site_plugin_manager + private static boolean doSitePluginManagerTable() throws MigrateDatabaseException { + String table = "site_plugin_manager"; + String sql = "id,name,icon,api_url,url_page,auth_key,allowed_ip,position,sort,display_mode,permission_status,add_time"; + String fromSql = "SELECT " + sql + " FROM site_plugin_manager;"; + String toSql = "INSERT INTO site_plugin_manager(" + sql + ") values(?,?,?,?,?,?,?,?,?,?,?,?);"; + + return doMigrateWork(table, fromSql, toSql, "sitePluginManagerRS"); + } + + private static void sitePluginManagerRS(PreparedStatement ps, ResultSet rs) throws SQLException { + ps.setInt(1, rs.getInt(1)); + ps.setString(2, rs.getString(2)); + ps.setString(3, rs.getString(3)); + ps.setString(4, rs.getString(4)); + ps.setString(5, rs.getString(5)); + ps.setString(6, rs.getString(6)); + ps.setString(7, rs.getString(7)); + ps.setInt(8, rs.getInt(8)); + ps.setInt(9, rs.getInt(9)); + ps.setInt(10, rs.getInt(10)); + ps.setInt(11, rs.getInt(11)); + ps.setLong(12, rs.getLong(12)); + ps.executeUpdate(); + } + + // table 14:site_user_uic + private static boolean doSiteUserUicTable() throws MigrateDatabaseException { + String table = "site_user_uic"; + String sql = "id,uic,site_user_id,status,create_time,use_time"; + String fromSql = "SELECT " + sql + " FROM site_user_uic;"; + String toSql = "INSERT INTO site_user_uic(" + sql + ") VALUES(?,?,?,?,?,?)"; + return doMigrateWork(table, fromSql, toSql, "siteUserUicRS"); + } + + private static void siteUserUicRS(PreparedStatement ps, ResultSet rs) throws SQLException { + ps.setInt(1, rs.getInt(1)); + ps.setString(2, rs.getString(2)); + ps.setString(3, rs.getString(3)); + ps.setInt(4, rs.getInt(4)); + ps.setLong(5, rs.getLong(5)); + ps.setLong(6, rs.getLong(6)); + } + + private static boolean doMigrateWork(String tableName, String fromSql, String toSql, final String rsMethodName) + throws MigrateDatabaseException { + + PrintUtils.print("migrating database table : {}", tableName); + PrintUtils.flush(); + + boolean result = false; + PreparedStatement fromPst = null; + ResultSet rs = null; + PreparedStatement toPst = null; + try { + fromPst = sqliteConnection.prepareStatement(fromSql); + rs = fromPst.executeQuery(); + mysqlConnection.setAutoCommit(false); + try { + toPst = mysqlConnection.prepareStatement(toSql); + while (rs.next()) { + reflectRsMethod(rsMethodName, toPst, rs); + } + mysqlConnection.commit(); + result = true; + } catch (Exception e) { + mysqlConnection.rollback(); + throw e; + } finally { + mysqlConnection.setAutoCommit(true); + } + } catch (Exception e) { + logger.error("migrate databse sqlite to mysql error", e); + throw new MigrateDatabaseException(e); + } finally { + DatabaseConnection.closePreparedStatement(fromPst); + DatabaseConnection.closeResultSet(rs); + DatabaseConnection.closePreparedStatement(toPst); + } + + PrintUtils.print("migrate database table : {} finish,result={}", tableName, result ? "OK" : "ERROR"); + PrintUtils.flush(); + return result; + } + + private static void reflectRsMethod(String rsMethodName, PreparedStatement ps, ResultSet rs) + throws SQLException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, + NoSuchMethodException, SecurityException { + Method method = MigrateUtils.class.getDeclaredMethod(rsMethodName, PreparedStatement.class, ResultSet.class); + method.invoke(null, ps, rs); + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/util/SqlLog.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/util/SqlLog.java new file mode 100755 index 0000000..dbc6796 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/util/SqlLog.java @@ -0,0 +1,32 @@ +package com.akaxin.site.storage.util; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SqlLog { + private static final Logger logger = LoggerFactory.getLogger(SqlLog.class); + + public static void info(String msg) { + logger.info(msg); + } + + public static void info(String messagePattern, Object... objs) { + logger.info(messagePattern, objs); + } + + public static void warn(String msg) { + logger.warn(msg); + } + + public static void warn(String messagePattern, Object... objs) { + logger.warn(messagePattern, objs); + } + + public static void error(String msg) { + logger.error(msg); + } + + public static void error(String msg, Throwable t) { + logger.error(msg, t); + } +} diff --git a/openzaly-storage/src/main/java/com/akaxin/site/storage/util/SqlUtils.java b/openzaly-storage/src/main/java/com/akaxin/site/storage/util/SqlUtils.java new file mode 100755 index 0000000..d1796e3 --- /dev/null +++ b/openzaly-storage/src/main/java/com/akaxin/site/storage/util/SqlUtils.java @@ -0,0 +1,84 @@ +package com.akaxin.site.storage.util; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.lang3.StringUtils; + +/** + * + * @author Sam{@link an.guoyue254@gmail.com} + * @since 2018-05-26 11:42:47 + */ +public class SqlUtils { + + public static SqlBean buildUpdateSql(String sql, Map sqlMap) { + SqlUtils.SqlBean bean = new SqlBean(); + bean.setSql(sql); + Map res = new HashMap(); + StringBuilder sqlTag = new StringBuilder("SET "); + if (sqlMap != null) { + int index = 0; + for (String key : sqlMap.keySet()) { + if (StringUtils.isNotEmpty(sqlMap.get(key))) { + if (index++ > 0) { + sqlTag.append(","); + } + sqlTag.append(key + "=?"); + res.put(index, sqlMap.get(key)); + } + + } + } + bean.setSqlSupple(sqlTag.toString()); + bean.setParams(res); + return bean; + } + + public static class SqlBean { + private String sql; + private String sqlSupple; + private Map params; + + public String getSql() { + if (sqlSupple != null) { + return sql.replace("{}", sqlSupple); + } + return sql; + } + + public void setSql(String sql) { + this.sql = sql; + } + + public String getSqlSupple() { + return sqlSupple; + } + + public void setSqlSupple(String sqlSupple) { + this.sqlSupple = sqlSupple; + } + + public Map getParams() { + return params; + } + + public void setParams(Map params) { + this.params = params; + } + + } + + public static void main(String[] args) { + Map hello = new HashMap(); + hello.put("vk_na", null); + hello.put("vk_he", "nihao"); + hello.put("vk_he2", "nihao2"); + + String sql = "update site_user_profile {} where site_user_id=?;"; + SqlBean bean = buildUpdateSql(sql, hello); + + System.out.println(bean.getSql()); + System.out.println(bean.getParams()); + } +} diff --git a/openzaly-storage/src/main/resources/log4j.properties b/openzaly-storage/src/main/resources/log4j.properties new file mode 100755 index 0000000..1eb8aa0 --- /dev/null +++ b/openzaly-storage/src/main/resources/log4j.properties @@ -0,0 +1,40 @@ +# log4j +log4j.rootLogger=INFO,console,info-out,warn-out,error-out + +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.layout=org.apache.log4j.PatternLayout +log4j.appender.console.layout.ConversionPattern=%d %p [%c] \r\n\t%m%n + +log4j.appender.debug-out=org.apache.log4j.RollingFileAppender +log4j.appender.debug-out.File=debug.log +log4j.appender.debug-out.MaxFileSize=102400KB +log4j.appender.debug-out.MaxBackupIndex=1 +log4j.appender.debug-out.Threshold=DEBUG +log4j.appender.debug-out.layout=org.apache.log4j.PatternLayout +log4j.appender.debug-out.layout.ConversionPattern=%d %p [%c] \r\n\t%m%n + +log4j.appender.info-out=org.apache.log4j.RollingFileAppender +log4j.appender.info-out.File=info.log +log4j.appender.info-out.MaxFileSize=102400KB +log4j.appender.info-out.MaxBackupIndex=1 +log4j.appender.info-out.Threshold=INFO +log4j.appender.info-out.layout=org.apache.log4j.PatternLayout +log4j.appender.info-out.layout.ConversionPattern=%d %p [%c] \r\n\t%m%n + +log4j.appender.warn-out=org.apache.log4j.RollingFileAppender +log4j.appender.warn-out.File=warn.log +log4j.appender.warn-out.MaxFileSize=102400KB +log4j.appender.warn-out.MaxBackupIndex=1 +log4j.appender.warn-out.Threshold=WARN +log4j.appender.warn-out.layout=org.apache.log4j.PatternLayout +log4j.appender.warn-out.layout.ConversionPattern=%d %p [%c] \r\n\t%m%n + +log4j.appender.error-out=org.apache.log4j.RollingFileAppender +log4j.appender.error-out.File=error.log +log4j.appender.error-out.MaxFileSize=102400KB +log4j.appender.error-out.MaxBackupIndex=1 +log4j.appender.error-out.Threshold=ERROR +log4j.appender.error-out.layout=org.apache.log4j.PatternLayout +log4j.appender.error-out.layout.ConversionPattern=%d %p [%c] \r\n\t%m%n + + diff --git a/openzaly-storage/src/main/resources/openzaly-mysql.sql b/openzaly-storage/src/main/resources/openzaly-mysql.sql new file mode 100755 index 0000000..ed1e66e --- /dev/null +++ b/openzaly-storage/src/main/resources/openzaly-mysql.sql @@ -0,0 +1,188 @@ + +SET NAMES utf8mb4; + +CREATE TABLE IF NOT EXISTS site_config_info(id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + config_key INTEGER UNIQUE NOT NULL, + config_value TEXT + )ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '站点配置表'; + +CREATE TABLE IF NOT EXISTS site_user_profile(id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + site_user_id VARCHAR(50) UNIQUE NOT NULL, + global_user_id VARCHAR(100) UNIQUE NOT NULL, + site_login_id VARCHAR(50) UNIQUE, + login_id_lowercase VARCHAR(50) UNIQUE, + phone_id VARCHAR(20) UNIQUE, + user_password VARCHAR(50), + user_id_pubk TEXT NOT NULL, + user_name VARCHAR(50) NOT NULL, + user_name_in_latin VARCHAR(50), + user_photo VARCHAR(100), + self_introduce VARCHAR(100), + apply_info varchar(100), + user_status INTEGER, + mute BOOLEAN, + register_time BIGINT + )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '用户资料表'; + +ALTER TABLE site_user_profile CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; + +ALTER TABLE site_user_profile MODIFY COLUMN user_name VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL; + + +CREATE TABLE IF NOT EXISTS site_user_session(id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + session_id VARCHAR(100) UNIQUE, + site_user_id VARCHAR(50) NOT NULL, + is_online boolean, + device_id VARCHAR(50), + login_time BIGINT, + INDEX (site_user_id,device_id) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '用户会话表'; + +CREATE TABLE IF NOT EXISTS site_user_friend(id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + site_user_id VARCHAR(50) NOT NULL, + site_friend_id VARCHAR(50) NOT NULL, + alias_name VARCHAR(50), + alias_name_in_latin VARCHAR(50), + relation INTEGER, + mute BOOLEAN, + add_time BIGINT, + UNIQUE INDEX(site_user_id,site_friend_id) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '用户好友关系表'; + +CREATE TABLE IF NOT EXISTS site_friend_apply(id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + site_user_id VARCHAR(50) NOT NULL, + site_friend_id VARCHAR(50) NOT NULL, + apply_reason VARCHAR(100), + apply_time BIGINT, + INDEX(site_user_id,site_friend_id) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '好友申请表'; + +CREATE TABLE IF NOT EXISTS site_user_message(id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + site_user_id VARCHAR(50) NOT NULL, + msg_id VARCHAR(50) UNIQUE NOT NULL, + send_user_id VARCHAR(50), + receive_user_id VARCHAR(50), + msg_type INTEGER, + content TEXT, + device_id VARCHAR(50), + ts_key TEXT, + msg_time BIGINT, + INDEX(site_user_id) + )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '用户消息表'; + +ALTER TABLE site_user_message CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; + +ALTER TABLE site_user_message MODIFY COLUMN content text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; + +CREATE TABLE IF NOT EXISTS site_message_pointer(id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + site_user_id VARCHAR(50) NOT NULL, + device_id VARCHAR(50), + pointer INTEGER, + INDEX(site_user_id,device_id) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '用户消息游标表'; + +CREATE TABLE IF NOT EXISTS site_user_group(id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + site_user_id VARCHAR(50) not null, + site_group_id VARCHAR(50) not null, + user_role INTEGER, + mute BOOLEAN, + add_time BIGINT, + UNIQUE INDEX(site_user_id,site_group_id), + INDEX(site_group_id) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '用户群组列表'; + +CREATE TABLE IF NOT EXISTS site_group_profile(id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + site_group_id VARCHAR(50) UNIQUE NOT NULL, + create_user_id VARCHAR(50), + group_name VARCHAR(50), + group_photo VARCHAR(100), + group_notice VARCHAR(100), + ts_status INTEGER, + group_status INTEGER, + close_invite_group_chat BOOLEAN, + create_time BIGINT, + INDEX (site_group_id) + )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '群组资料表'; + +ALTER TABLE site_group_profile CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; + +ALTER TABLE site_group_profile MODIFY COLUMN group_name VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL; + +CREATE TABLE IF NOT EXISTS site_group_message(id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + site_group_id VARCHAR(50) NOT NULL, + msg_id VARCHAR(50) UNIQUE NOT NULL, + send_user_id VARCHAR(50), + send_device_id VARCHAR(50), + msg_type INTEGER, + content TEXT, + msg_time BIGINT, + INDEX(site_group_id) + )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '群组消息表'; + +ALTER TABLE site_group_message CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; + +ALTER TABLE site_group_message MODIFY COLUMN content text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; + + +CREATE TABLE IF NOT EXISTS site_group_message_pointer(id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + site_group_id VARCHAR(50) not null, + site_user_id VARCHAR(50) not null, + device_id VARCHAR(50), + pointer INTEGER, + INDEX(site_group_id,site_user_id,device_id) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '群组消息游标表'; + +CREATE TABLE IF NOT EXISTS site_user_device(id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + site_user_id VARCHAR(50) NOT NULL, + device_id VARCHAR(50) UNIQUE NOT NULL, + user_device_pubk TEXT NOT NULL, + device_uuid VARCHAR(50) UNIQUE, + user_token VARCHAR(50), + device_name VARCHAR(60), + device_ip VARCHAR(50), + active_time BIGINT, + add_time BIGINT, + UNIQUE INDEX(site_user_id,device_id) + )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '用户设备表'; + +ALTER TABLE site_user_device CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; + +ALTER TABLE site_user_device MODIFY COLUMN device_name VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; + +CREATE TABLE IF NOT EXISTS site_plugin_manager(id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + name VARCHAR(50) UNIQUE NOT NULL, + icon VARCHAR(100) NOT NULL, + api_url TEXT, + url_page TEXT, + auth_key VARCHAR(50) NOT NULL, + allowed_ip TEXT, + position INTEGER, + sort INTEGER, + display_mode INTEGER, + permission_status INTEGER, + add_time BIGINT + )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '站点扩展表'; + +ALTER TABLE site_plugin_manager CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; + +ALTER TABLE site_plugin_manager MODIFY COLUMN name VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci UNIQUE NOT NULL; + +CREATE TABLE IF NOT EXISTS site_user_uic(id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + uic VARCHAR(20) UNIQUE NOT NULL, + site_user_id VARCHAR(50), + status INTEGER, + create_time BIGINT, + use_time BIGINT + )ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '站点邀请码表'; + +CREATE TABLE IF NOT EXISTS site_expire_token(id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + token VARCHAR(100) UNIQUE NOT NULL, + bid VARCHAR(100), -- 业务id,siteUserId | siteGroupId + btype INTEGER, -- 业务类型,群组邀请码等 + status INTEGER, -- 是否可用状态 + content TEXT, + create_time BIGINT, + expire_time BIGINT, + INDEX(token) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '站点令牌表'; + diff --git a/openzaly-storage/src/main/resources/openzaly-sqlite.sql b/openzaly-storage/src/main/resources/openzaly-sqlite.sql new file mode 100755 index 0000000..84c2d87 --- /dev/null +++ b/openzaly-storage/src/main/resources/openzaly-sqlite.sql @@ -0,0 +1,161 @@ +CREATE TABLE IF NOT EXISTS site_config_info(id INTEGER PRIMARY KEY NOT NULL, + config_key INTEGER UNIQUE NOT NULL, + config_value TEXT); + +CREATE TABLE IF NOT EXISTS site_user_profile(id INTEGER PRIMARY KEY NOT NULL, + site_user_id VARCHAR(50) UNIQUE NOT NULL, + global_user_id VARCHAR(100) UNIQUE NOT NULL, + site_login_id VARCHAR(50) UNIQUE, + login_id_lowercase VARCHAR(50) UNIQUE, + phone_id VARCHAR(20) UNIQUE, + user_password VARCHAR(50), + user_id_pubk TEXT NOT NULL, + user_name VARCHAR(50) NOT NULL, + user_name_in_latin VARCHAR(50), + user_photo VARCHAR(100), + self_introduce VARCHAR(100), + apply_info varchar(100), + user_status INTEGER, + mute BOOLEAN, + register_time BIGINT); + + +CREATE TABLE IF NOT EXISTS site_user_session(id INTEGER PRIMARY KEY NOT NULL, + session_id VARCHAR(100) UNIQUE, + site_user_id VARCHAR(50) NOT NULL, + is_online boolean, + device_id VARCHAR(50), + login_time BIGINT); + +CREATE TABLE IF NOT EXISTS site_user_friend(id INTEGER PRIMARY KEY NOT NULL, + site_user_id VARCHAR(50) NOT NULL, + site_friend_id VARCHAR(50) NOT NULL, + alias_name VARCHAR(50), + alias_name_in_latin VARCHAR(50), + relation INTEGER, + mute BOOLEAN, + add_time BIGINT); + +CREATE TABLE IF NOT EXISTS site_friend_apply(id INTEGER PRIMARY KEY NOT NULL, + site_user_id VARCHAR(50) NOT NULL, + site_friend_id VARCHAR(50) NOT NULL, + apply_reason VARCHAR(100), + apply_time BIGINT); + +CREATE TABLE IF NOT EXISTS site_user_message(id INTEGER PRIMARY KEY NOT NULL, + site_user_id VARCHAR(50) NOT NULL, + msg_id VARCHAR(50) UNIQUE NOT NULL, + send_user_id VARCHAR(50), + receive_user_id VARCHAR(50), + msg_type INTEGER, + content TEXT, + device_id VARCHAR(50), + ts_key TEXT, + msg_time BIGINT); + +CREATE TABLE IF NOT EXISTS site_message_pointer(id INTEGER PRIMARY KEY NOT NULL, + site_user_id VARCHAR(50) NOT NULL, + device_id VARCHAR(50), + pointer INTEGER); + +CREATE TABLE IF NOT EXISTS site_user_group(id INTEGER PRIMARY KEY NOT NULL, + site_user_id VARCHAR(50) not null, + site_group_id VARCHAR(50) not null, + user_role INTEGER, + mute BOOLEAN, + add_time BIGINT); + +CREATE TABLE IF NOT EXISTS site_group_profile(id INTEGER PRIMARY KEY NOT NULL, + site_group_id VARCHAR(50) UNIQUE NOT NULL, + create_user_id VARCHAR(50), + group_name VARCHAR(50), + group_photo VARCHAR(100), + group_notice VARCHAR(100), + ts_status INTEGER, + group_status INTEGER, + close_invite_group_chat BOOLEAN, + create_time BIGINT); + +CREATE TABLE IF NOT EXISTS site_group_message(id INTEGER PRIMARY KEY NOT NULL, + site_group_id VARCHAR(50) NOT NULL, + msg_id VARCHAR(50) UNIQUE NOT NULL, + send_user_id VARCHAR(50), + send_device_id VARCHAR(50), + msg_type INTEGER, + content TEXT, + msg_time BIGINT); + +CREATE TABLE IF NOT EXISTS site_group_message_pointer(id INTEGER PRIMARY KEY NOT NULL, + site_group_id VARCHAR(50) not null, + site_user_id VARCHAR(50) not null, + device_id VARCHAR(50), + pointer INTEGER); + +CREATE TABLE IF NOT EXISTS site_user_device(id INTEGER PRIMARY KEY NOT NULL, + site_user_id VARCHAR(50) NOT NULL, + device_id VARCHAR(50) UNIQUE NOT NULL, + user_device_pubk TEXT NOT NULL, + device_uuid VARCHAR(50) UNIQUE, + user_token VARCHAR(50), + device_name VARCHAR(60), + device_ip VARCHAR(50), + active_time BIGINT, + add_time BIGINT); + +CREATE TABLE IF NOT EXISTS site_plugin_manager(id INTEGER PRIMARY KEY NOT NULL, + name VARCHAR(50) UNIQUE NOT NULL, + icon VARCHAR(100) NOT NULL, + api_url TEXT, + url_page TEXT, + auth_key VARCHAR(50) NOT NULL, + allowed_ip TEXT, + position INTEGER, + sort INTEGER, + display_mode INTEGER, + permission_status INTEGER, + add_time BIGINT); + +CREATE TABLE IF NOT EXISTS site_user_uic(id INTEGER PRIMARY KEY NOT NULL, + uic VARCHAR(20) UNIQUE NOT NULL, + site_user_id VARCHAR(50), + status INTEGER, + create_time BIGINT, + use_time BIGINT); + +CREATE TABLE IF NOT EXISTS site_expire_token(id INTEGER PRIMARY KEY NOT NULL, + token VARCHAR(100) UNIQUE NOT NULL, + bid VARCHAR(100), -- 业务id,siteUserId | siteGroupId + btype INTEGER, -- 业务类型,群组邀请码等 + status INTEGER, -- 是否可用状态 + content TEXT, + create_time BIGINT, + expire_time BIGINT); + + +-- add index + +--CREATE UNIQUE INDEX IF NOT EXISTS index_user_profile_id ON site_user_profile(site_user_id,global_user_id); + +CREATE INDEX IF NOT EXISTS index_user_session ON site_user_session(site_user_id,device_id); + +CREATE INDEX IF NOT EXISTS index_user_sessionid ON site_user_session(session_id); + +CREATE UNIQUE INDEX IF NOT EXISTS index_user_friend ON site_user_friend(site_user_id,site_friend_id); + +CREATE INDEX IF NOT EXISTS index_friend_apply ON site_friend_apply(site_user_id,site_friend_id); + +CREATE INDEX IF NOT EXISTS index_u2_message ON site_user_message(site_user_id); + +CREATE INDEX IF NOT EXISTS index_u2_pointer ON site_message_pointer(site_user_id,device_id); + +CREATE UNIQUE INDEX IF NOT EXISTS index_user_group ON site_user_group(site_user_id,site_group_id); + +CREATE INDEX IF NOT EXISTS index_group_profile ON site_group_profile(site_group_id); + +CREATE INDEX IF NOT EXISTS index_group_message ON site_group_message(site_group_id); + +CREATE INDEX IF NOT EXISTS index_group_pointer ON site_group_message_pointer(site_group_id,site_user_id,device_id); + +CREATE UNIQUE INDEX IF NOT EXISTS index_user_device ON site_user_device(site_user_id,device_id); + +CREATE INDEX IF NOT EXISTS index_expire_token ON site_expire_token(token); diff --git a/pom.xml b/pom.xml new file mode 100755 index 0000000..fb7e2e1 --- /dev/null +++ b/pom.xml @@ -0,0 +1,253 @@ + + + 4.0.0 + com.akaxin + openzaly-parent + 0.0.1 + pom + + + akaxin + http://www.akaxin.com + + + + openzaly-boot + openzaly-connector + openzaly-business + openzaly-message + openzaly-protobuf + openzaly-storage + openzaly-common + openzaly-admin + + + + UTF-8 + UTF-8 + 4.1.24.Final + 2.7.5 + 2.0.0.RELEASE + 2.8.2 + 1.2.31 + 1.7.25 + 23.6-jre + 3.21.0.1 + 8.0.11 + + + + + + org.apache.maven.plugins + maven-resources-plugin + 3.0.2 + + UTF-8 + + + + org.apache.maven.plugins + maven-jar-plugin + 3.0.2 + + + true + true + + true + true + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + true + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.7.0 + + true + 1.8 + 1.8 + ${project_build_encoding} + + + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + verify + + jar + + + + + + org.apache.maven.plugins + maven-install-plugin + 2.5.2 + + + + + + + https://github.com/akaxincom/openzaly + https://github.com/akaxincom/openzaly.git + + + + + + + org.springframework.boot + spring-boot-dependencies + ${springboot_version} + pom + import + + + io.netty + netty-all + ${netty_version} + + + com.google.code.gson + gson + ${gson_version} + + + com.squareup.okhttp + okhttp + ${okhttp_version} + + + com.alibaba + fastjson + ${fastjson_version} + + + org.slf4j + slf4j-api + ${slf4j_version} + + + org.slf4j + slf4j-log4j12 + ${slf4j_version} + + + com.google.guava + guava + ${guava_version} + + + org.bouncycastle + bcprov-jdk16 + 1.46 + + + commons-codec + commons-codec + 1.10 + + + org.apache.commons + commons-lang3 + 3.6 + + + org.apache.commons + commons-collections4 + 4.1 + + + + mysql + mysql-connector-java + ${mysql.version} + + + org.xerial + sqlite-jdbc + ${sqlite.version} + + + + + + + io.netty + netty-all + + + com.google.code.gson + gson + + + org.slf4j + slf4j-api + + + + org.slf4j + slf4j-log4j12 + + + com.squareup.okhttp + okhttp + + + com.google.guava + guava + + + commons-codec + commons-codec + + + org.apache.commons + commons-lang3 + + + org.apache.commons + commons-collections4 + + + org.bouncycastle + bcprov-jdk16 + + + + + + AnGuoYue(SAM) + an.guoyue + an.guoyue@akaxin.xyz + + Developer + + +8 + + + \ No newline at end of file diff --git a/restart.sh b/restart.sh new file mode 100755 index 0000000..5c48f07 --- /dev/null +++ b/restart.sh @@ -0,0 +1,36 @@ +#!/bin/bash +PORT=$1 +PORT2=$2 + +#### echo akaxin logo and desc +echo " + + / \ + / . \ + \ . \ + / \ \ / _ _ __ _ __ __ ___ _ _ + / . \ | / / \ / \ | |/ / / \ \ \/ / |_ _| | \ | | + / . _ \ / / . \ / _ \ | ' / / _ \ \ / | | | \| | + \ / / \ - . / / ___ \ | . \ / ___ \ / \ | | | |\ | + \ / / | \ / /_/ \_\ |_|\_\ /_/ \_\ /_/\_\ |___| |_| \_| + / . \ \ / + \ . \ + \ / + \ / + +Akaxin is an open source and free proprietary IM software,you can build private openzaly-server for everyone in any server. + +" + +##set tcp port +if [ -n $PORT ]; then + PORT=2021 +fi + +##set http port +if [ -n $PORT2 ]; then + PORT2=8280 +fi + +sh stop.sh $PORT 1 +sh start.sh $PORT $PORT2 1 \ No newline at end of file diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..90a435f --- /dev/null +++ b/start.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +PORT=$1 +PORT2=$2 +IS_RESTART=$3 + +if [ -z $IS_RESTART ];then +#### echo akaxin logo and desc +echo " + + / \ + / . \ + \ . \ + / \ \ / _ _ __ _ __ __ ___ _ _ + / . \ | / / \ / \ | |/ / / \ \ \/ / |_ _| | \ | | + / . _ \ / / . \ / _ \ | ' / / _ \ \ / | | | \| | + \ / / \ - . / / ___ \ | . \ / ___ \ / \ | | | |\ | + \ / / | \ / /_/ \_\ |_|\_\ /_/ \_\ /_/\_\ |___| |_| \_| + / . \ \ / + \ . \ + \ / + \ / + +Akaxin is an open source and free proprietary IM software,you can build private openzaly-server for everyone in any server. + +" +fi + + +##set tcp port +if [ -n $PORT ]; then + PORT=2021 +fi + +##set http port +if [ -n $PORT2 ]; then + PORT2=8280 +fi + +#### echo server is starting +echo "[OK] openzaly-server is starting [tcp-port:"$PORT" http-port:"$PORT2"]" + +JAVA_JAR="openzaly-server" +PID=$(ps -ef|grep $JAVA_JAR|grep $PORT |head -1| awk '{printf $2}') + +###if server is running, exit and echo error +if [ $PID > 0 ]; then + echo "[ERROR] openzaly-server is running [PID:"$PID"]" + echo "[ERROR] openzaly-server start failure" + echo "" + exit +fi + +java -Dsite.port=$PORT -Dhttp.port=$PORT2 -jar openzaly-server.jar >>stdout.log 2>&1 & + +PID=$(ps -ef|grep $JAVA_JAR|grep $PORT |head -1| awk '{printf $2}') + +if [ $? -eq 0 ]; then + echo "[OK] openzaly-server tcp-port:"$PORT",http-port:$PORT2,PID:$PID" + echo "[OK] openzaly-server is started successfully [PID:"$PID"]" +else + echo "[ERROR] openzaly-server is started failed" + echo "exit..." + echo "" + exit +fi + +echo "" +echo "" \ No newline at end of file diff --git a/stop.sh b/stop.sh new file mode 100755 index 0000000..5ebe86e --- /dev/null +++ b/stop.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +PORT=$1 +IS_RESTART=$2 +JAVA_JAR="openzaly-server" + +## IS_RESTART not exist ,echo info +if [ -z $IS_RESTART ]; then +#### echo akaxin logo and desc +echo " + + / \ + / . \ + \ . \ + / \ \ / _ _ __ _ __ __ ___ _ _ + / . \ | / / \ / \ | |/ / / \ \ \/ / |_ _| | \ | | + / . _ \ / / . \ / _ \ | ' / / _ \ \ / | | | \| | + \ / / \ - . / / ___ \ | . \ / ___ \ / \ | | | |\ | + \ / / | \ / /_/ \_\ |_|\_\ /_/ \_\ /_/\_\ |___| |_| \_| + / . \ \ / + \ . \ + \ / + \ / + +Akaxin is an open source and free proprietary IM software,you can build private openzaly-server for everyone in any server. + +" +fi + + +##set tcp port +if [ -n $PORT ]; then + PORT=2021 +fi + +echo "[OK] openzaly-server is closing [PORT:"$PORT"]" + +PID=$(ps -ef|grep $JAVA_JAR|grep $PORT |head -1| awk '{printf $2}') + +#if [ $? -eq 0 ]; then +if [ $PID ]; then + echo "[OK] openzaly-server is running on [PID:"$PID"]" +else + echo "[ERROR] openzaly-server stop failure, as it's not running." + echo "" + exit +fi + + +kill -9 ${PID} + +if [ $? -eq 0 ];then + echo "[OK] openzaly-server is stoped [PORT:"$PORT" PID:"$PID"]" +else + echo "[ERROR] openzaly-server stop failure." +fi + +echo "" \ No newline at end of file